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 HFSJ: Ch 6 Mock Question Correct? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
Author

HFSJ: Ch 6 Mock Question Correct?

Manuj Bawa
Greenhorn

Joined: Dec 13, 2004
Posts: 7
Hi,

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?

Thanks,
Manuj
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi,

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


Thanks


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
Hi,

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

Regards,
SAM..


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

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.
http://www.oreilly.com/catalog/headservletsjsp/errata/headservletsjsp.confirmed


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

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.
 
jQuery in Action, 2nd edition
 
subject: HFSJ: Ch 6 Mock Question Correct?
 
Similar Threads
Does setStatus on response object trigger the error page mechanism ?
Question Bank ID : 6
service method...
JwebPlus:Question ID :994872851531
doubt in http methods