Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pageContext Implicit object

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

When we already have the implicit objects, why did they provide methods for the pagecontext implicit object to get hold of other implicit objects?? Why are there methods like getServletContext(), getOut()...and so getters when I already have the application and out variables??
 
Sergio Tridente
Ranch Hand
Posts: 329
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll find them useful when using EL.

In EL there's ${pageContext} but no valid EL implicit object for out, application and other implicit objects. So if you want to access those 'missing' implicit objects you'll use PageContext's getter methods, for example: ${pageContext.out}, ${pageContext.servletContext}, etc.
[ April 23, 2007: Message edited by: Sergio Tridente ]
 
Srinivasan thoyyeti
Ranch Hand
Posts: 558
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shankar,

While designing custom tags,

through pageContext only we access all implicit objects.

See the life cycle of customs tags.
for setPageContext().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic