File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collection in request

 
Albert Gorski
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Junilu Lacar
Bartender
Pie
Posts: 6529
21
Java Linux Mac Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic