caching XML with JSP

I am writing a web application which grabs XML over HTTP.  The way I am approaching it is that

1-I get the XML over HTTP
2-parse the XML and process it
3-put the processed data  into an ArrayList (approximately 3000 results per request)
4-Then  display the result on JSP like 10 results per page
what happens that  step 1->4 repeat every time I move to next 10 results. Is there any way that my JSP simply pulls stuff from the Array List and dont have to do the parsing  and prcessing over and over ocz it takes v v long this way . If caching is the answer how do i  do it ?
LVL 2
mostenscerAsked:
Who is Participating?
 
bloodredsunConnect With a Mentor Commented:
Just use JSTL's <c:set> tag to store something in the session.

<c:set var="myXmlVar" scope="session">
//Stuff goes here
</c:set>


When you call the arraylist stored in the session, first check if it is empty. If it is empy then retrieve the xml via HTTP. If it is not empty then just use it.
0
 
marklorenzCommented:
There are multiple ways to handle this.  One way is to cache the list in the application or session object, along with an indication of where you are in the list. Here is where it's described:

Using JSP Variables to Cache Dynamic Content
http://www.onjava.com/pub/a/onjava/2005/01/05/jspcache.html
0
 
mostenscerAuthor Commented:
I am not looking fwd to something other than JSTL
0
 
mostenscerAuthor Commented:
Correction: i am looking fwd to some thing other than JSTL
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
All Courses

From novice to tech pro — start learning today.