Reputation: 361
I am creating Map with data when the 1st request coming to servlet, then return it to JSP page, from that JSP page there is a another request coming to servlet and i want to have early created Map with data when 2nd request came, otherwise i have to load data again to new Map,
Is there any way to do this ? , i cant parse Map objects via HTTP request and i'am using Java
Thanks
Upvotes: 0
Views: 54
Reputation: 49372
There are three ways I can think of :
request
scope and forward
the requests using RequestDispatcher
. This won't work if the requests are not forwarded and a new request is created.session
scope , the data will be valid through out the session for a particular client.ServletContext
attribute , visible to all requests, sessions and throughout the web app.Upvotes: 1