Pretty much the same way you do any other place...
((HttpServletResponse)response).sendRedirect("-the_url-");
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Wed, May 18, 2005 12:07 pm, Lee Harrington said:
> Ok....have a filter...it runs (use logging to determine this).
>
> I'm stuck on how to forward to the login page.
>
> Here's my filter code:
>
> public void doFilter(ServletRequest request,
> ServletResponse response,
> FilterChain chain)
> throws IOException, ServletException {
>
> try {
> chain.doFilter(request, response);
> //
> // Ensure there is a user in the session
> //
> UserDTO user = (UserDTO)
> request.getSession().getAttribute("user");
> if (user==null) {
> // User is not logged in, redirect to login page
> // How do I do that?
> }
>
> } finally {
> }
> }
>
> TIA,
>
> Lee
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]