users@glassfish.java.net

Re: Custom cookiepath for session

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Mon, 23 Mar 2009 12:30:26 -0700

Hi "profiler",

On 03/20/09 07:17 PM, glassfish_at_javadesktop.org wrote:
> Hi Jan,
>
> Thanks a lot for the help. After looking at this we are planning on doing the following:
>
> Change the method protected void configureSessionCookie(Cookie cookie) in:
> http://fisheye5.cenqua.com/browse/glassfish/appserv-webtier/src/java/org/apache/coyote/tomcat5/CoyoteRequest.java?r=1.68&%40annotateMode=none
>
> We will override how it sets the path, then patch the jar we are using.
>
> I looked around and couldn't find a way of specifying the CoyoteRequest or CoyoteConnector classes, the latter of which is built via reflection and a magic string in the sourcecode. A simpler method would be to extract the string into a glassfish property where we could specify our own connector via the interface. Is this feasible for inclusion into glassfish itself?
>

Alternatively, we could build on top of what I describe here:

  http://blogs.sun.com/jluehe/entry/glassfish_support_for_cookie_less

What you are trying to accomplish could then be implemented as follows:

1. I will add a method "setRequestedSessionCookiePath" to Request.java

2. You implement and configure a valve similar to what I show in my
    blog, except that instead of calling setRequestedSessionId, you
    call the new setRequestedSessionCookiePath.

3. If the request that was intercepted by your valve initiates a session,
    and cookies are enabled, the container will honor the cookie path
    set by your valve.

Let me know if you would be interested in pursuing this approach.

Thanks,


Jan

> [Message sent by forum member 'profiler' (profiler)]
>
> http://forums.java.net/jive/thread.jspa?messageID=338262
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>