Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HF book ~ page222 Answer for Question 14

 
Lee Kian Giap
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer given by the HF book on pg222 for Question 14 stated that getContextPath() is a method of ServletContext.

I check from J2EE1.4 api doc , the method is not under ServletContext but HttpServletRequest.

However, when I check Java EE 5 api doc , the method is under ServletContext AND HttpServletRequest.

May I know which version does the exam follow ???

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this FAQ. It's J2EE1.4. (yes, that's confusing)
 
Lee Kian Giap
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the exam is follow J2EE1.4, the answer given in the HF book is wrong , the method getContextPath() should not be included under the ServletContext

can anyone clarify this ?
 
Lee Kian Giap
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone clarify this ?
 
Harvinder Thakur
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are right. Servlet 2.4 specs does not have getContextPath() as a method under ServletContext. It should be marked as an HFSJ Errata.
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh it's an errata....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic