I'm not actually sure you would ever really want to do this as proposed.
It's easier to deal with this situation in the controller servlet as already
detailed by Craig et al when handling the loss of an authenticated session.
Namely, most sites involve some form of authentication (a login page) that
when
successful places a "marker" object in the HttpSession.
On all subsequent requests the controller servlet tests for the presence of
the
marker; if is not there then the controller performs an rd.forward() to the
login page.
If the login example is not applicable I would imagine that the same
approach can be
adopted for any alternative scenario involving a test for object X and
redirection
to page Y if it fails.
You may need to be selective about where the test occurs -
a) a login test should probably be performed prior to the Action.perform()
to avoid
executing logic based on an unauthenticated request.
b) a test for objects required by final JSP (say some necessary bean) should
be
performed after the logic but before the rd.forward() in case some aspect of
the
logic has removed the object (explicitly or implicitly through
invalidation).

Regards
@

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to