A
Albretch
I have compiled my servlets and tested them via the invoker servlet
http://localhost:8080/myapp/servlet/myserv06
Now I need for this servlet to be accessed under the url
http://localhost:8080/book00/chap02/section06/
I have tried a number of changes to the
<servlet-mapping><url-pattern>
section of the file web.xml
$TOMCAT_HOME/webapps/myapp/WEB-INF/web.xml
How can you use an arbitrary url after you have tested your servlets?
As I understood it you must:
1._ Make sure the invoker servlet has been commented out
2._ use the <web-app><servlet-mapping><url-pattern> section of the
web.xml file to set the url-pattern this servlet is invoked under, or
am I missing something here?
My web.xml file looks like this:
<?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>Book Section 06</display-name>
<description>Book Section 06</description>
<servlet>
<servlet-name>myserv06</servlet-name>
<servlet-class>myserv06</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myserv06</servlet-name>
<url-pattern>/book00/chap02/section06/</url-pattern>
</servlet-mapping>
</web-app>
http://localhost:8080/myapp/servlet/myserv06
Now I need for this servlet to be accessed under the url
http://localhost:8080/book00/chap02/section06/
I have tried a number of changes to the
<servlet-mapping><url-pattern>
section of the file web.xml
$TOMCAT_HOME/webapps/myapp/WEB-INF/web.xml
How can you use an arbitrary url after you have tested your servlets?
As I understood it you must:
1._ Make sure the invoker servlet has been commented out
2._ use the <web-app><servlet-mapping><url-pattern> section of the
web.xml file to set the url-pattern this servlet is invoked under, or
am I missing something here?
My web.xml file looks like this:
<?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>Book Section 06</display-name>
<description>Book Section 06</description>
<servlet>
<servlet-name>myserv06</servlet-name>
<servlet-class>myserv06</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myserv06</servlet-name>
<url-pattern>/book00/chap02/section06/</url-pattern>
</servlet-mapping>
</web-app>