Hi, I have follwoing problem: - in Action I add new attribute to REQUEST of Collection type - in jsp page I can obtain the data (to fill Selection) - !!! in Action, after submit, Collection attribute does not exist anymore. Any hints how to pass Collection from JSP to Action class in request?
I do not want to use session as a cache because it is memory expensive. Thanks for any help.
Request-scoped attributes exist only during the lifetime of the request (go figure). Once the request has been processed and the response sent back, the request and all attributes tied to it go away. You need to add a field to your ActionForm that is of type Collection and the corresponding getters and setters. You can find more info on this on the web by searching for "struts indexed properties" (seems to be a hot topic these days).