File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes servlet not recognized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet not recognized" Watch "servlet not recognized" New topic

servlet not recognized

Aashish Paruthi

Joined: Apr 13, 2003
Posts: 7
I am trying to my hand at web application structure in Tomcat 4.01 but am having some basic trouble:
-I have web application directory named:cwp in Tomcat's root directory.(c:\......\webapps\root\cwp)
-I have an entry for that directory in conf directory of tomcat in server.xml file as:
<Context path="/cwp" docBase="cwp" debug="0" reloadable="true" />
- I have two jsp scripts in /cwp directory welcome.jsp and login.jsp
- I have a login.class in /cwp/WEB-INF/com/cwp
- The web.xml file has the entry:
login.jsp calls servlet/com.cwp.login servlet
I have also set the class path to:
The tomcat server gives me the following error:
The requested resource (/cwp/servlet/com.cwp.login) is not available.
What am I missing!! Need immediate assistance
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12758
For one thing, your web.xml

means you have to refer to it as login, not com.cwp.login
Also, if you are going to use cwp/servlet/login in the URL your Tomcat will have to have the "invoker" servlet turned on - see the /conf/web.xml file.
Aashish Paruthi

Joined: Apr 13, 2003
Posts: 7
The invoker tag is on, I still get this error:

The requested resource (/cwp/servlet/login) is not available.
Could you suggest what could be the problem?
Aashish Paruthi

Joined: Apr 13, 2003
Posts: 7
I checked my web.xml for application and as expected the invoker tag wasn't there.
I agree. Here's the link:
subject: servlet not recognized
Similar Threads
The famous Chapter 3 problem in HFSJ
The requested resource (/mycode/AA) is not available
Pulling my hair out over Tomcat servlets
jsp:useBean help is required
Tomcat example jsp working. Example servlet not working