Meaningless Drivel is fun!*
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "HTTP Status 404 - /EmpServletDemo/EmpServlet" Watch "HTTP Status 404 - /EmpServletDemo/EmpServlet" New topic
Author

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
Error

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
Sirisha

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 | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP Status 404 - /EmpServletDemo/EmpServlet