• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with jsp while displaying records in html table

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to all,

I am having a html table in my jsp with n number of records.i wanted to devide this table into two tables and i wanted to display first n/2 records in first table and next n/2 records in second table.
My records are atored in HashMap.

any one please give me the code for this
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this.

noOfRec = haspMap.size();
noOfRecByTwo = noOfRec/2;
for(int i=0; i<=noOfRecByTwo;i++) {
//1st table
}

for(int i=noOfRecByTwo+1; i<noOfRec;i++) {
//2nd table
}


-Lave

Originally posted by sirisha makkapati:
Hi to all,

I am having a html table in my jsp with n number of records.i wanted to devide this table into two tables and i wanted to display first n/2 records in first table and next n/2 records in second table.
My records are atored in HashMap.

any one please give me the code for this

 
sirisha makkapati
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much lave,its working.
 
Lave Kulshreshtha
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sirisha
Can you please close this topic, if this is working.

-Lave

Originally posted by sirisha makkapati:
Thank you very much lave,its working.

 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lave Kulshreshtha:
Can you please close this topic, if this is working.


Why would you request that he close the topic?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic