• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL Query

 
Ashu Jain
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read that to get request URI from EL.
we use

${pageContext.request.requestURI}.

My query is . Can we not use ${requestScope.requestURI}. When do we use requestScope and when request object( obtained via pageContext ).

Please help.
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When do we use requestScope


to get the attributes bound to the request scope . It's a map containing all the attributes bound to request scope.

when request object( obtained via pageContext ).


when you need to access the request object's properties.
 
Ashu Jain
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm. So pageScope does not have properties. Apologies for my confusion. I just started preparing for the exam.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic