File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat restart for changes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat restart for changes" Watch "Tomcat restart for changes" New topic
Author

Tomcat restart for changes

Priya Bindra
Ranch Hand

Joined: Sep 22, 2009
Posts: 51
i have tomcat 5.5.28 . For any small changes that i make to my servlet classes i need to restart tomcat to see changes. is there a workaround for this?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

You can use Tomcat's manager app to just restart the web app. There's no need to stop and restart Tomcat itself.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Priya Bindra
Ranch Hand

Joined: Sep 22, 2009
Posts: 51
Bear Bibeault wrote:You can use Tomcat's manager app to just restart the web app. There's no need to stop and restart Tomcat itself.


how can i do that?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

It's all covered in the Tomcat documentation.
Charles Owen
Ranch Hand

Joined: Aug 31, 2009
Posts: 61
If you are merely changing a servlet, shouldn't you be able to just reload the application instead of restart it?

If you bring up the manager application (http://localhost:8080/manager/html), you should see a listing of all your applications. There you should have the ability to reload, deploy, undeploy, or restart your app.
Prasanna Puttappa
Ranch Hand

Joined: Jul 21, 2003
Posts: 54
Just edit web.xml (like add/delete some extra space) and save. This will reload the webapp :-)


~Prasanna (SCJP5.0, SCWCD5)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Charles Owen wrote:If you are merely changing a servlet, shouldn't you be able to just reload the application instead of restart it?

"reload" and "restart" mean the same thing.
Anbarasu Aladiyan
Ranch Hand

Joined: Jun 02, 2009
Posts: 182

Hi Priya Bindra,
go to ..\tomcat\conf\Catalina\localhost folder and create a file named <context_of_project>.xml.
And the content of <context_of_project>.xml file will be like

For more information about the configuration refer here.


A.A.Anbarasu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat restart for changes
 
Similar Threads
Any cache at Tomcat?
Duplicate component ID found in view
changing forward path..
tomcat5.5.27+apache2.2.4+mod_jk-1.2.28-httpd-2.2.3.so
changes to web.xml requires application restart?