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?
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
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.
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 ]
Joined: Dec 28, 2006
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