You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Shapira, Yoav" <Yo...@mpi.com> on 2002/12/03 22:56:05 UTC

RE: Get the request path from a filter ..

Hi,
You could check the scheme to be safe, e.g.

if("http".equals(request.getScheme()))
{
  // it's HttpServletRequest...
}
else
{
  // Don't know what to do, pass it on...
}

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Eriam Schaffter [mailto:eriam@eriamschaffter.info]
>Sent: Tuesday, December 03, 2002 5:39 PM
>To: Tomcat Users List
>Subject: Re: Get the request path from a filter ..
>
>Right ..
>
>But in the filter I get a ServletRequest object and not an
>HttpServletRequest object ..
>
>So ..
>
>HttpServletRequest HttpRequest = (HttpServletRequest) request;
>String URI = Requete.getRequestURI();
>
>Thanks ..
>
>Eriam
>
>Reynir Hübner a écrit:
>
>>How about request.getRequestURI() ?
>>
>>It should return you a string with the uri..
>>
>>Hope it helps
>>-reynir
>>
>>
>>
>>
>>
>>
>>
>>>-----Original Message-----
>>>From: Eriam Schaffter [mailto:eriam@eriamschaffter.info]
>>>Sent: 3. desember 2002 22:13
>>>To: tomcat-user@jakarta.apache.org
>>>Subject: Get the request path from a filter ..
>>>
>>>
>>>Hi all ..
>>>
>>>How can I get the request uri from a servlet filter .. ?
>>>
>>>Thanks for any answear ..
>>>
>>>Eriam Schaffter
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>><mailto:tomcat-user-> unsubscribe@jakarta.apache.org>
>>>For
>>>additional commands,
>>>e-mail: <ma...@jakarta.apache.org>
>>>
>>>
>>>
>>>
>>
>>--
>>To unsubscribe, e-mail:   <mailto:tomcat-user-
>unsubscribe@jakarta.apache.org>
>>For additional commands, e-mail: <mailto:tomcat-user-
>help@jakarta.apache.org>
>>
>>-------------
>>Ce courrier a ete considere comme non infecte par les virus
>>connu de notre outil de detection. Soyez cependant prudent
>>avec les pieces jointes. Merci.
>>
>>
>>
>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-
>help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>