• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic