File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Software Craftsman
this week in the
Servlet call error: 404 servlet call not available
Joined: Jan 21, 2006
Jan 21, 2006 05:24:00
i have a question relating to
I am using
for my server.
I am calling a servlet from a html form action
as follows -
<form method="get" action="/myapplication/MyServlet">
<Input types -- >
<-- different input types here--->
where myapplication is the name of my folder kept in webapps of Tomcat.
My servlet is kept in WEB-INF/classes, I have not used any package to keep the servlet in, it is directly inside classes.
My deployment discriptor ie web.xml is kept in WEB-INF.
the url mapping is -
but still when I press submit on my html page it gives 404 error and says /myapplication/MyServlet is not available.
Thanks in advance.
Joined: Jan 21, 2006
Jan 21, 2006 06:18:00
Please check the DOCBASE property of your application in the file of server.xml which is available in YOUR_TOMCAT_FOLDER/conf.
Without that the server can not find your application.
good luck (- -)V
Author and all-around good cowpoke
Joined: Mar 22, 2000
Jan 21, 2006 06:37:00
I have not used any package to keep the servlet in,
Experience suggests that this is a bad idea. Just do that little bit of extra effort, put ALL classes used with
in a package, and avoid many mysterious bugs.
Joined: Dec 11, 2004
Jan 21, 2006 07:45:00
I assume these are exerpts from your deployment descrptor and that you've
got full <servlet> and <servlet-mapping> entries.
<servlet-name>MyServlet</servlet-name> <servlet-class>MyServlet</servlet-class> <url-pattern>MyServlet</url-pattern>
How to ask a question...
Simple Servlet Examples
I agree. Here's the link:
subject: Servlet call error: 404 servlet call not available
JSP not able to find the servlet
Head First Servlet JSP: BeerSelect example: requested resource not available
Deploying My WebApp in Tomcat
Calling a servlet from a html page
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015