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

ServletRequest / HttpServletRequest

 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Please verify the Answer to the question below is (3). According to me , the answer should be (4) since in a JSP the implicit object available is HttpServletRequest and not ServletRequest.
Question:
For the JSP scopes of request and page, what type of object is used to store the attributes?
Choices
1.HttpServletRequest and ServletContext
2.ServletRequest and ServletConfig
3.ServletRequest and PageContext
4.HttpServlerRequest and PageContext
5.ServletConfig for both
Answer : 3
 
Dong Shing
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is 3. ServletRequest declares getAttribute and setAttribute method. HttpServletRequest inherits those object containing methods from ServletRequest object.
 
ravi janap
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dong
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic