File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tomcat Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tomcat Problem" Watch "Tomcat Problem" New topic

Tomcat Problem

Stanley Form

Joined: Apr 27, 2006
Posts: 1
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:

There is a 404 error when entering:

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

Any ideas on what is wrong?
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

For starters, you probably don't want to end that URL with a slash.

A good workman is known by his tools.
Ramen Chatterjee
Ranch Hand

Joined: Apr 27, 2006
Posts: 62

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


Could try harder
Saurabh Chaubey
Ranch Hand

Joined: Oct 16, 2005
Posts: 101

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.

Charles Lyons
Ranch Hand

Joined: Mar 27, 2003
Posts: 836
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.

    Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
    Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / Amazon Amazon UK )
    I agree. Here's the link:
    subject: Tomcat Problem
    It's not a secret anymore!