Problem in executing servlets on tomcat 5.5

R

ruds

Hi,
I'm developing a web application using tomcat 5.5.
I can execute Jsp pages in my application, but when I try to execute
servlets I simply cant execute them
the error shown is: Requested resource is not available.
Also my application's index page does on appear after i put entry of
servlet in the web.xml file.
But if I remove the entry in web.xml, my application runs perfect.
the servlet gets executed in the webapps/ROOT directiry, but not in my
dir.
I have checked all the paths and classpaths again, still no
difference.
Can someone tell me where I could be going wrong?
 
R

ruds

when I start the application from tomcat manager it does not start...
and gives context error
If I remove the servlet entry from web.xml my application runs
properly..
my web.xml is;
<?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/dtd/web-app_2_3.dtd">

<web-app>
<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>Hello</url-pattern>
</servlet-mapping> -->
</web-app>

Why is this happening?
 
L

Lew

ruds said:
when I start the application from tomcat manager it does not start...
and gives context error
If I remove the servlet entry from web.xml my application runs
properly..
my web.xml is;
<?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/dtd/web-app_2_3.dtd">

<web-app>
<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>

Never deploy Java code that is in the default (anonymous) package.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top