• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mock exam question on filters

 
vijaya bacina
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • 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???
 
Rizwan Mohammad
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic