File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes HTTP Status 404 - /EmpServletDemo/EmpServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "HTTP Status 404 - /EmpServletDemo/EmpServlet" Watch "HTTP Status 404 - /EmpServletDemo/EmpServlet" New topic

HTTP Status 404 - /EmpServletDemo/EmpServlet

Siri Naray
Ranch Hand

Joined: May 19, 2006
Posts: 105
I am getting this error while executing a Servlet program using tomcat.
This is my first java program so not sure at all why this comes. Please help
here are the details of my Java Resource

I created a Folder named EmpServletDemo under Java Resource in Eclipse IDE
And the Actual Servlet program name is EmpServlet
Following is the code

and the HTML file from which I am invoking this servlet is index.html
Its saved under WebContent

The Web.xml file looks like this

Tomcat is running fine both using startup.bat and also in Eclipse. But its giving error when I am trying to execute the program

HTTP Status 404 - /EmpServletDemo/EmpServlet


type Status report

message /EmpServletDemo/EmpServlet

description The requested resource (/EmpServletDemo/EmpServlet) is not available.


Apache Tomcat/7.0.25

Please help.
Thank you in advance

If you worry you cannot work... If you work you need not worry
Komal Renu
Ranch Hand

Joined: Jul 21, 2011
Posts: 51
You need to give the @Override annotation on the doGet and doPost method.

Thanks and Regards,
Komal Renu | |
I agree. Here's the link:
subject: HTTP Status 404 - /EmpServletDemo/EmpServlet
It's not a secret anymore!