You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by St...@r2isante.fr on 2002/09/16 13:45:56 UTC

Réf. : Re: 2 questions in one mail...



1-javax.servlet.http.HttpServletRequest.isRequestedSessionIdFromCookie()

--> Thank you and Opps, didn't catch it :-)

2-Don't think you can. This could break furthur chains in the filter.
How about using a Servlet mapping to dispatch the correct page?

--> That's exactly what I want : breaking the chain in the filter... My
filter is a login filter and I want to redirect to a jsp loging page with
the content of the request object to go further.



Stephane.RAULT@r2isante.fr wrote:
> 1- I'd like to know if my session is tracked with cookie or not. How can
I
> ask Tomcat if cookei are enable on the client browser ?
>
> 2- How can I do the equivalent of sendRedirect when I'm in a Filter (I
> mean, chain.doFilter can't work because I want my filter to give a new
JSP
> page which is not the one requested by the client ?
>
> TIA
>
> Stéphane
>
>
> --
> 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>





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


Re: Réf. : Re: 2 questions in one mail...

Posted by Tim Funk <fu...@joedog.org>.
My guess:
doFilter(...) {
     if (badAuthentication) {
         RequestDispatcher rd = request.getRequestDispatcher(loginPage);
         rd.forward(request,response);
     } else {
         chain.doFilter(request,response);
     }
}

Stephane.RAULT@r2isante.fr wrote:
> 
> 
> 1-javax.servlet.http.HttpServletRequest.isRequestedSessionIdFromCookie()
> 
> --> Thank you and Opps, didn't catch it :-)
> 
> 2-Don't think you can. This could break furthur chains in the filter.
> How about using a Servlet mapping to dispatch the correct page?
> 
> --> That's exactly what I want : breaking the chain in the filter... My
> filter is a login filter and I want to redirect to a jsp loging page with
> the content of the request object to go further.
> 
> 
> 
> Stephane.RAULT@r2isante.fr wrote:
> 
>>1- I'd like to know if my session is tracked with cookie or not. How can
> 
> I
> 
>>ask Tomcat if cookei are enable on the client browser ?
>>
>>2- How can I do the equivalent of sendRedirect when I'm in a Filter (I
>>mean, chain.doFilter can't work because I want my filter to give a new
> 
> JSP
> 
>>page which is not the one requested by the client ?
>>
>>TIA
>>
>>Stéphane
>>
>>
>>--
>>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>
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 


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