Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Spring and the fly likes spring mvc: how to access a list in the jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "spring mvc: how to access a list in the jsp" Watch "spring mvc: how to access a list in the jsp" New topic
Author

spring mvc: how to access a list in the jsp

Loganathan Karunakaran
Ranch Hand

Joined: Nov 04, 2008
Posts: 78
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


OCPJP 1.6
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1681
    
    7

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.


[How To Ask Questions][Read before you PM me]
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: spring mvc: how to access a list in the jsp