I think this is a weird requirement, and it may be worth re-evaluating why you want to know this (are you fighting the technology, or leveraging it?). But here are two tips that might help if you decide that you really need to know:
1. request.getPathInfo() -- the jsessionid might be a "pathInfo" thing. 2. see if the full URL contains your jsessionid, or even just the string "jsessionid". -Max On Wed, 2005-06-15 at 21:51 -0700, Michael Jouravlev wrote: > On 6/15/05, Dave Newton <[EMAIL PROTECTED]> wrote: > > David G. Friedman wrote: > > > > >See the HttpServletRequest API for these methods: > > > > > >boolean isRequestedSessionIdFromUrl() (pre 2.1) > > >boolean isRequestedSessionIdFromURL() (2.1 or later) > > >boolean isRequestedSessionIdFromCookie() > > > > > > > > This answer is better than mine :) > > Was celebrating too early. Does not work. Here what happens. > * Very first request to the app. Session is created on server. > * Application redirects to whatever location, server sets cookie with > jsessionid in the response, and at the same time adds jsessionid to > the URL > * Browser navigates to the redirected location, it replies with > jsessionid in the cookie, so next time server won't rewrite URL. > But!!! There is another jsessionid, which was appended to the URL in > the redirected request. I want to detect this one. > > The problem is, that redirected request contains *both* session ID in > cookie and session ID in the rewritten URL. Stupid > isRequestedSessionIdFromURL() returns false, because it thinks that I > should be happy by isRequestedSessionIdFromCookie() returning true. > > But I want to know both pieces of info: that there is session ID in > the cookie, and that there session ID in the URL! > > getQueryString() returns null, because session ID is not treated as > regular query parameter. > > iamsad. Michael. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]