How to integrate online editors into your own web site on Java
To integrate ONLYOFFICE online editors into your own website on Java you need to download and install ONLYOFFICE editors on your local server and use the Java Example for their integration.
You can choose any appropriate way how to run the Java example code. We will show how to run the Java code using the Apache Tomcat web server.
The integration examples are used to demonstrate document editors functions and the ways to connect Document Server to your own application. DO NOT USE these examples on your own server without PROPER CODE MODIFICATIONS!
This guide will show you the sequence of actions to integrate the editors successfully.
Step 1. Download and Install Document Server
First, download the ONLYOFFICE Editors (the ONLYOFFICE Document Server).
Step 2. Download the Java code for the editors integration
Download the Java Example from our site.
You need to connnect the editors to your web site. For that specify the path to the editors installation in the \src\main\resources\settings.properties file:files.docservice.url.storage=http://documentserver.com/FileUploader.ashx files.docservice.url.converter=http://documentserver.com/ConvertService.ashx files.docservice.url.tempstorage=http://documentserver.com/ResourceService.ashx files.docservice.url.api=http://documentserver.com/web-apps/apps/api/documents/api.js files.docservice.url.preloader=http://documentserver.com/web-apps/apps/api/documents/cache-scripts.html
where the documentserver is the name of the server with the ONLYOFFICE Document Server installed.
If you want to experiment with the editor configuration, modify the parameters it the \src\main\webapp\editor.jsp file.
Step 3. Install the prerequisites
To run the Java example code you will need to install the Java version appropriate for your OS and web server Apache Tomcat:
Step 4. Running Apache Tomcat
Step 5 . Running the Java code
Step 6. Checking 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. And you must also make sure that the Document Server in its turn has access to the server with the example installed with the address which you specify instead of example.com in the configuration files.
If you integrated the editors successfully the result should look like the demo preview on our site.
© Ascensio System SIA 2017. All rights reserved