The <jsp:forward page="url"> action will terminate the execution of the current page. Instead of having the checkLoggedIn method redirect to another page, it could return a boolean value. Then you could use an if statement to forward the request if necessary.
i.e.
<% if(! myObject.checkLoggedIn(response)) { %>
<jsp:forward page="your url">
<% } %>
Robert Pisani
-----Original Message-----
From: Klas Eriksson [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, September 23, 1999 10:09 AM
To: [EMAIL PROTECTED]
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
