• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Web app not recognized and not reloadable

 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you changed the docbase of the localhost Host element?
 
Ulf Dittmer
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Hooplehead
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic