• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ServletContext, PageContext HttpSesstion and HttpServletRequest

 
Richard Teston
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic