Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with jsp while displaying records in html table  RSS feed

 
sirisha makkapati
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • 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
 
Lave Kulshreshtha
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thank you very much lave,its working.
 
Lave Kulshreshtha
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!