• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pageContext

 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Please verify the anwser to this question is (1) since whatever attributes are available in request, session and application is automatically available in pageContext.
pageContext < request < session < application (servlet context)
In your JSP page, you know that an attribute with the name "userid" will be available in any one of the context, session, and request scopes. But you do not know exactly where will it be available. Which of the following implicit variables can you use to retrieve its value?
1.pageContext
2.application
3.config
4.request
5.session
Thanks
Ravi
 
Dong Shing
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
findAttribute() method on PageContext object.
This method searches for the named attribute in page, request, session, and application scope in this order and return the associated value.
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dong!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic