Hi Mark,
I'll repeat what I said in my
earlier
response. You are not giving much
information about what you are doing.
You do mention making "database
queries".
Lets assume you are accessing a DB
with
sequel. In that case you can perform the
following
type of query:
select * from some_table where primaryKey > min
and primaryKey <= max;
Where min and max are limits you set.
This would return a range of records between min
and max, including max.
Translating into servlets:
A design that comes easily to mind
would
use a controller servlet and a JSP
page.
The controller is going to receive a POST from
a webpage... The controller doesn't do
anything,
just redirects output and passes on
parameters.
form --> params( min, max) -->
controller.
The controller redirects output to a
JSP:
controller -->
sendRedirect("/some.jsp?min=101&max=200");
The webpage is going to be produced as
output
from a JSP called some.jsp:
JSP --> (current data, 101 through 200) and
new form with code for next set of data.
...
current data
...
<form action="/servlet/Controller"
method="POST">
<input type="hidden" name="min"
value="<%=min%>">
<input type="hidden" name="max"
value="<%=max%>">
<input type="submit" value="Get next one hundred entries">
</form> If this doesn't make any sense you might want
to
read up on the technology before going much
farther.
A good start would be Java Servlet Programming
by Hunter and Crawford.
Dave
|
- Re: Building output page by page. Mark Koscak
- Re: Building output page by page. Dave Smith
- Re: Building output page by page. Mark Koscak