Package and deploy the WEB Project in eclipse to Tomcat

Source: Internet
Author: User

To put it simply:

Our project uses ofc2, which should be converted into a. JSON file before generating the chart.

The first problem is that the JSON file with the same file name will not change if you only change its content and then refresh the page that generates the chart.

Our team is responsible for the solution given by this member. Every time a new chart is required, a new JSON file is generated and the old file is deleted.

Then it is very slow to generate a new chart, because after the file is generated, eclipse does not immediately refresh it. Sometimes it takes more than five seconds, which is simply unacceptable.

Efficiency is very problematic, so I thought of packaging the project and running it directly on Tomcat to see if the effect would be better.

After packaging, the path problem has been solved for a long time.

However, although the old file is still deleted each time-a new file is generated, it is not run in eclipse, and the efficiency of generating a new graph is much higher, and the data generation function is executed almost all the time, the chart is refreshed successfully.

Body:

The following are also found in various searches on the Internet. Here we will make a summary record.

1. Right-click the project in eclipse, and select war file in export to generate the war file of the project.

2. Place the generated war file in the webapps folder after Tomcat decompression.

3. configure Server. XML in the conf folder of Tomcat:

Add the following code between the

<Context Path = "/" docbase = "F:/tomcat/webapps" DEBUG = "0" reloadable = "true" crosscontext = "true"> </context>

4. start Tomcat. Double-click STARTUP. bat in the bin directory of the Tomcat decompression file.

5. Enter http: // localhost: 8080/project/index. jsp in the browser.

I still don't quite understand the specific meaning of the properties in the configuration file. I will add them when I am free next time.


Related Article

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.