diff --git a/web/documentserver-example/java/README.md b/web/documentserver-example/java/README.md index 8855d004..fe30f5b6 100644 --- a/web/documentserver-example/java/README.md +++ b/web/documentserver-example/java/README.md @@ -14,13 +14,10 @@ Edit the **settings.properties** configuration file. Specify the name of your lo nano src/main/resources/settings.properties ``` -Edit the following lines: +Edit the following line: ``` -files.docservice.url.converter=https://documentserver/ConvertService.ashx -files.docservice.url.tempstorage=https://documentserver/ResourceService.ashx -files.docservice.url.api=https://documentserver/web-apps/apps/api/documents/api.js -files.docservice.url.preloader=https://documentserver/web-apps/apps/api/documents/cache-scripts.html +files.docservice.url.site=https://documentserver/ ``` Install Maven: @@ -44,13 +41,10 @@ Edit the **settings.properties** configuration file. Specify the name of your lo nano src/main/resources/settings.properties ``` -Edit the following lines. You need to change `documentserver` to your documentserver: +Edit the following line. You need to change `documentserver` to your documentserver: ``` -files.docservice.url.converter=https://documentserver/ConvertService.ashx -files.docservice.url.tempstorage=https://documentserver/ResourceService.ashx -files.docservice.url.api=https://documentserver/web-apps/apps/api/documents/api.js -files.docservice.url.preloader=https://documentserver/web-apps/apps/api/documents/cache-scripts.html +files.docservice.url.site=https://documentserver/ ``` Run next command in java example directory: diff --git a/web/documentserver-example/java/src/main/java/controllers/EditorServlet.java b/web/documentserver-example/java/src/main/java/controllers/EditorServlet.java index 49c1d903..1c751e4e 100644 --- a/web/documentserver-example/java/src/main/java/controllers/EditorServlet.java +++ b/web/documentserver-example/java/src/main/java/controllers/EditorServlet.java @@ -70,7 +70,7 @@ public class EditorServlet extends HttpServlet } request.setAttribute("file", file); - request.setAttribute("docserviceApiUrl", ConfigManager.GetProperty("files.docservice.url.api")); + request.setAttribute("docserviceApiUrl", ConfigManager.GetProperty("files.docservice.url.site") + ConfigManager.GetProperty("files.docservice.url.api")); request.getRequestDispatcher("editor.jsp").forward(request, response); } diff --git a/web/documentserver-example/java/src/main/java/helpers/FileUtility.java b/web/documentserver-example/java/src/main/java/helpers/FileUtility.java index 3e41403d..35a6d11b 100644 --- a/web/documentserver-example/java/src/main/java/helpers/FileUtility.java +++ b/web/documentserver-example/java/src/main/java/helpers/FileUtility.java @@ -75,7 +75,7 @@ public class FileUtility if (url == null) return null; //for external file url - String tempstorage = ConfigManager.GetProperty("files.docservice.url.tempstorage"); + String tempstorage = ConfigManager.GetProperty("files.docservice.url.site") + ConfigManager.GetProperty("files.docservice.url.tempstorage"); if (!tempstorage.isEmpty() && url.startsWith(tempstorage)) { Map params = GetUrlParams(url); diff --git a/web/documentserver-example/java/src/main/java/helpers/ServiceConverter.java b/web/documentserver-example/java/src/main/java/helpers/ServiceConverter.java index b4971be9..d1c04791 100644 --- a/web/documentserver-example/java/src/main/java/helpers/ServiceConverter.java +++ b/web/documentserver-example/java/src/main/java/helpers/ServiceConverter.java @@ -40,7 +40,7 @@ import org.json.simple.parser.ParseException; public class ServiceConverter { private static int ConvertTimeout = 120000; - private static final String DocumentConverterUrl = ConfigManager.GetProperty("files.docservice.url.converter"); + private static final String DocumentConverterUrl = ConfigManager.GetProperty("files.docservice.url.site") + ConfigManager.GetProperty("files.docservice.url.converter"); private static final String DocumentJwtHeader = ConfigManager.GetProperty("files.docservice.header"); public static class ConvertBody diff --git a/web/documentserver-example/java/src/main/resources/settings.properties b/web/documentserver-example/java/src/main/resources/settings.properties index 3836517f..09dc8c64 100644 --- a/web/documentserver-example/java/src/main/resources/settings.properties +++ b/web/documentserver-example/java/src/main/resources/settings.properties @@ -6,9 +6,10 @@ files.docservice.edited-docs=.docx|.xlsx|.csv|.pptx|.txt files.docservice.convert-docs=.docm|.dotx|.dotm|.dot|.doc|.odt|.fodt|.ott|.xlsm|.xltx|.xltm|.xlt|.xls|.ods|.fods|.ots|.pptm|.ppt|.ppsx|.ppsm|.pps|.potx|.potm|.pot|.odp|.fodp|.otp|.rtf|.mht|.html|.htm|.epub files.docservice.timeout=120000 -files.docservice.url.converter=https://documentserver/ConvertService.ashx -files.docservice.url.tempstorage=https://documentserver/ResourceService.ashx -files.docservice.url.api=https://documentserver/web-apps/apps/api/documents/api.js -files.docservice.url.preloader=https://documentserver/web-apps/apps/api/documents/cache-scripts.html +files.docservice.url.site=https://documentserver/ +files.docservice.url.converter=ConvertService.ashx +files.docservice.url.tempstorage=ResourceService.ashx +files.docservice.url.api=web-apps/apps/api/documents/api.js +files.docservice.url.preloader=web-apps/apps/api/documents/cache-scripts.html files.docservice.secret= files.docservice.header=Authorization \ No newline at end of file diff --git a/web/documentserver-example/java/src/main/webapp/index.jsp b/web/documentserver-example/java/src/main/webapp/index.jsp index 35dfdd6b..b043f556 100644 --- a/web/documentserver-example/java/src/main/webapp/index.jsp +++ b/web/documentserver-example/java/src/main/webapp/index.jsp @@ -278,7 +278,7 @@
Cancel
- "> + ">
© Ascensio System SIA <%= Calendar.getInstance().get(Calendar.YEAR) %>. All rights reserved.