"Craig R. McClanahan" wrote:
>
> The general organization of request processing in my apps goes like this:

[..]

> What I normally do is use a single servlet per web application, and then map it to
> a filename extension (I like ".go" because it implies motion).  Now, if I submit a
> form to URL "/saveCustomer.go", my controller servlet is called.  It can parse
> "saveCustomer" out of the request URI and use it as the key to a lookup table
> containing the Java class of the corresponding implementation class (all
> configured in initialization properties -- no hard coding).  The first time I call
> a particular action procedure, I instantiate a new instance of that action class.
> After that, I resuse the same one over again (which must be thread-safe, for
> obvious reasons).

Using this approach, how do you determine which page to display next?
Using your example above, would you then use
getRequestDispatcher("/saveCustomer.jsp").forward(request,response)?

How do you handle business-logic type errors that require the user to
correct their form input? Presumably these would be detected in your
Action class - can put some sort of ErrorBean into the request and
forward() back to the referring page?

Damian

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