File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Tomcat Problem

Stanley Form
Greenhorn

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:
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?
Marc Peabody
pie sneak
Sheriff

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
Hi

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

Ramen


Could try harder
Saurabh Chaubey
Ranch Hand

Joined: Oct 16, 2005
Posts: 101
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
Charles Lyons
Author
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 )
     
    Consider Paul's rocket mass heater.
     
    subject: Tomcat Problem