rajneesh75
asked on
servlets not running in tomcat
Hi
I am working on tomcat for the first time.I have made some servlets,jsps & html files which i want to deploy on tomcat(on win 2003).
I have made a test folder under webapps folder.In test folder i have made WEB-INF folder. In WEB-INF folder , I have made 2 folders .... classes and lib. I have put all my jsps and htmls files in test folder and servlets in classes folder. I have made a web.xml file also in WEB-INF folder . have added the follwoing line in /conf/server.xml file
<Context path="/test" docBase="test" debug="0" reloadable="true" />
The contents of web.xml file are
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>login</servl et-name>
<servlet-class>login</serv let-class>
</servlet>
</web-app>
though i read that one does not need add <servlet> tag if the servlets are without initialisation parameters which my case is.
I have also uncommented the lines swithced on the invoker servlet feature in /conf/web.xml
Still my servlets are not running. jsps and html file are running fine.
HTTP Status 404 - /test/login
type Status report
message /test/login
description The requested resource (/test/login) is not available.
Above error comes.
Any help
Thanks in advance
I am working on tomcat for the first time.I have made some servlets,jsps & html files which i want to deploy on tomcat(on win 2003).
I have made a test folder under webapps folder.In test folder i have made WEB-INF folder. In WEB-INF folder , I have made 2 folders .... classes and lib. I have put all my jsps and htmls files in test folder and servlets in classes folder. I have made a web.xml file also in WEB-INF folder . have added the follwoing line in /conf/server.xml file
<Context path="/test" docBase="test" debug="0" reloadable="true" />
The contents of web.xml file are
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>login</servl
<servlet-class>login</serv
</servlet>
</web-app>
though i read that one does not need add <servlet> tag if the servlets are without initialisation parameters which my case is.
I have also uncommented the lines swithced on the invoker servlet feature in /conf/web.xml
Still my servlets are not running. jsps and html file are running fine.
HTTP Status 404 - /test/login
type Status report
message /test/login
description The requested resource (/test/login) is not available.
Above error comes.
Any help
Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.