File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ: Ch 6 Mock Question Correct? 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 "HFSJ: Ch 6 Mock Question Correct?" Watch "HFSJ: Ch 6 Mock Question Correct?" New topic

HFSJ: Ch 6 Mock Question Correct?

Manuj Bawa

Joined: Dec 13, 2004
Posts: 7

I was going through the mock and found the question 1 of CH 6 mock exam (pg 265) confusing:

The method doGet declares input arguments as "req" & "res" but accesses "request" in the next few lines of code. Is this correct? according to me there should be no correct answer and uncommenting anything will result in compile time error.

Can the method declare the argument names as something else and still access "request" like in the following code?

Is the above correct?

Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 951

I think it is typo. It should be req.getSession...


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
Check out the errata session Here
[ November 13, 2005: Message edited by: Vishnu Prakash ]

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Kuppusamy Venkatasubramanian
Ranch Hand

Joined: Dec 30, 2004
Posts: 91

The errata confirms that it should be req and res and not request and response.


SCJP1.4, SCBCD 1.3, SCWCD 1.4, SCEA 5, JLPT-N3
My Blog
Chris Jak

Joined: Jul 25, 2005
Posts: 20
Can somebody please show me where I can find the errata for the HFSJ book?
Radhika Jonnalagadda
Ranch Hand

Joined: Oct 13, 2004
Posts: 89
Hey Chris,
This is the link for ERRATA.

best regards,<br />Radhika<br /> <br />Dare to Dream.Care to Achieve.<br />SCJP 1.4, SCWCD 1.4.
Chris Jak

Joined: Jul 25, 2005
Posts: 20
Thanks Radhika. After posting the question, I realized I should have searched the forum before posting. I found a lot of threads with the link.
I agree. Here's the link:
subject: HFSJ: Ch 6 Mock Question Correct?
It's not a secret anymore!