On Mon, 25 Jun 2001, Jay Walters wrote:

> What do people do to handle result data which is view only.  We are 
> thinking we will just put the model beans into our request object in the
> action.perform method and pull them out to use in the jsp.  Does this
> make sense?  Any reason we should be using forms for output of read only
> data? 

I would only add one word of warning if you plan to use model beans.  The
purpose of an MVC architecture is to decouple the View and the Model.
Passing the Model beans to the jsp breaks this decoupling.

One idea would be to create beans just for the jsp.  Group them according to
the jsp structure.  Use the controller to execute and business logic on the
model beans and then map only the pertinent data to the jsp input beans.

One advantage of this approach is that the beans that are exposed to the jsp
developers are limited in their complexity.

Andreas

Reply via email to