Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Help on SimpleTag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Help on SimpleTag" Watch "Help on SimpleTag" New topic

Help on SimpleTag

Saira Murty

Joined: Oct 07, 2002
Posts: 13
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


If the ans is correst, please explain.
kapil munjal
Ranch Hand

Joined: May 11, 2004
Posts: 298
I think we can access it but no idea how to access is exactly..


Kapil Munjal
SCJP 1.4, SCWCD 1.4
Bassam Zahid
Ranch Hand

Joined: Mar 09, 2005
Posts: 61
Yes the HFS statement is correct.

For your information, PageContext extends JspContext.

So the way given in book is correct to access request object.

BS<br />SCJP 1.4 88%<br />SCWCD 1.4 86%
janne s
Ranch Hand

Joined: Sep 21, 2004
Posts: 81

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

Have you tried LearnNowOnline?
subject: Help on SimpleTag