You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jason Keltz <ja...@cs.yorku.ca> on 2004/02/25 18:28:41 UTC
servlet mapping problem
Hi.
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:
<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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: servlet mapping problem
Posted by BAO RuiXian <ru...@pp.inet.fi>.
Jason Keltz wrote:
>Hi.
>
>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:
>
>
Context block should be in conf/server.xml file.
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: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org