Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ: Ch 6 Mock Question Correct?

 
Manuj Bawa
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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


Thanks
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the errata session Here
[ November 13, 2005: Message edited by: Vishnu Prakash ]
 
Kuppusamy Venkatasubramanian
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Regards,
SAM..
 
Chris Jak
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody please show me where I can find the errata for the HFSJ book?
 
Radhika Jonnalagadda
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Chris,
This is the link for ERRATA.
http://www.oreilly.com/catalog/headservletsjsp/errata/headservletsjsp.confirmed
 
Chris Jak
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic