File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Running a servlet on Tomcat using Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Running a servlet on Tomcat using Eclipse" Watch "Running a servlet on Tomcat using Eclipse" New topic
Author

Running a servlet on Tomcat using Eclipse

Raef Kandeel
Ranch Hand

Joined: Aug 05, 2007
Posts: 87
Hey guys! how is life. I was using Tomcat and Eclipse to run a servlet. Tomcat gave me the following error in response to this url: http://localhost:8080/FirstServlet/servlet/hall.SomeServlet:-

HTTP Status 404 - /FirstServlet/servlet/hall.SomeServlet

--------------------------------------------------------------------------------

type Status report

message /FirstServlet/servlet/hall.SomeServlet

description The requested resource (/FirstServlet/servlet/hall.SomeServlet) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.14


I typed the url: http://localhost:8080/FirstServlet/servlet/hall.SomeServlet and it gave me the above error.

The three files that I had are:

ServerUtilities.java
---------------------


SomeServlet.java


And my web.xml:-



Do you know what the problem might be. Thanks Ranchers.


SCJP, SCWCD
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I typed the url: http://localhost:8080/FirstServlet/servlet/hall.SomeServlet and it gave me the above error.



Take out the "servlet/" part of your url.
It isn't in your mapping so it shouldn't be in your URL.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
John Lu
Greenhorn

Joined: Nov 15, 2007
Posts: 3


should be something like:



Find Java code, document and Jar
 
 
subject: Running a servlet on Tomcat using Eclipse