Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Which implicit objects can be accessed by a simple tag handler?  RSS feed

 
Florian Heinisch
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I read in Sun's J2EE� 1.4 Tutorial that a simple tag handler class has access to all implicit objects. The tutorial states at http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags7.html:

"[...] the JspContext object provides access to implicit objects. PageContext extends JspContext with servlet-specific behavior. Through these objects, a tag handler can retrieve all the other implicit objects (request, session, and application) that are accessible from a JSP page [...]"

Well, I had a look at the JspContext class in the J2EE-API. I do not understand how the simple tag handler can have access to all 9 implicit objects (in particular the objects config, exception and pageContext). Although I had a thourough look in the JSP 2.0 spec and searched throughout the web I could not find any confirmation for that statement.

I really would apreciate if anybody could provide some clarification on this topic!

Thanks in advance,

Florian
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PageContext extends JspContext with servlet-specific behavior.


Did you look at the PageContext API? There you will find what you seek.

Btw, you need to upcast the JspContext to PageContext to use it as such.
 
Florian Heinisch
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Bear,

Btw, you need to upcast the JspContext to PageContext to use it as such.


Thanks a lot for this hint! I am sorry, I did not think of upcasting
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!