| Author |
servlet not recognized
|
Aashish Paruthi
Greenhorn
Joined: Apr 13, 2003
Posts: 7
|
|
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
Joined: Mar 22, 2000
Posts: 12325
|
|
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
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
Greenhorn
Joined: Apr 13, 2003
Posts: 7
|
|
I checked my web.xml for application and as expected the invoker tag wasn't there. Thanks
|
 |
 |
|
|
subject: servlet not recognized
|
|
|