Reproduced Java Development Online Open edit save Word file

Source: Internet
Author: User

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
  1. Download logo is "P" icon of the third-party plug-in development package: Baidu Pageoffice, download from the official website

  2. Take MyEclipse as an example, create a new web Project, such as: Wordonline

  3. Unzip the development package and copy the jar package from the "Integrated Files \lib" directory to your project's "Web-inf\lib" directory

  4. Refer to the "Integrated file \web.xml" file and copy the relevant configuration into your project's Web. xml

  5. New doc directory and test file Test.doc; Create new page word.jsp, write code to open file online

  6. Run the project to access the word.jsp page; prompt to enter the trial serial number provided in the development package when registering

  7. 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)

  8. 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.

  9. 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)

  10. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.