Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

group by records in jsp  RSS feed

 
pari kurt
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am populating beans using rows in the database.I put these bean objects in a Vector and pass this vector to jsp.I would like to do a group by on one of the bean property
example
Product
Filename1 Size
FIlename2 Size2
Filename3 Size3
Product2
Filename4 Size5
Filename5 Size6
Howdo I acheive this??
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36622
474
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pari,
Not really a JDBC question, but you need to sort your records by product. Then you can see when the product changes and print a header.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!