scope = "session" means throught the application ( till the session gets expired). Your can keep the values in session no matter how many JPSs you are visiting of that application. It remains there in session until you close your browser.
scope="request" means for that particular action only you are keeping the values. In this if you call another action or redirects to another JSP , it gets removed.
Another difference is that :- request - Beans that are visible within a single JSP page, as well as to any page or servlet that is included in this page, or forwarded to by this page. (Request attributes)
session - Beans that are visible to all JSP pages and servlets that participate in a particular user session, across one or more requests. (Session attributes)
Krish Khan wrote:Its giving me performance issue . So can i try request?
It is highly unlikely that will matter. The only way session matters is if:
1) you are storing so much in it that you are running out of memory
2) you have session replication enabled and are transferring the session across the network
It is much more likely the bottleneck is in the database or file processing layer. I recommend profiling or at least adding some printlns.