On Thu, 1 Aug 2002, SB wrote:
> 
> Hi
> I want my URLs as
> http://localhost:8080/webapp/MyServlet/2345
> http://localhost:8080/webapp/MyServlet/23349
> http://localhost:8080/webapp/MyServlet/345
> 
> all mapped to the same servlet, none are static.
> 
> Note that I do not want:
> http://localhost:8080/webapp/MyServlet?23349
> which is straightforward, but
> http://localhost:8080/webapp/MyServlet/23349
> 
> How can I do it?

You want path mapping.  Something like:

<servlet-mapping>
  <servlet-name>myservlet</servlet-name>
  <url-pattern>/MyServlet/*</url-pattern>
</servlet-mapping>

This will forward all requests matching /webapps/MyServlet/* to myservlet.

The Request object will break this URL down like this:
requestURI = contextPath + servletPath + pathInfo

http://localhost:8080/webapp/MyServlet/23349 =
  /webapp  +  /MyServlet  + /23349


later.
Bill
--
William G. Thompson, Jr.
Chief Japple Evangelist | www.japple.org
Saucon Technologies
[EMAIL PROTECTED] | +1 908 947 7145 | www.saucontech.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to