Checkout the TableView component from TICL (http://www.kobrix.com). It's got automatic paging and a search engine-like pager as well.
There's an example on the site under the menu TICL->Examples of the tableview stuff. When I use it, I do the query to the DB on every request, but I'm sure you can store the results in the session and pass to the tableview as well. John ----- Original Message ----- From: Luca Ventura <[EMAIL PROTECTED]> Date: Thu, 9 May 2002 10:54:21 +0200 To: [EMAIL PROTECTED] Subject: How can I show some results at a time? > Hello everybody! > > I would like to build a jsp page that implements something like a > search-engine. After getting the results of the search I would like to show > some of them at a time like other search engines do (e.g Altavista, Yahoo, > and so on), that put them in different pages and let you to access to each > of them clicking on the number of the page you desire. How can I implement > this in a JSP page? > > In this way if I have hundreds of results I can avoid to put them in the > same page obtaining a better output. > > I have seen that when I click with the mouse on a number of the page of the > results (e.g page number "2" of 100) the other search engines send a new > request to the servlet (with a different value of the parameter that > indicates the range of the results desired)but I don't know if after > receiving it the servlet executes a new search procedure or a new access to > the database. In this case I would like to avoid to perform a new search > procedure or a new access to the database because I have already executed it > the first time, and even because I don't think this is the solution that > other search engines do. > > I think that the other search engines stores the results of the first search > in some data structure: so they scan this data structure when the must show > a particular page of the results to a user. Am I right? > > Do you have any idea on how I can implement this search engine in a > jsp-page? > > Thanks a lot in advance! > > Luca > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > -- _______________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
