tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: How do you handle 'rewrite queries' ?
Date Wed, 05 Aug 2009 14:14:18 GMT
> From: Paul Taylor [mailto:paul_t100@fastmail.fm]
> Subject: Re: How do you handle 'rewrite queries' ?
> 
>   <servlet-mapping>
>     <servlet-name>SearchServerServlet</servlet-name>
>     <url-pattern>/</url-pattern>
>   </servlet-mapping>

The above causes the SearchServerServlet to be invoked when there's no path specified in the
URI.  You want to add a mapping for /ws/type/ to target the same servlet.

  <servlet-mapping>
    <servlet-name>SearchServerServlet</servlet-name>
    <url-pattern>/ws/type</url-pattern>
  </servlet-mapping>

Note that you can use a wildcard character ("*") if you have multiple patterns to match. 
In fact, you may be able to simply modify the original mapping to have a <url-pattern>
of /*, but I haven't tried it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

Mime
View raw message