If not, I recommend reading up on that first. Most books that explain JSPs/Servlets begin with a couple chapters on how requests/responses work and how to use them in J2EE.
If you already understand requests, well, you probably wouldn't need to ask this question. [ July 28, 2006: Message edited by: Marc Peabody ]
A good workman is known by his tools.
posted 10 years ago
Well, as Marc said first you need to understand what request is.
If you know already what request is.. Request can go over multiple servlets and pages(by forwarding one to another). Request scope attribute has the lifetime as long as that request is available. Page scope attribute is available only in that particular page and not available through out the request. You can think page attribute as still smaller scope than request.
There is no rule which says in which scope we need to have attribute value. It all depends on your application logic. You may probably store common attributes to entire applicaiton such as application name or admin email etc., in applicaiton scope. user name and user locale etc., in session scope. user entered values specific to screen in request scope. HTH
SCJA, SCJP, SCWCD, SCBCD, SCDJWS.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads