Friday, January 28, 2005 01:38 PM
I am new to struts and JSP and am working on an application that accesses a database and returns multiple records as DTOs (class name "Annotation")into an ArrayList.
Within my Action class:
ArrayList resultList=new ArrayList();
resultList= dataAccessObject.getRecords(); // returns an ArrayList of Annotation" objects
The ArrayList is then placed as an attribute in the session object:
I then access the ArrayList in the JSP page. as:
The above code works fine, however several hundred results can be returned and I would like to view/navigate around 20 of them at a time (similar to google results). I am familiar with the
tag's 'offset' and 'length' attibutes and am wondering what the best approach would be to dynamically set this value. I would be open to completely different approaches to solving this problem as well and appreciate any suggestions.
Re: How would one view multiple database records over several pages instead of one?
Saturday, January 29, 2005 07:55 AM