• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Bear Bibeault
  • paul wheaton
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Mikalai Zaikin
  • Piet Souris
Bartenders:

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

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instead of restarting the Tomcat Server, you can only restart the context associated with that servlet class.

Dan
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You shouldn't have to restart tomcat unless the directory structure has changed.
 
Get off me! Here, read this tiny ad:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
reply
    Bookmark Topic Watch Topic
  • New Topic