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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Tomcat
Reply 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: 35241
    
    7
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.


Android appsImageJ pluginsJava web charts
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56185
    
  13

Have you changed the docbase of the localhost Host element?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
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: 35241
    
    7
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Web app not recognized and not reloadable
 
Similar Threads
Path problem, seeking advice
Running JSP from outside tomcat\webapps\ROOT
web application can't start my application
Can we saperate Jsp files folder from Tomcat?
Tocat issue