Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help on SimpleTag

 
Saira Murty
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we access request object in the doTag() of a class extending SimpleTagSupport??
This is in reference of HF final mock test , question no 25,page 811
The ans of which appears to be wrong.
The ans is as below

((PageContext)getJspContext()).getRequest()

If the ans is correst, please explain.
 
kapil munjal
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think we can access it but no idea how to access is exactly..

kapil
 
Bassam Zahid
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes the HFS statement is correct.

For your information, PageContext extends JspContext.

So the way given in book is correct to access request object.
 
janne s
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI!

check the API of JSp Context and Page Context
there is getRequest() method.
Answer is correct in HFS Book.


jaya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic