• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet not recognized

 
Aashish Paruthi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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:
<servlet>
<servlet-name>login</servlet-name>
<servlet-class>com.cwp.login</servlet-class>
</servlet>
login.jsp calls servlet/com.cwp.login servlet
I have also set the class path to:
c:\.......\webapps\Root\cwp\WEB-INF\classes
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
Thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Bill
 
Aashish Paruthi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked my web.xml for application and as expected the invoker tag wasn't there.
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic