aspose file tools*
The moose likes JSP and the fly likes group list elements based on an element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "group list elements based on an element" Watch "group list elements based on an element" New topic
Author

group list elements based on an element

Ahsan Bagwan
Ranch Hand

Joined: Oct 05, 2010
Posts: 162
I've some code below as that I use for querying the db and obtain that in my jsp file ,



The list returned looks something like [prefix1, no1, head1, amt1, prefix2, no2, head2, amt2,]. I'm trying to make a receipt in jsp on the lines of

head1
-------------------
prefix1/no1 amt1
-------------------
prefix2/no2 amt 2
-------------------
--------------------
head3
-------------------
prefix3/no3 amt3

So I want to group all records by head column in the receipt - jsp file. How do I go about this? Any help completely appreciated. Please excuse my English.
System.out.println("cash list: "+payincash);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: group list elements based on an element