Netbeans and tomcat 7 deploy when saved

I am working with netbeans 7.1.2 and tomcat 7 . When I make some changes in either .java or .xhtml files, the file is deployed when I save it, but I need to restart the tomcat server to see the changes in the browser.
can you help me fix this?

+4
source share
2 answers

Typically, changes to the xhtml file should be applied after deployment to tomcat with the server starting. But changes to the Java file do not apply until the server restarts.

Check for changes made to the xhtml file that were successfully applied to the war file in tomcat web applications. If it has been successfully added, reload the page. changes must apply.

Work around.

To apply the changes in the java side with the tomcat reboot disabled, some work needs to be done.

You can do this in debug mode. attach debugging and click the "Apply Code Changes" button. This will make a hot deployment.

Or edit server.xml in your tomcat in conf.

<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> 

set autoDeploy = true

+1
source

I think it is too late to answer this question.

but for those who have this problem.

I had the same problem and to fix it I had to clean up the project and then run tomcat. so tomcat has to rebuild my project so that everything is fresh and clean, and my problem has been resolved with that.

0
source

All Articles