I don't believe you would make requests on the controller for generating
degenerate views (views with no parameters). In general, the views handle
themselves without interactions on the controller, unless the user is
affecting the data in the model. Remember that the controller's role in MVC
is to manage manipulations of the data, e.g. changing user passwords, etc.
To handle the authentication part, think of logging into the system as an
MVC pattern applied to the session object. You would need a
"SessionController" servlet to which you would post credentials and set the
session state.
Also, the view retrieves data from the model directly in a read-only role.
This is typical behaviour for a view in MVC, otherwise it can't act like a
bona fide view of the model! :) Just remember to ONLY act in a read-only
role with the model from the view.
Since this is a design pattern topic, it should probably go to another
mailing list ...
Please correct me if I missed something ...
-- Jake
----- Original Message -----
From: Thomas Oellrich <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 25, 2000 12:33 AM
Subject: Model 2
> Hello all,
>
> I'm building a Web application based on the Model 2 architecture advocated
> by folks like Craig. I'm wondering how you guys handle requests for JSP
> pages where no previous action was executed. Are these requests also
directed
> to the controller servlet or do you let the JSP pages handle these
requests
> directly? If so, I guess these JSP pages need to include authentification.
> Another issue arises when the JSP page contains a list which needs to be
> populated from a database. Is it a good a idea to let the view retrieve
data from
> the model directly?
>
> Thanks for any help.
> Tom
>
>
> --
> Sent through GMX Free Mail - https://www.gmx.net
>
>
===========================================================================
> 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
>
===========================================================================
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