• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hot Deployement in Tomcat

 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am preparing for SCWCD exam.. I am frequently changing something in servlet to play around with it..but whenever I am compiling the new thing, I have to restart the Tomcat server to reflect the changed thing.

Previously I have used to change xml (i think server.xml) for hot deployment, without restarting the server, the changes will be reflected.

How to do this? can anyone tell me?
 
Rajesh Seeram
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Edit your /conf/server.xml

To turn on servlet reloading, add
<DefaultContext reloadable="true"/>,
If your web application is the default one.
If your web application is not the default one you can use
<Context path="/MyWebApplication" docBase="MyWebApplication" debug="0" reloadable="true" crossContext="true"/>
where "MyWebApplication" is your Web Application name.


Thanks,
 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rajesh..

But I have look into Core Servlets and JSP, they have mentioned to add reloadable="true" in the <context> element in context.xml..

may be another way of doing it..

And I have noticed even I am changing this, it takes some time to reflect. When I refreshed the page for 1-2 times, the changed thing in the servlet is not reflected..after sometimes the changes are reflecting..
[ December 28, 2006: Message edited by: Micheal John ]
 
Rajesh Seeram
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You can also use Tomcat manager to reload the Web Application.
To open Tomcat Admin/Manager
type http://servername ortnumber/ it displays Tomcat Admin Home Page.
and click on Tomcat Manager and it prompts for UserName & password.
and it redirects to
Tomcat Web Application Manager
where you can
1)check the status of all Web Applications.
2)check the Number of active Sessions for each Web Application.
3)can do some admin activities like
a)start
b)Stop
c)Reload
d)Undeploy
e)Deploy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic