On Wed, 28 Mar 2001, Dalia, Keith A - TOS-DITT1 wrote:

> I want to use the request.getPathInfo() but am not sure how it works with
> tomcat's config.  When you alias you servlet you specify a path
> 
> ie:
> <servlet>
>         <servlet-name>TWAUTHID</servlet-name>
>         <servlet-class>twauthid</servlet-class>
>     </servlet>
> 
>     <servlet-mapping>
>         <servlet-name>TWAUTHID</servlet-name>
>         <url-pattern>/twauthid</url-pattern>
>     </servlet-mapping>
> 
> so in the twauthid servlet getPathInfo() returns null.
> 
> Do I have to do something different with the url-pattern if I want to use
> getPathInfor()?
> 
> 
> TIA, Keith
> 

You will want to use a servlet mapping like this:

        <servlet-mapping>
          <servlet-name>TWAUTHID</servlet-name>
          <url-pattern>/twauthid/*</url-pattern>
        </servlet-mapping>

Now, a URL like "/myapp/twauthid/extra/path/info" will return
"/extra/path/info" from the getPathInfo() method.

Craig McClanahan


Reply via email to