aspose file tools*
The moose likes Servlets and the fly likes Question about HttpRequestWrapper and HttpResponseWrapper Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Question about HttpRequestWrapper and HttpResponseWrapper" Watch "Question about HttpRequestWrapper and HttpResponseWrapper" New topic
Author

Question about HttpRequestWrapper and HttpResponseWrapper

Benny Tang
Greenhorn

Joined: Aug 03, 2003
Posts: 26
Hi All,
I want to ask what is the use of the class javax.servlet.http.HttpServletRequestWrapper and javax.servlet.http.HttpServletResponseWrapper? As I seldom use these classes. Can anyone tell me their usage ?
Thanks,
Benny
j2eelearner
Greenhorn

Joined: Dec 02, 2003
Posts: 2
I think they are both implementing exact things as request/response do, the advantage is that they are applying wrapper design pattern. As of the advantage of wrapper, you can check j2ee design pattern.
Thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12779
    
    5
People use these to implement special handling of things you can't normally get at. For example, one person wanted to substitute values in response headers. See also the javax.servlet.Filter and related interfaces.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about HttpRequestWrapper and HttpResponseWrapper