Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

mock exam question on filters

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which three are true about the HttpServletRequestWrapper class?
(Choose three.)
A. The HttpServletRequestWrapper is an example of the Decorator
pattern.
B. The HttpServletRequestWrapper can be used to extend the
functionally of a
servlet request.
C. A subclass of HttpServletRequestWrapper CANNOT modify the behavior
of the
getReader method.
D. An HttpServletRequestWrapper may be used only by a class
implementing the
javax.servlet.Filter interface.
E. An HttpServletRequestWrapper CANNOT be used on the request passed
to the
RequestDispatcher.include method.
F. An HttpServletRequestWrapper may modify the header of a request
within an
object implementing the javax.servlet.Filter interface.

I dont know the answers....
i guess A,B,D.... Am i right???
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I say only A, B are correct. D is incorrect according me, as wrapper can be used by any other class not only by filter implementing class, though we use mostly in filter implementing class. But no one restricts me from doing this.
 
reply
    Bookmark Topic Watch Topic
  • New Topic