Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP Status 404 - /EmpServletDemo/EmpServlet

 
Siri Naray
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Komal Renu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to give the @Override annotation on the doGet and doPost method.

Thanks and Regards,
-------------------------------------------------------------------------------------
Komal Renu | krenu@infocepts.com | www.infocepts.com
-------------------------------------------------------------------------------------
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic