Hi Matthias - Unfortunately I think the Response class is just as ill-suited
for wrapping/extending as the Request class is.  Which boggles my mind -
isn't wrapping the Request and/or Response one of the primary intended
usages of Filters & Valves?  The Servlet API provides
HttpServletRequestWrapper and HttpServletResponseWrapper just for that
purpose.  But because Tomcat adds a ton of extra stuff in their Request &
Response implementations those wrappers are useless.

Thanks,
Zach



Reich, Matthias wrote:
> 
> Hi,
> 
> I haven't thought about the idea in detail, but would it be possible to
> wrap the response?
> The wrapper would have to ensure that cookie replacement is applied
> before any data is written to the output stream or writer.
> A remaining issue would be that encoded (redirect-) URLs in the response
> must also be modified.
> 
> -- Matthias
> 
> -----Original Message-----
> From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 23, 2008 9:51 PM
> To: Tomcat Users List
> Subject: Re: Share session cookie across subdomains
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Zach,
> 
> Zach Cox wrote:
> | Hi Chris - I'm not sure what this will accomplish:
> |
> | public Request(Request wrapped)
> | {
> | ~    this.wrapped = wrapped;
> | }
> |
> | public whatever doWhatever(args)
> | {
> | ~    super.doWhatever(args);
> | }
> |
> | 1) this.wrapped is never used so what's the point of saving it?
> 
> Sorry, I meant "wrapper.doWhatever(args)";
> 
> I've taken a closer look at this class and my suggestion is impossible
> as there is a final method in the class. :(
> 
> Looks like valves are not nearly as useful as they should be. double :(
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkgPkzoACgkQ9CaO5/Lv0PB1fgCgutaBFqLgjPK2H16yWJ04YxAn
> D3oAn0eLFzc8sHiWft3yKvtxFIbRLryI
> =hwi6
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Share-session-cookie-across-subdomains-tp16787390p16894923.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to