• 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

Pagebreak in JSP Page

 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers
I'm doing project in jsp oracle.. in a search query it retieves datas from the database and display in the jsp page .. inside a <table>

there are 30 records in the database.. and all the records are displaying when i run the query..
It is a status report.

so when i want to print the jsp page.
the page layout is not good.. the last line in the first page and the first line in the second page is not properly comming.

is it possible to put a page break

like this
--------------------
<table>
<tr>
<td>Name</td>
<td>Age</td>
</tr>
<tr>
<%
int i=1;
while(rs.next())
{
String name = rs.getString(1);
String age = rs.getInt(2);
i++;
%>
<tr>
<td> <%= name%> </td>
<td> <%= age%> </td>
</tr>
<%
if(i==15)
{ i=0;
%><pagebreak>
<%
}
----------------------------------------------------------
is something like this is possible
i've given <br><br> like this
but the 3rd page is not comming..
is there any possible way to print the datas in format!!
please help me!!
ranchers
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Arvind,

You can use CSS styling



Note: If in case you want to enhance your UI and display say 10 records initially and display next set of records on click of "Next" or "Previous" link, you can do so by implementing Iterator pattern and use IFrames with in the page. However, this would involve additional coding and it depends what you are trying to generate as output.

Regards,
~Krithika
 
Sheriff
Posts: 67746
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
Moved to the HTML forum.
 
reply
    Bookmark Topic Watch Topic
  • New Topic