5

I have a weblogic 10.3.5 web app in which JSESSIONID is changing everytime the page is refreshed.This is causing the my application's context to be lost.

This only happens on Chrome and Safari, Firefox and IE work fine.

I've already tried adding a favicon and creating a context.xml but none of this solutions worked.

Any idea of what could be happening?

Here are the request and response headers :

Request headers: Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8,es-419;q=0.6,es;q=0.4
Cache-Control:no-cache
Connection:keep-alive
Cookie:token=4955000b0d09050d0d0d1b5e5c504d484e007c1b505c494f545e48515c00710d0c090f080a05081b4e584f4b545e5452007a6f7c791b5e5c534954595c59000f1b4d5c4e4e4a524f59000b040a050b580a0f0d5e0d5b0d581b50525349525453545e545c51000c0d0d0d130d0d1b5b55000d080d0c0f0d0c090c0f090a08081b49545853595c0069786e721b484f516f585a4f584e5200125c4d4d1251525a5453134555495051;sessionid=7ai6uh9itp94rjck4nx16div8fy86wo7; csrftoken=h95iaNqxKipsA35pC6N89HzZybO9fgtP; JSESSIONID=XWPvSbNTtpnPL5wyMyMQbJZYfXLxjqKXnJ1JMGqHvsryJV7Mh2sL!1610567454 Host:localhost:7001 Pragma:no-cache
Referer:<http://localhost:7001/ServicioPagos/app/index.xhtml? token=4955000b0d09050d0d0d1b5e5c504d484e007c1b505c494f545e48515c00710d0c090f080a05081b4e584f4b545e5452007a6f7c791b5e5c534954595c59000f1b4d5c4e4e4a524f59000b040a050b580a0f0d5e0d5b0d581b50525349525453545e545c51000c0d0d0d130d0d1b5b55000d080d0c0f0d0c090c0f090a08081b49545853595c0069786e721b484f516f585a4f584e5200125c4d4d1251525a5453134555495051&q=1> User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.76 Safari/537.36

Response headers:
Content-Type:text/html
Date:Sun, 19 Jan 2014 03:59:52 GMT
Set-Cookie:JSESSIONID=QgptSbNYvQT1TZCxlj6ylDmxQggMLGM5RTnnrnzrR5bnx1JNq99x!1610567454; path=/; HttpOnly Transfer-Encoding:chunked
X-Powered-By:Servlet/2.5 JSP/2.1
X-Powered-By:JSF/2.0

Gustavo Reyes
  • 1,313
  • 1
  • 17
  • 31
  • 3
    See if the answer in [**this post**](http://stackoverflow.com/questions/8880592/chrome-and-jsessionid?rq=1) would help you as well. Though [the forum post](https://vaadin.com/forum#!/thread/1216367) it's based on says that glassfish automatically adds `/`. – PM 77-1 Jan 19 '14 at 04:19
  • 1
    @PM77-1 Thank you so much! I can't believe it worked . I've been dealing with this for a week. Thanks! – Gustavo Reyes Jan 19 '14 at 04:43
  • 1
    You're welcome. It was (and still is) at the top of **Related** links on the right side of the screen. – PM 77-1 Jan 19 '14 at 04:45
  • 1
    Use 127.0.0.1 for your host instead of `localhost`. Chrome is broken with `localhost` in some versions. See https://stackoverflow.com/a/52571143/148844 and https://stackoverflow.com/questions/7346919/chrome-localhost-cookie-not-being-set#7369084 – Chloe Oct 17 '18 at 21:57

1 Answers1

1

The solution was to add a session descriptor in the web.xml file:

<wls:session-descriptor>
   <wls:cookie-path>/app</wls:cookie-path>
</wls:session-descriptor>
Gustavo Reyes
  • 1,313
  • 1
  • 17
  • 31