If there is no Controller then it is not MVC.
All of the backend work should be finished before you start sending the page.
The template should be pulling from the context - not the database.
sendRedirect is generally ugly and a bad user experience.

Jon Stevens wrote:

> on 7/17/01 1:45 PM, "Gene Wadleigh" <[EMAIL PROTECTED]> wrote:
>
> > Create a control servlet that checks for errors and re-serves the page with
> > error messages
> > if there are arrors and only serves the "next" page if everything went ok.
>
> That doesn't solve the problem.
>
> Let me explain:
>
> Suppose you have a template. Based on the Pull model, there is no Java class
> responsible for populating the context for that particular template.
> Therefore, there is no "control". The only thing that populates the context
> is the Pull Service which places objects into the Context based on the
> intended scope of the object.
>
> Now, you have an object in the context that you are referring to. That
> object makes a JDBC connection and executes a query. That query could fail
> for a myriad of reasons. Now, the question is, if it fails, how do you
> handle it gracefully?
>
> At the point of processing the template is being rendered and sent to the
> output stream. Now, the template could throw an exception which causes the
> system to attempt to generate another page for display (ie: an error page).
> But error pages are generally ugly and generally bad user experience. So, a
> better solution needs to be found. Please see my last email for the answer.
>
> thanks,
>
> -jon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to