• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web app not recognized and not reloadable

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you changed the docbase of the localhost Host element?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic