tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Get the request path from a filter ..
Date Tue, 03 Dec 2002 21:56:05 GMT
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: <mailto:tomcat-user-help@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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message