• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

spring mvc: how to access a list in the jsp

 
Loganathan Karunakaran
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have added a arraylist to the model variable. I need to get this list in the view JSP and use it as array. I need to use this list in a javascript function. I don't want to use the for each tags.
Could you please help me with this.

Thanks and regards
Loganathan. K
E: loga345@gmail.com
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what the problem you have not showed us what you have tried so far.

If you used the .addAttribute() method on your model you either supplied it with a name or used the one that spring assigns it by convention. Use that name to use it access it in your JSP.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic