Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sending a list from jsp to action class hidden

 
paddy Mahadeva Iyer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I found that I am not able to forward a list from my jsp to action class.

I have a list "myList" that is populated and send to the jsp from my action class. My jsp needs to forward this to the next action method.

I tried



But this is not working. I tried a few other options also but none helped

any suggestions?

Thanks in advance
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a form is submitted the only thing sent to the server is strings: unless the server side knows how to convert these strings into actual objects you'll not get what you expect.

There are several options, including (a) convert the string representation of the list into an actual List and (b) store the list in session scope. S2's type conversion may help with (a), depending on the string representation of the list--which is what you'll get by putting the list into an <s:hidden...> tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic