• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple JSESSIONID cookies getting created

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have an application running on Weblogic 9.2.

The url of my application is something like http://abc.xyz.com/freeR/xxxx.action.

I have a requirement to write the JSESSIONID cookie under the .xyz.com domain.


I created a servlet filter "MyFilter" which creates the JSESSIONID cookie under the ".xyz.com" domain.

This is the mapping in my web.xml

I set the cookie value with

Now, the issue is when I run the above url , I can see two JSESSIONID cookies getting created .

So, for e.g. if session.getId() returns 4WhSMLrfpGBG1xx5TpmPJ2C7msBL5g2wXngkD1pGgQm6tl7Y17RT!-288131970!1288186719727

one cookie gets created under abc.xyz.com with the value 4WhSMLrfpGBG1xx5TpmPJ2C7msBL5g2wXngkD1pGgQm6tl7Y17RT!-288131970
and the other JSESSIONID cookie gets created under .xyz.com with the value 4WhSMLrfpGBG1xx5TpmPJ2C7msBL5g2wXngkD1pGgQm6tl7Y17RT!-288131970!1288186719727

The difference in the value of the cookies is the last part (!1288186719727 in this case)

Is there a way I can restrict the cookie from being created under abc.xyz.com and secondly why are the values different in both the cookies( only the last part after the ! is different)?


Thanks in advance .

-Sudarshan

 
reply
    Bookmark Topic Watch Topic
  • New Topic