File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Does a Tag file have a ServletContext? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Does a Tag file have a ServletContext?" Watch "Does a Tag file have a ServletContext?" New topic
Author

Does a Tag file have a ServletContext?

Xiaoxiao Lam
Greenhorn

Joined: Mar 04, 2006
Posts: 27
Hi,
On HFSJ Page 500, Second paragraph, it says: You don't have a ServletContext, though--a Tag File uses a JspContext instead of a ServletContext.

But I know Tag File has following implicit objects:
out, request, response, session, application, config and jspContext

And application is of Type ServletContext. Tag File doesn't have pageContext, instead it has jspContext. Is it a typo on the book?

Please help me! Thank you.


SCJP 1.4<br />SCWCD 1.4
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I don't own the book. How is it written exactly ?


[My Blog]
All roads lead to JavaRanch
Xiaoxiao Lam
Greenhorn

Joined: Mar 04, 2006
Posts: 27
Originally posted by Satou kurinosuke:
I don't own the book. How is it written exactly ?


It's written:

Q: does the Tag File have access to the request and response implicit objects?

A: Yes! Remeber, even though it's a .tag file, it's gonna end up as part of a JSP. You can use the implicit request and response objects (if you do scripting..the normal EL implicit objects are always there as well), and you have access to a JspContext as well.

You don't have a ServletContext, though -- a Tag File uses a JspContext instead of a ServletContext.


--------It's exactly like this. Please let me know what you think. I will take the exam tomorrow... Thank you..
[ March 16, 2006: Message edited by: Xiaoxiao Lam ]
 
Consider Paul's rocket mass heater.
 
subject: Does a Tag file have a ServletContext?