Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

ServletRequest / HttpServletRequest

 
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
 
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
 
    Bookmark Topic Watch Topic
  • New Topic