Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

netbeans and tomcat 7 deploy on save

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

like image 513
faissal Avatar asked Nov 14 '22 02:11

faissal


1 Answers

Normally xhtml file changes should apply after deploy to tomcat with out start server. But java file changes do not apply until restart the server.

Check changes made to xhtml file successfully applied to war file in tomcat web apps. If it successfully added then reload your page. changes should apply.

Work around.

For apply java side changes with out restart tomcat there is some work around to do.

You can do this on debug mode. attach debug and then click Apply Code changes button. It will do the hot deployment.

Or edit server.xml in your tomcat under conf.

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

set autoDeploy=true

like image 169
Chamly Idunil Avatar answered Dec 01 '22 01:12

Chamly Idunil