Jason Keltz wrote:
Hi.Context block should be in conf/server.xml file.
I am very troubled over a servlet mapping problem, and I am hoping that someone can make a suggestion.
I have added a context in conf/Catalina/localhost/test.xml as follows:
Best
Bao
<Context path="/mywebapps" docBase="/cs/home/jas/webapps" reloadable="true" autoDeploy="true"></Context>
In "/cs/home/jas/webapps/test", I have a directory "test" with a "WEB-INF" directory containing:
1) a "classes" directory containing HelloWorldExample.class 2) a "web.xml" file containing: <?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>
<display-name>Servlet Example</display-name> <description> Servlet Example </description>
<servlet> <servlet-name>HelloWorldExample</servlet-name> <servlet-class>HelloWorldExample</servlet-class> </servlet>
<servlet-mapping> <servlet-name>HelloWorldExample</servlet-name> <url-pattern>/servlet/HelloWorldExample</url-pattern> </servlet-mapping>
</web-app>
------
If I try to go to:
http://localhost:8080/mywebapps/servlet/HelloWorldExample
I get that the requested resource is not available.
Please help.
Thanks,
Jason.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]