After lurking for weeks I've finally got some time to try and build a Model
2 application guided by some of the <kudos>excellent input on this
list</kudos>.
My immediate concern is the best way to return flow back to an originating
JSP.
The scenario is this:
1. StepA.jsp submits form data to StepA.do (suffix .do used to map to
controller)
2. Controller identifies & instantiates action class "StepA"; executes
"perform" method on it
3. StepA.perform gets StepABean from session and loads form data into it
using introspection
4. StepABean throws an exception for invalid data
5. Exception is caught and <problem>we wish to return to calling page with
exception message</problem>
I can't use HTTP header referer because this changes from "StepA.jsp" to
"StepA.do" after the RequestDispatcher.forward(). That is to say, it works
once but then after that creates an endless loop referring to itself.
Embedding the source page name into every form is
<opinion>nonsense</opinion>.
My current solution is to maintain a session attribute "Page.Current"; it
works fine but I would like to solicit insight from other members of the
list. Perhaps I am missing something?
Thanks
@
===========================================================================
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