Java Call logo is "P" icon of the third-party plug-in, implementation of online editing save Word file (in JSP invocation as an example, support SSM, SSH, SPRINGMVC and other popular frameworks)
Tools/Materials
- Java IDE environments such as Eclipse or MyEclipse
- Logo is a third-party plugin with "P" icon
Method/Step
Download logo is "P" icon of the third-party plug-in development package: Baidu Pageoffice, download from the official website
Take MyEclipse as an example, create a new web Project, such as: Wordonline
Unzip the development package and copy the jar package from the "Integrated Files \lib" directory to your project's "Web-inf\lib" directory
Refer to the "Integrated file \web.xml" file and copy the relevant configuration into your project's Web. xml
New doc directory and test file Test.doc; Create new page word.jsp, write code to open file online
Run the project to access the word.jsp page; prompt to enter the trial serial number provided in the development package when registering
After the registration is successful, the file opens online (note: only IE or IE kernel browser is supported at this time, or Chrome 41 and the following versions of the browser)
The new processing file saves the page savefile.jsp (under the framework using the action method or the Requestmapping method, etc.) and calls the Filesaver object to save the file.
Re-access word.jsp, open edit file, click the Save button to achieve file saving function. (Note: All browsers are not supported at this time)
Add JS code to the index.jsp page to call the relevant. js file; Add a button to call the Pobrowser.openwindowmodeless method to open word.jsp, implement support for all browsers online open edit Save Word file
[Reprint]java Development Online Open Edit save Word file