• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sending a list from jsp to action class hidden

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic