• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to populate a list using c:set?

 
Anthony Karta
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to set value of type list using c:set. is that possible?

I'm not sure what the correct way. any advice welcome.

thanks


[ May 28, 2007: Message edited by: Anthony Karta ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot do it directly. You could make a method in your bean, which takes a String parameter (the comma separated list). This method would take the comma separated list of Strings, and put them in the list.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once again, JSPs are expected to be used to display data, not create it. Populating a list is something that should be done in the page controller.
 
Anthony Karta
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Satou, it works now.

Originally posted by Bear Bibeault:
Once again, JSPs are expected to be used to display data, not create it. Populating a list is something that should be done in the page controller.


Thanks Bear.

Are you saying that nowdays JSP is not much use other than for rendering view?
then why so many functionalities in JSP, guess they should be deprecated then
[ May 28, 2007: Message edited by: Anthony Karta ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anthony Karta:
Are you saying that nowdays JSP is not much use other than for rendering view?

Unequivocally.

then why so many functionalities in JSP

History. Perhaps this article will be enlightening.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!