File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes ServletContext, PageContext HttpSesstion and HttpServletRequest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "ServletContext, PageContext HttpSesstion and HttpServletRequest" Watch "ServletContext, PageContext HttpSesstion and HttpServletRequest" New topic
Author

ServletContext, PageContext HttpSesstion and HttpServletRequest

Richard Teston
Ranch Hand

Joined: Feb 12, 2002
Posts: 89
Hi,
What are the difference in storing values within ServletContext, PageContext, HttpSession and HttpServletRequest? What is/are the significance of each scope in web application developing?


The Code is the Programmer
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12681
    
    5
ServletContext = all users in entire web application can use
HttpSession = only one user (typically identified by cookie) can use. An application may manage many sessions.
HttpServletRequest = data that only exists during one request for one user
PageContext = a concept that is only used in JSP for variables that don't get passed if the request is forwarded
Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ServletContext, PageContext HttpSesstion and HttpServletRequest
 
Similar Threads
Diff: JSPContext, ServletContext and PageContext
ServletContext, ServletConfig and Pagecontext
DOUBT on a question JSP SCOPES
Accessing webapp context parameters from a custom tag handler
types of implicit variabless