I've seen this done, by doing the following:

Have your controller place any errors into an errors HashTable.  Have your
view display any errors that occurred, or nothing if the errors HashTable is
null.

When you first enter the JSP page the errors HashTable will be null and no
errors will be displayed.  After submitting the page the controller will
populate the errors HashTable with any errors that occurred and redirect
back to the JSP page.  The JSP page now displays the errors.

Jonathan

-----Original Message-----
From: Darren Siegel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 27, 2000 11:24 AM
To: [EMAIL PROTECTED]
Subject: Re: Architecture Question


>
> Hi,
>     There is an excellent article by Govind Seshadri on Advanced Form
Processing.
> It practically walks you through the steps. Here is the URL:
> http://www.javaworld.com/javaworld/jw-03-2000/f_jw-0331-ssj-forms.html
>

Yes, that article was excellent.  I have changed my implementation to
follow the methods described by Seshadri.  I have only one problem
with that method...Originally the request to register is done from an
HTML page.  This request goes to the JSP Processing page. If the
validation fails, the request gets forwarded to a JSP page that contains
exactly the same HTML as the original page, but with JSP code to
display the errors.  Can't I just make the original HTML page a JSP
page that just won't show the errors (since there won't be any initially),
but can still handle the request forwarded from the processing page?
I just don't like the idea of duplicating this much code.  Any thoughts
would be helpful...

        -Darren

===========================================================================
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

===========================================================================
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