Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Head First 2nd Edition Ch7 #14 Mock Exam P.341 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 "Head First 2nd Edition Ch7 #14 Mock Exam P.341" Watch "Head First 2nd Edition Ch7 #14 Mock Exam P.341" New topic
Author

Head First 2nd Edition Ch7 #14 Mock Exam P.341

Felix Li
Ranch Hand

Joined: Jul 09, 2008
Posts: 38
Would like to know if the correct answer for C should be:

javax.servlet.ServletContext
javax.servlet.jsp.JspWriter
javax.servlet.http.HttpServletRequest
javax.servlet.http.HttpServletResponse
javax.servlet.http.HttpSession

instead of:

javax.servlet.ServletContext
javax.servlet.jsp.JspWriter
javax.servlet.ServletRequest
javax.servlet.ServletResponse
javax.servlet.http.HttpSession

Thanks


FL<br /> <br />SCJP,SCWCD
Rufus Addis
Ranch Hand

Joined: Aug 21, 2008
Posts: 83
I'd agree with you, as the implicit request / response objects in JSP have to be of the http variety!

Worth submitting as an errata:

http://oreilly.com/catalog/9780596516680/errata/

Rufus.
Felix Li
Ranch Hand

Joined: Jul 09, 2008
Posts: 38
Thanks Rufus, I just did.
Ranil Liyana Arachchige
Ranch Hand

Joined: Sep 20, 2008
Posts: 71

Hi,

I think the answers are correct, the mock exam question asks for the types of the jsp implicit objects,so in that case , request , response are types of javax.servlet.http.HttpServletRequest , javax.servlet.http.HttpServletResponse respectively. But those are protocol dependent sub types of the super type javax.servlet.ServletRequest , javax.servlet.ServletResponse. please refer to the JSP 2.0 spec section 1-41. it clearly explains that.

hope this would be helpful

regards,
Ranil


SCJP 1.4 (80%) , SCWCD5.0 (91%) , SCEA / OCMEA
Felix Li
Ranch Hand

Joined: Jul 09, 2008
Posts: 38
Interesting, you are right Ranil.

Thanks for clearing up.
Ranil Liyana Arachchige
Ranch Hand

Joined: Sep 20, 2008
Posts: 71

no problem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head First 2nd Edition Ch7 #14 Mock Exam P.341
 
Similar Threads
implicit objects in jsp
mock exam question
which classes r imported automatically for JSP pages
variable doesn't increment
weblogic7.0 server crashes