Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

group by records in jsp

 
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
Sheriff
Posts: 35977
422
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!