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

Accessing JspContext in tag files

 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

On p510 of HFJS it says that one can access a JspContext in a tag FILE (no discussion of simple or classic tags yet). But it doesn't say how. Do they mean to use the ${pageContext} implicit EL object? Or is there another way it should be done in a tag file?

Thanks!
John
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Confusingly, it's the "jspContext" implicit object in tag files, since "pageContext" doesn't exist there... so you'd need ${jspContext}.

BTW, it's almost always a PageContext object anyway... for some reason the guys at Sun thought JSP technology might be used on platforms other than Java Servlets, so created the super-class JspContext. In reality, is that likely to happen?!
[ December 06, 2008: Message edited by: Charles Lyons ]
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Charles.

By the way I'm also using your book as study prep material. It's well written and the practice questions have refined my knowledge I believe.

John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic