• 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
Posts: 3953
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.
 
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
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!