• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet reloading in Tomcat 3.2.4

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does Tomcat 3.2.4 support servlet reloading? I see in Moreservlets.com's instructions on setting up Tomcat 4 that there is a mechanism to do this, but I can't determine if Tomcat 3.2.4 can do it too.
At the moment the only way I can get my changes to the application to take effect is to shut down the server, delete the entire app directory and the war file in the webapps directory, copy in the new war file and restart the server. Is there an easier way to deploy changes to an application using Tomcat 3.2.4?
Lon Allen
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using Tomcat 3.2 and its reloading the changed servlets and jsp without restarting the server. Very rarely it won't.
Try to add the attribute reloadable="true"in your context.for example
<Context path="/examples"
docBase="webapps/examples"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
If still problem persist,better upgradte to newer version(if possible).
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat 3.2 does support class reloading but it is flaky at best. Servlets tend to be picked up if you specify the reloadable="true" option as Balaji said.
Classes deeper in the package tree won't necessarily though. Also on rare occasions the reloading fails which, when debugging, really gets confusing (as you try and find out why the bug you have just fixed is still appearing).
The other problem is that under tomcat 3.2 the servlet context and session objects don't properly carry across when reloading servlets so if you are using session state or servlet contexts (init parameters, etc) things may go funny when the servlet gets reloaded.
 
tumbleweed and gunslinger
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has this been changed in 4.x? I'm using the "reload" and it doesn't work at all. I see a system.out message that if found the changed file, but it dies when the browser hits it...
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by David Yutzy:
Has this been changed in 4.x? I'm using the "reload" and it doesn't work at all. I see a system.out message that if found the changed file, but it dies when the browser hits it...


For me its working fine on both Tomcat 3.2.4 and 4.x,
I'm using jdk1.3.1,win2k professional,
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92),
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode),
As i said,very rarely it won't.
Try again the configuration and Good luck
 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I am using 4.0.4 with reloadable="true".
It works intermittantly when used in ernest.
So when I am unsure shutdown, then startup again.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic