The moose likes Servlets and the fly likes Servlet not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet not found" Watch "Servlet not found" New topic

Servlet not found

marco rizzi

Joined: Feb 19, 2012
Posts: 1
Hi guys I am a newbie in Java Servlets and am currently working on a simple Java servlet. Well I'll try to describe my situation better:
I have a servletrunner file, a file, a servlet java class and an html form to submit messages;
This is the file:

message="Example message",\

and this is my init method in where I think the problem is:
public void init(ServletConfig config)
throws ServletException
initarg = config.getInitParameter("message") ;

when i load the client html page in firefox and i type a message for the servlet then I have a 404 error and the shell running servletrunner prints out "Servlet not found: servlet".
Any idea about what's wrong???
Thank you.
Wendy Gibbons

Joined: Oct 21, 2008
Posts: 1107

I am presuming you are using tomcat (as everyone seems to)

either your servlet.class file isn't in the correct tomcat directory
or your web.xml isn't pointing to the correct place (or possibly both)
I agree. Here's the link:
subject: Servlet not found
It's not a secret anymore!