×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Servlet is not available

Servlet is not available

Servlet is not available

(OP)
Hello All,

i made a servlet what I try to call from my .jsp like:
<form name="myForm" method="post" action="http://localhost:8080/test/servlet/DownloadServlet">

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!



RE: Servlet is not available

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.

RE: Servlet is not available

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">

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close