Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is it required to restart Tomcat , whenever servlet class file is changed?

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It is making me to restart tomcat whenver I changed the servlet. some times it is becoming compulsory to execute the URL in new internet explorer window.
Is there any way to reuse the existing explorer and tomcat without restarting?

Regards,
Yamini.
 
danny liu
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on. If the Servlet instance is being used, you may have to restart it.

Dan
 
danny liu
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of restarting the Tomcat Server, you can only restart the context associated with that servlet class.

Dan
 
sirisha alam
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the version of the Tomcat you are using. The latest versions of tomcat server starting from around v4.1.24 doesn't require restarting the server when the servlet is changed.
 
Sivasundaram Umapathy
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AFAIK,there are couple of ways

1. In your server.xml, add a DefaultContext subelement nested inside an Engine or Host and supply true for the reloadable attribute.

<DefaultContext reloadable="true"/>

You can also have this for a particular application instead of making it as default for all by using Context subelement nested inside a Host element as

<Context path="/web-app-name" reloadable="true"/>

If you don't prefer meddling with server.xml, same can be done using the Tomcat administration using the URL http://localhost:8080/admin/index.jsp

2.You can call the manager application to reload the application
http://localhost:8080/manager/reload?path=/web-app-name

HTH
Siva
 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You shouldn't have to restart tomcat unless the directory structure has changed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic