This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android this week in the Android 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: 12982
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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: servlet not recognized
It's not a secret anymore!