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

about the exam objective

 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
The exam objective 12.8 says..
Identify methods that return an outer tag handler from within an inner tag handler ..what are thses mathods??
also what is the return value of PageContext.getOut()?
what are the methods in the custome tag handler that accesses..
1. a given JSP page's implicit variable
2. The Jsp page's attributes??
thanks in advance..
Trupti
 
suzy mac
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pass Java before the end of the year score 85% and up. if you need help send an email. we can help you pass in no time.
 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is wrong with my questions??
thanks,
Trupti
 
AJAY RANA
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Nigam ,
I think the answers are :
1.Identify methods that return an outer tag handler from within an inner tag handler
--TagSupport.findAncestorWithClass(Tag,class)
-- getParent()
2.the return value of PageContext.getOut()--JspWriter
what are the methods in the custome tag handler that accesses..
1. a given JSP page's implicit variable-- setPageContext(PageContext pc)
I couldn't understand what do u mean by Jsp page attribute .If that is about other implicit variables then u can use the methods of class PageContext and access them from Tag Handler class.U already have pageContext implicit variable
from setPageContext method.
But if u mean Custom Tag's attributes then we have other classes like TagExtraInfo and 2-3 others which can help u know more about Tag attributes.
Regards,
Ajay Rana
SCJP,SCWCD
 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks AJAY..
Trupti
 
Maha Annadurai
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are several utility methods availabe in PageContext to get a jsp page's implicit vars like 'request' / 'response' /'session' etc.
Some examples ,
pageContext.getRequest();
pageContext.getResponse();
pageContext.getSession();
Regardng your other question, how to retrive page's attribures, there is again a util method for this.
pageContext.getAttribute("name",PageContext.PAGE_SCOPE);
regards,
Maha Anna
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic