• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EPractice Lab mock exam 3 HttpServletRequestWrapper modify the header of a request?

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Which of the following statements are true about HttpServletRequestWrapper class?
Choose 3
A. The HttpServletRequestWrapper is an example of the wrapper pattern.
B. The HttpSerlvetResponseWrapper is an example of decorator pattern.
C. HttpServletRequestWrapper can be used to extend the functionality of a servlet request
D. HttpServletRequestWrapper may modify the header of a request within an object implementing the javax.servlet.Filter interface.


Given answers are A, B, D.
But I think it should be A, B, C.
For D, from HttpServletRequestWrapper API, I don't see any setter to modify a header of a request.

In HttpServletResponseWrapper API, I see setHeader method to modify the header of a response.
I think C is correct because the wrapper decorates the request.
reply
    Bookmark Topic Watch Topic
  • New Topic