5

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?

John Yeary
  • 1,112
  • 22
  • 45
faissal
  • 261
  • 5
  • 20

2 Answers2

1

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

Chamly Idunil
  • 1,848
  • 1
  • 18
  • 33
0

I think it's too late for answering this question.

but for who has this problem.

I had the same problem and for fix it I had to clean project and then run it by tomcat. in this way, tomcat should rebuild my project so everything is fresh and clean and my problem was solved with this.

Seyed Ali Roshan
  • 1,476
  • 1
  • 18
  • 37