When Tomcat and redeploy need to be restarted during Web Development -- Post
Source: Internet
Author: User
Using myeclipse for web development, because the machine configuration is not high and the project is not small, it has been plagued by a problem: When should we redeploy and when should we restart tomcat. If the project is large, the overhead of redeploy and restart Tomcat is very large, and it often takes a long time.
Of course, you can choose to remove other irrelevant projects from webapps first, so that Tomcat loads fewer projects and correspondingly faster.
In order not to waste time waiting for the server to start up, I thought about the situation of restarting Tomcat and redeploy:
Restart Tomcat
1) in Tomcat debug mode, modify the definition of the currently used class (including class name, method, method name, parameter, etc ......), Restart tomcat.
2) modify web elements. For example, if struts is used to modify JSP pages, you do not need to restart Tomcat; Modify action, do not need to restart; Modify form files, sometimes do not.
3) to modify the configuration file, restart tomcat.
4) there is an automatic prompt for myeclipse. If you need to restart the modification, a form prompt will pop up, but the configuration file change is not prompted. Therefore, you must restart tomcat to change the configuration file.
Redeploy
Myeclipse will be released automatically, that is, there is almost no redeploy. However, myeclipse is not stable. Sometimes, it cannot be automatically released and must be redeploy. So when you restart Tomcat and still cannot get your expected results, consider redeploy.
In addition, the browser has a cache. In some cases, the cache is not updated. During the test, you can use the JSP statement to disable the cache. You can also access another page and click back, the remaining updates and database connection pages sometimes prompt that the update fails. In this case, you can ignore it (in fact, it has already been updated ).
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