You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by James Cook <ji...@iname.com> on 2000/10/03 02:49:46 UTC

Too late to change ServletResponseWrapper?

It would be very convenient if there was a setResponse(ServletResponse
response) method include in javax.servlet.ServletResponseWrapper. This would
allow it to be used in a pooling mechanism. It can be a resonably expensive
object to create per request (or multiple times per request), especially
because subclasses may add alternative ourput/input streams to the subclass.

jim


Re: Too late to change ServletResponseWrapper?

Posted by James Cook <ji...@iname.com>.
Thanks Craig,

I also just added the following suggestion as well:

==================
It would be advantageous if I can modify a cookie object by changing the cookie
name. In order to currently change a cookie's name, I have to create a new
Cookie(), then populate all of the setters based on the getters of the original
cookie. This is very cumbersome.

I would rather see Cookie implement clone() and a setName(String name) method.
==================

These ideas are not very common, but when you are intercepting calls to
ServletResponse (via the new wrapper classes in 2.3), there are times when you
want to override the name of a cookie, parameter, or header.

jim

----- Original Message -----
From: "Craig R. McClanahan" <Cr...@eng.sun.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, October 03, 2000 1:23 PM
Subject: Re: Too late to change ServletResponseWrapper?


> James Cook wrote:
>
> > It would be very convenient if there was a setResponse(ServletResponse
> > response) method include in javax.servlet.ServletResponseWrapper. This would
> > allow it to be used in a pooling mechanism. It can be a resonably expensive
> > object to create per request (or multiple times per request), especially
> > because subclasses may add alternative ourput/input streams to the subclass.
> >
> > jim
> >
>
> Since this is a spec related issue, I've forwarded this idea (which sounds
> pretty good on the surface, but haven't thought all the way through it yet) to
> the spec feedback address.  Any further suggestions for improving the servlet
> API itself can be directed to:
>
>     servletapi-feedback@eng.sun.com
>
> Craig
>
> ====================
> See you at ApacheCon Europe <http://www.apachecon.com>!
> Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
> Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
>                                     Applications to Tomcat
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


Re: Too late to change ServletResponseWrapper?

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
James Cook wrote:

> It would be very convenient if there was a setResponse(ServletResponse
> response) method include in javax.servlet.ServletResponseWrapper. This would
> allow it to be used in a pooling mechanism. It can be a resonably expensive
> object to create per request (or multiple times per request), especially
> because subclasses may add alternative ourput/input streams to the subclass.
>
> jim
>

Since this is a spec related issue, I've forwarded this idea (which sounds
pretty good on the surface, but haven't thought all the way through it yet) to
the spec feedback address.  Any further suggestions for improving the servlet
API itself can be directed to:

    servletapi-feedback@eng.sun.com

Craig

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat