No because I don't have a Request.  In other words, the request object I
have is from the current servlet-context, but when I do
nextContext=currentContext.getContext(nexturi), all I have about this other
context is the context object itself and the server-root-relative URI for
"some" resource somewhere within the new context.

Thanks!

-Richard

----- Original Message -----
From: "Mark" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 08, 2002 7:33 PM
Subject: Re: howto get the context path from a ServletContext?


> Is getContextPath() possibly what you're looking for?  It's found in the
> HttpServletRequest interface.
>
>
> At 07:23 PM 1/8/2002 +0100, you wrote:
> >Is there a way to figure out the context path from a given
ServletContext?
>  I'm inside one context and am trying to dispatch to a resource in another
> context based upon the absolute URI (in other words, a uri relative to the
> server root).
> >
> >I can get the proper servlet context as follows:
> >
> >nextContext = thisServletContext.getContext(dispatch_to_this_uri);
> >
> >but then I cannot figure out how to do a dispatch to the uri because I
> don't know how to strip off the context path from the front of the URI!
> >
> >I have a feeling I'm asking a really stupid question, but I'm going blind
> from looking at the servlet 2.3 javadoc for so long!
> >
> >Can anyone help?
> >
> >Thanks!
> >
> >Best regards,
> >
> >Richard
> >
>
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to