File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes unable to start servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "unable to start servlet" Watch "unable to start servlet" New topic

unable to start servlet

jyotsana dang
Ranch Hand

Joined: Sep 26, 2003
Posts: 135
i created a java servlet file.. and compiled it and added the class file in root/web-inf/classes folder..
in the action of the form i used /servlet/registration
but when i try to run the serlvet the page displays a message :
The requested resource (/servlet/Registration) is not available.
where is the bug?
nick zhao

Joined: Oct 10, 2003
Posts: 3
Your catalog is 'ROOT', so you have to access the servlet by the form like '/Registration'.
The accessing was right if you deployed the servlet's url pattern in the web.xml like '/servlet/Registration'.
jyotsana dang
Ranch Hand

Joined: Sep 26, 2003
Posts: 135
i have my folder in root folder of tomcat and the servlet class file in root/web-inf/classes folder created ..
and form action as: /servlet/Registration
but even the it gives the same error
Basavaraju Banakar

Joined: Jul 18, 2002
Posts: 25
Try "../servlet/Registration"

It is impossible to make anything foolproof because fools are so ingenious..Murphy<br />Basu.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Your use of the "/servlet/..." style of URL requires the Invoker servlet - see any of the recent threads about "servlet can't start" and similar problems.
I agree. Here's the link:
subject: unable to start servlet
jQuery in Action, 3rd edition