This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Servlet not found  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 servlet.properties file, a servlet java class and an html form to submit messages;
This is the servlet.properties file:

servlet.servlet.code=servlet.class
servlet.servlet.initArgs=\
message="Example message",\

and this is my init method in servlet.java where I think the problem is:
public void init(ServletConfig config)
throws ServletException
{
super.init(config);
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.
 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!