Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: Special URL servlet request.

Joe Francis

2004-01-24

Replies:

When I tried that approach (adding "/*" to the mapping), my servlet
received the requests to those url's with additional path, and was able
to extract the patch info using HttpServeltRequest.getPathInfo.  But it
was no longer able to find other content such as static html files and
image files that were bundled into my servlet. How do I receive
requests to urls that have additional path, but not cut off access to my
own internal content?

Bodycombe, Andrew wrote:

>In web.xml:
>
><web-app>
>  <servlet>
>    <servlet-name>digfidl</servlet-name>
>    <servlet-class>se.two4hr.servlet.DLServlet</servlet-class>
>  </servlet>
>  <servlet-mapping>
>    <servlet-name>digfidl</servlet-name>
>    <url-pattern>/digfidl</url-pattern>
>  </servlet-mapping>
>  <servlet-mapping>
>    <servlet-name>digfidl</servlet-name>
>    <url-pattern>/digfidl/*</url-pattern>
>  </servlet-mapping>
></web-app>
>
>-----Original Message-----
>From: matsmobil [mailto:matsmobil@(protected)]
>Sent: 23 January 2004 13:25
>To: tomcat-user@(protected)
>Subject: Special URL servlet request.
>
>
>
>This request works:http://digfi.com/digfidl/digfidl and calls my Servlet OK.
>
>The question is how can I call my servlet with the following URL:
>http://digfi.com/digfidl/digfidl/dAc/OM1617RbR/YT4075/Uk5673We/qih/dFOE1051/
>1gpus/LYxx/tKG0/iXcaP.rm"/>?copyright="digfi.com"&author="Chine
>& The Slippery Horns"&title="Scatterminded"
>
>I have to make this request like this because my calling applikation can't
>use '?' in the URL-requests.
>
>Could this be done in TC 5.0.18 only ore do I have to have apache as
>frontend for
>TC 5.0.18.
>---------------------
>In TC/conf/server.xml I have added the following row:
><Context path="/digfidl" docBase="digfidl" debug="0" reloadable="true" />
>
>---------------------
>TC/webapps/digfidl/WEB-INF/web.xml contains:
><web-app>
>-
><servlet>
><servlet-name>digfidl</servlet-name>
><servlet-class>se.two4hr.servlet.DLServlet</servlet-class>
></servlet>
>-
><servlet-mapping>
><servlet-name>digfidl</servlet-name>
><url-pattern>/digfidl</url-pattern>
></servlet-mapping>
></web-app>
>------------------
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
>For additional commands, e-mail: tomcat-user-help@(protected)
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
>For additional commands, e-mail: tomcat-user-help@(protected)
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.