I have a .jsp page which has the following contents:

/ /----------------------------------------------------------------------- ------------------------------------
<html>
<%
// if the user is not authenticated, we need to send them to the login page
if(session.getAttribute("USER_AUTHORIZED") == null || session.getAttribute("USER_AUTHORIZED").equals("false"))
{
response.sendRedirect("/login/Login.jsp");
}
%>


<body>
<p>I don't know why this is being called when the user is not already authenticated </p>
</body>
</html>
/ /----------------------------------------------------------------------- ------------------------------------


Now if the USER_AUTHORIZED attribute is not set, it will enter the if block and get redirected to the login.jsp page. The browser shows me the content of the body page after the if block instead. Does after getting redirected the call returns to this page and completes the processing of this page ?

This used to work in Tomcat 3.XX i recently upgraded to Tomcat 4.1.18 .. is there some change in the behaviour of response.sendRedirect () ?

thanks.

Reply via email to