aspose file tools*
The moose likes Tomcat and the fly likes Web app not recognized and not reloadable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Web app not recognized and not reloadable" Watch "Web app not recognized and not reloadable" New topic
Author

Web app not recognized and not reloadable

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42639
    
  65
I'm facing two problems with a newly created web app.

Firstly, Tomcat will not recognize it as a web app, although it contains a WEB-INF directory with a valid web.xml file inside of it. Trying to access it results in "this resource is not available". Adding a file-based Context element in TOMCAT_HOME/conf/Catalina/localhost solves the problem, but I thought directories inside of the webapps directory that contains a WEB-INF directory would automatically be recognized as a web app?

Secondly, the app can't be reloaded correctly through the admin web app. The context reloadable attribute is set to true (and listed as such in the manager web app), but although the log files say that the context was reloaded, the changes in the class files are not picked up. Restarting Tomcat fixes this, but it's rather time-consuming.

Does either of these ring a bell with anyone? This is with Tomcat 5.5 on OS X 10.4 running Java 1.5.


Ping & DNS - my free Android networking tools app
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

Have you changed the docbase of the localhost Host element?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42639
    
  65
Do you mean appBase? No, this is pretty much a stock TC installation. The other apps in the "webapps" directory are recognized just fine.
Stu Thompson
Hooplehead
Ranch Hand

Joined: Jun 14, 2006
Posts: 136
It rings a bell with me...I saw the same error maybe six months ago. Tomcat 5.5, Java 5 on XP. I can't remember the exact solution, but I remember it was not intuitive...and that I debugging it by piecemeal removal of parts of my webapp.

Pain. I remember pain.


"This is not to say that design is unnecessary. But after a certain point, design is just speculation." --Philip Chu
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Do you have the autoDeploy attribute in your <Host entry set to false?
http://tomcat.apache.org/tomcat-5.5-doc/config/host.html

Do you have any static references to objects who's classes reside in common/lib or shared/lib? If so, they would be handled by a classloader that isn't reset when your application is reloaded.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42639
    
  65
Originally posted by Ben Souther:
Do you have any static references to objects who's classes reside in common/lib or shared/lib? If so, they would be handled by a classloader that isn't reset when your application is reloaded.


That I do, but it's not just those classes that do not get reloaded, it's all classes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web app not recognized and not reloadable