• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TOMCAT Gremlin!

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have installed Tomcat as instructed in HFSJ, and am using v5.0.28.

Navigating to http://localhost:8080, gives me the introducory page and says everything is fine.

I created the development and deployment directory structures and put the form.html file in the webapps/beer/form.html



Now here is where it gets WEIRD. First several times I navigate to the form, everthing works great. Then I go on with the example, build the deployment descriptor and servlet, stop then restart TOMCAT, now It cant find the html file!! Error HTTP 404. Cant find the resouce.
I have stopped and started TOMCAT over ten times and have verified paths, etc. Nothing has changed that i am aware of. What gives???
 
Jack Gold
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is REALLY bothering me. If tomcat is started and can find the intro page, why cant it find an html file in webapps/beer/ ???

And why would it find it the first time and after restarting, NOT find it.

Must be a bug.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you used any uppercase letters when creating the directories for your app? If so, it is the problem.
 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,
We have one more xml in
<Tomcat-dir>\conf\Catalina\localhost\
The xml is specific to each web app deployed in tomcat.

The FileName of the xml is similar to the name of the web app in WEBAPPS directory in TOMCAT directory

I have like this
d:\tomcat5\webapps\karthik
karthik : This is my web app name

so i have kept a file called karthik.xml in the above mentioned path

The contents are here



Try this

before that verify in the HTML page you have given the servlet name or the URL pattern without /

and in web.xml u should have / before the servlet URL pattern
 
reply
    Bookmark Topic Watch Topic
  • New Topic