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.