Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Servlet is not available

Status
Not open for further replies.

jumper2

Programmer
Jul 13, 2007
41
ES
Hello All,

i made a servlet what I try to call from my .jsp like:
<form name="myForm" method="post" action="
When I submit my form I got a failure that my servlet doesn't exist there.

I have done with the servlet configuration in directory:
\Tomcat4.1\webapps\test\WEB-INF\web.xml

<servlet>
<servlet-name>
DownloadServlet
</servlet-name>
<servlet-class>
test.DownloadServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DownloadServlet</servlet-name> <url-pattern>/servlet/DownloadServlet</url-pattern>
</servlet-mapping>

I made a "DownloadServlet.jar" file what I put here:
Tomcat 4.1\webapps\test\WEB-INF\lib


Is somebody has idea where I did a mistake?
Thank you in advice!
 
Please remove DownloadServlet.jar and put the DownloadServlet.class into
Tomcat 4.1\webapps\test\WEB-INF\classes\test\DownloadServlet.class

You can try
<form name="myForm" method="post" action="/servlet/DownloadServlet">

I assume that the class DownloadServlet belongs to package test. And you put all the stuffs into a context test.

You can try to change the package name to test2 because using
same name as package and context will make thing unclear.
 
step 1:please remove DownloadServlet.jar and put the DownloadServlet.class into
Tomcat 4.1\webapps\test\WEB-INF\classes\test\DownloadServlet.class

If you cannot make it work, you can try this too
step 2:
<form name="myForm" method="post" action="/servlet/DownloadServlet">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top