Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

Wrapper pattern in HttpServletRequest  RSS feed

 
Raj chiru
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi......
why java soft people implements the Wrapper(Decorator) pattern in HttpServletRequest object?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
For the same reason I gave when I answered your question from three days ago.
I wrote:It's a class that delegates to an underlying HttpServletRequest. It can be used in any number of ways to provide additional functionality.

For example, it could be used to handle multipart requests automatically, provide additional functionality to JSP EL (in S2, for example, we first use default attribute lookup--if an attribute isn't found we check Struts 2's value stack), and so on.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
143
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!