diff --git a/web/documentserver-example/java/README.md b/web/documentserver-example/java/README.md index 434ccf82..a8f7668e 100644 --- a/web/documentserver-example/java/README.md +++ b/web/documentserver-example/java/README.md @@ -88,7 +88,15 @@ To run the Java example code, install the Java version appropriate for your OS a If everything is correct, you will see the Tomcat web page in the browser as shown below. -### Step 5. Run the Java code +### Step 5. Configure JWT + +Open the *src/main/resouces/settings.properties* file and [specify the same secret key](https://helpcenter.onlyoffice.com/installation/docs-configure-jwt.aspx) as used in your Document Server to enable JWT: + +``` +files.docservice.secret=secret +``` + +### Step 6. Run the Java code 1. Open Tomcat Web Application Manager by clicking **Manager App:** @@ -124,7 +132,7 @@ To run the Java example code, install the Java version appropriate for your OS a 6. Click the link with the application name to run it. -### Step 6. Check accessibility +### Step 7. Check accessibility In case the example and Document Server are installed on different computers, make sure that your server with the example installed has access to the Document Server with the address which you specify instead of **documentserver** in the configuration files. @@ -176,6 +184,12 @@ See the detailed guide to learn how to [install Document Server for Linux](https sudo chmod -R ugo+rw /{path} ``` + [Specify the same secret key](https://helpcenter.onlyoffice.com/installation/docs-configure-jwt.aspx) as used in your Document Server to enable JWT: + + ``` + files.docservice.secret=secret + ``` + 5. Install **Maven**: ``` @@ -278,6 +292,12 @@ See the detailed guide to learn how to install Document Server [for Docker](http where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed and the **storage-folder** is the path where files will be created and stored. + [Specify the same secret key](https://helpcenter.onlyoffice.com/installation/docs-configure-jwt.aspx) as used in your Document Server to enable JWT: + + ``` + files.docservice.secret=secret + ``` + 6. Run the next command in the Java example directory: ```