Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Tomcat Problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Apache Tomcat 5.0.28 Server. The icon on the lower right says it is operating and it opens the Jakata page with http://localhost:8080/

The form.html file opens with the following for a url:
file:///C:/Tomcat/webapps/Beer-v1/form.html/

There is a 404 error when entering:
http://localhost:8080/Beer-v1/form.html/

TOMCAT_HOME is set to C:\tomcat and the application is in this directory.

Any ideas on what is wrong?
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For starters, you probably don't want to end that URL with a slash.
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Hope this isnt stating the obvious, but have you tried following the deployment documentation?

Ramen
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I guess you are not having the WEB-INF directory at web app's context root.

Create a WEB-INF directory as C:/Tomcat/webapps/Beer-v1/WEB-INF

Now restart the server and check it out.

regards,
Saurabh
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A few suggestions (I have never configured Tomcat directly on Windows, so I'm talking from a Linux perspective):
  • Does your C:\Tomcat\conf\server.xml contain an entry for localhost at port 8080, and does that entry reference C:\Tomcat\webapps as its appRoot or docRoot? I doubt this is problem because you are getting a 404, so it is definitely connecting.
  • Remove the / from the end of your URL, it should end with /form.html
  • Do you have a /WEB-INF/web.xml relative to your application? If not, you will require one with earlier versions of Tomcat. As of Java EE 5 (the new version), you don't actually require it, but its use was mandated for all (even static) applications prior to EE 5.
  • See if that helps.
     
      Bookmark Topic Watch Topic
    • New Topic