• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing a collection in request

 
Bhavik Patel
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiii...I have one jsp page which retrieves Images from the database and displays on the JSP page.All images have imageID also ..i m retrieving that also from database.I want to put a Up And Down buttons which can shuffle the images...Means if i click on Up button the first image it should go at the end and the second comes first ,third comes second and so on...I was thinking to pass the all images ID in an array or collection with appropriate order to the same page and then display the images in that order according to received array....How to accomplish this in JSP/JSTL...Any other suggestion will be helpful too...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65128
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you are asking. Are you wanting to know how to simply iterate over a list or array passed to the page? Or how to shuffle their order around once the images are loaded?
 
Bhavik Patel
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to shuffle the images once they are loaded .I will have two buttons UP and Down so it will shuffle the images in that manner...
 
Bhavik Patel
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to pass the Array in request like is it possible xyz.jsp?array=${arr}
where arr is array of integers
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic