tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Using custom CoyoteResponse(Facade)
Date Fri, 17 Sep 2004 12:37:29 GMT

Why not use an HttpServletResponseWrapper?  You can easily wrap whatever
responses you want with a Filter, and then implement the encodeURL
method however you want.

I think the design itself is cruising for a bruising, as is the case any
time you deviate from Servlet Spec mandates on session tracking, but I
imagine you already know that and have no choice.

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Markus Krogemann []
>Sent: Friday, September 17, 2004 8:32 AM
>To: Tomcat Users List
>Subject: Using custom CoyoteResponse(Facade)
>Dear List,
>I am having a hard time to figure out how I could fulfill a special
>requirement in a current project.
>I could use either tomcat 4.1.x or tomcat 5.0.x for this project, I
>presume it doesn't make much difference in terms of possible solutions.
>The project also uses struts (1.2.2) and here is the special
>requirement: Instead of encoding URLs with "our" tomcat's session Id I
>have to use the session Id from another server to encode the URL, since
>all URLs first call that other server which then includes stuff from
>"our" tomcat. Hope that description was clear ...
>Anyway, what I would like to do is somehow "smuggle" a response object
>into a request/response pair that could then have it's own encodeURL
>implementation. I don't really want to patch tomcat if possible and I
>also don't want to extend many struts classes which would be another
>solution. Anyone got an idea?
>I have tried to use dynamic proxies (creating proxies for
>CoyoteResponseFacade objects) but that didn't appear to work (invoke
>would not get called on the proxies).
>I also had a look at the option to wrap my own implementation of
>HttpServletResponse around the CoyoteResponseFacade, but that also
>didn't get me very far. I was hoping that the .setResponse method of
>CoyoteRequest could help, but I cannot get to a CoyoteRequest object,
>only to a CoyoteRequestFacade object. Hm ...
>If all else fails, I guess I will have to patch tomcat.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message