You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Wentzel <Mi...@aswethink.com> on 2001/04/09 17:42:46 UTC

RE: problem with response.sendRedirect()

> I try to redirect users who try to access page on my site and 
> who have not
> enter username + passord.
> I have a litle jsp :
> 
> <%
>      User tUser = (User)session.getAttribute("user");
> 
>      if  ( tUser == null) {
>      response.sendRedirect("http://localhost:8080/");
>      }
> %>
> 
> which call confirmLogin.jsp
> 
> and on the top of each page i have a : <%@ include 
> file="confirmLogin.jsp"
> %>

try adding

return;

after your sendRedirect(...)

---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com