Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Accessing JspContext in tag files

 
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
 
Author
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
 
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic