File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes reloading servlet revisited?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "reloading servlet revisited??" Watch "reloading servlet revisited??" New topic

reloading servlet revisited??

Eli Daum

Joined: Jul 29, 2002
Posts: 12
I have tried restarting tomcat I have set reloadable to true, I have restarted the PC and Tomcat will not pick up the changes I make to my servlet??? HELP!
Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 672
If you restarted Tomcat (OR PC!) you will run the updated class.
You can check the time stamp of your servlet class to make sure that you did updated your class. also add some println for debugging.

We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design

Crazy Bikes created by m-Power
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
you probably (make that certainly) either didn't compile the servlet at all (ignored compiler errors maybe?) or placed the compiled classfile in the wrong directory.

Vijayendra V Rao
Ranch Hand

Joined: Jul 04, 2004
Posts: 195
You don't need to re-start your PC for this!

Check the timestamp of the class file as soon as you compile it. If its latest and still your changes are not reflecting, then it simply means that the actual class file that the server is reading and the latest one with the modifications are different.

Why don't you give random SOPs and check if they are printing out to the console? This is the best way to check if your changes are being read by the server.

Vijayendra <br /> <br />"The harder you train in peace, the lesser you bleed in war"
I agree. Here's the link:
subject: reloading servlet revisited??
It's not a secret anymore!