(I got no replies on the JSP list to these questions, so I thought I'd try
here...)

In the Model 2 architecture:

(1) Is there a difference between having the controller servlet store the
"model" beans in the Request or the Session before forwarding to the JSP?
Is one better than the other, or preferred from some reason?

(2) How am I supposed to handle the case where the bean(s) that the
controller servlet is supposed to instantiate are determined by the tags
that are present in the requested JSP? Does the servlet have to open and
parse the JSP somehow in this case? As an example:

Assume I have 2 custom tags, one that displays the data from a database
table as an HTML table, and one that creates a .JPG chart image of table data.

If Page1.jsp contains three tags ("show Table 1 as a chart", "show Table 1
as a table", and "show Table 2 as a table"), then I'd like to load Table 1
data into one bean, Table 2 data into a second bean, and then forward to
the JSP and let the custom tags do their drawing and charting with the two
beans. This is most efficient, as I'm only requesting data for Table 1
once, even though it's being used twice in the JSP.

But in this scenario, how can my controller servlet determine which
table(s) it needs to create beans for from the database?

Jay

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to