it isn't clear if checkLoggedIn() does the redirect itself (as it looks),
but place a return; after the response.sendRedirect().

To change your code for purposes of example:

<%
    if ( !myObject.checkLoggedIn(response) ) // returns false if user not
logged in
    {
        response.sendRedirect(notLoggedInURL);
        return;
    }
%>

Lance Lavandowska
http://www.AgDomain.Com

-----Original Message-----
From: Klas Eriksson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, September 23, 1999 10:01 AM
Subject: aborting page processing


>Hi
>
>Is there a nice way to abort page processing from within a JSP page?
>Or do I have to wrap a gigantic if-statement around the rest of the
>page?
>
>For example:
><html>
><head> blabla </head>
>
><% myObject.checkLoggedIn(response) %>
>
><a lot of html+jsp code>
></html>
>---
>if the checkLoggedIn() method decides to redirect to another page,
>how do I prevent the rest of the code from being processed?
>
>/Klas
>
>=========================================================================
==
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
>FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to