Two Laptop Bag
The moose likes Servlets and the fly likes Java files in WEB-INF: update problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Java files in WEB-INF: update problems" Watch "Java files in WEB-INF: update problems" New topic

Java files in WEB-INF: update problems

Claudia Fontan

Joined: May 20, 2005
Posts: 4
Hi everyone,

I'd like to know how Java classes in WEB-INF/classes are used by Tomcat: I changed a file and loaded remotely, but although I changed both .java and .class I see no changes. I even deleted the .class and it continued with the same behaviour, so how can I update the file??

Thanks to everyone in advance
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

They get loaded the first time they are used. You will need to restart Tomcat or reload your application via the Tomcat Manager app to have your new classes picked up.

You can also configure Tomcat to check for new versions and pick them up automatically. This generally isn't done on production machines though. There is a performance hit involved.
Look at the "reloadable" attribute:

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Java files in WEB-INF: update problems
jQuery in Action, 3rd edition