I have seen possibly similar issues, but people just aren't able to reproduce them anymore and they seem to be closed without further inspection. Maybe this is the same problem.
I started seeing a problem in a new application I'm developing. For views such as "/view.xhtml" everything is working fine. But if I move the view to another directory, e.g. "/admin/view.xtml", I get ViewExpiredExceptions when interacting with backing beans.
- This does not happen if there is already a cookie associated with the session. I.e., I can only reproduce the issue if the first cookie is created by accessing "/admin/view.xhtml". Accessing something in the root and then the other directories works just fine (the server won't send set-cookies again).
- When accessing "/admin/view.xhtml" new cookies are issued for every .xhtml request. Fetching PrimeFaces .js.xhtml files after the initial page is loaded, for example, triggers new sessions.