struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Reynolds <jim.jreyn...@gmail.com>
Subject Beans in Request and Validation Question
Date Tue, 01 Nov 2005 19:28:18 GMT
I have a question about using request scoped beans and validation with an
ActionForm.
 Here is a example:
In a certain action, I go and create a Collection of objects for a select
list. I put the Collection into the request, and forward to a JSP page, and
I show the list.
 From the JSP page, the user is required to select an item from the select
list, then hit submit. Here is where the issues come into play. From that
action I am validating the form in the bean. If the user forgot to select an
item, I create ActionError, stuff it into the ActionErrors object and send
back to my input which is the original jsp page with the select list, the
one they just submitted from.
 But of course, when it goes back to the jsp page, there is no collection to
build the select list, and I get errors. Up to now, I have been putting
those types of list into the session, but really feel there should be a
better way. Can anyone possibly guide me here to a better way to handle
this?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message