struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Reumann <>
Subject Re: Need to pass data to JSP in ActionForm
Date Wed, 04 Feb 2004 04:25:54 GMT
Pat Young wrote:

> 6.  The problem I am having is that if the ActionForm
> failes validation, then the sales.jsp page gets an
> error becaue it can not find the bean in the Request
> for the products list.  Should I build this bean in my
> validate and place it in the request at the beginning
> of validate?  If validate fails, there is no other
> opportunity to build the products list and get it into
> the Request.

Personally I often opt for the easy solution and put the List in Session 
scope, but there are other alternatives that have been discussed on this 
list before.

> 7.  I typically uses Actions to retrieves and build
> beans and then add them to the request for the jsp to
> access.  Is this an acceptable practice also?

Depends what you mean by "build beans." Nothing wrong wtih setting stuff 
into Request scope from your Actions, but make sure you are calling some 
business process that does the actual "building." For example...

//in your Action:
List someList = someBusinessClass.getMyList();
request.setAttribute("listWhatever", someList);


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message