Using jsessionid in the URL (aka url rewriting - servlets jargon) is
about turning off cookies in container. I think with Jetty you can do
this from /WEB-INF/jetty-web.xml. Something like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
    "http://jetty.mortbay.org/configure.dtd";>
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
    <Get name="sessionHandler">
        <Get name="sessionManager">
            <Set name="usingCookies" type="boolean">false</Set>
        </Get>
    </Get>
</Configure>


Once you do this, jsessionid will automatically be used in all urls
and the JEE container will not send down jsessionid cookie. So you
don't need to manually put jsessioid in urls.

Br's,
Marius

On Dec 31 2009, 10:03 pm, Jonathan Hoffman <jonhoff...@gmail.com>
wrote:
> Hi,
>
> I'm using a flash upload widget to post to a Lift mapped function 
> ("/ajax_request/name/;jsessionid=xxxxx").  That works fine, but there is a 
> bug in flash on windows where it decides to send over cookies which were 
> created in IE regardless of what browser you are now using.  This causes the 
> JSESSIONID cookie to be sent to the server which is not associated with the 
> current browser's session. That cookie seems to take precedence over the 
> jsessionid in the URL which means that Lift does not find the function 
> associated with the parameter.
>
> Is there a way to tell Lift, or Jetty, that jsessionid should take 
> precedence?  or is there a way to hook in very early in the request cycle to 
> allow filtering out cookies from the request?
>
> Also, is there an easy way to wrap a url with the correct "jsessionid" 
> parameter.  Currently I'm doing it manually: 
> ";jsessionid="+S.containerSession.map(_.sessionId).openOr("").  That sort of 
> works, but I've noticed that the url is missing .<WorkerName> piece of the 
> sessionId that Jetty appends to do allow load balancing to work correctly.
>
> Thanks,
>
> Jon

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to