0

I have a JSF 2.2 web application on Tomcat 7.0.41. As authentication I use DIGEST with realm. New JSESSIONID is set on every HTTP request and it looks like this:

Set-Cookie JSESSIONID=...; Expires=Mon, 23-Sep-2013 11:35:25 GMT; Path=/domain/; HttpOnly

Its expiration time is (now + 1 hour). I'm googling for any hint, maybe not well. I read some articles about loadbalancer and session replication, but I have only one server tomcat. I think there don't need replication. I use server as state saving method in web.xml. When I change state saving method to client and I set cookies="false" in context.xml, then it's ok, but very slow. What can be wrong with my web.xml or Tomcat settings?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
vonzdar
  • 11
  • 3
  • JSESSIONID being set is normal and desired, isn't it? It is the mechanism to associate a request with one specific user session. The session timeout may be configured to your liking. _What is the problem?_ – Joop Eggen Sep 23 '13 at 09:05
  • When I do several parallel ajax requests, some of them have old jsessionid and then comes view expired exception(view could not be restored) I have plot, which loads data from servlet and controls dataTable, which shows detail information for every bar in plot. Y axis is Date. When I move plot for example from 00:00 - 12:00 to interval 12:00 - 19:00, loading plot and table runs parallel and plot is loaded earlier. If I move to previous interval before table is loaded, new asynchronous request for load data for dataTable has old jsessionId and then comes view Expired exception. – vonzdar Sep 23 '13 at 09:23
  • JSESSIONID has exactly nothing to do with ViewExpiredException. Your actual question remains obscure. – user207421 Sep 23 '13 at 09:40
  • So maybe somehow you are losing your JSESSIONID. Besides as cookie you may also add the JSESSIONID as URL parameter to links - to find some effect. – Joop Eggen Sep 23 '13 at 09:47
  • to EJP: please try explain this behaviour: When I'am waiting to load data for dataTable and then I move in plot, everything was good (new load Plot and dataTable will start). I check in Firebug, which requests with headers are sent to server. If some request doesn't finish and some new was started asynchrounous, then was view expired exception. When requests are in sequence, everything is good. – vonzdar Sep 23 '13 at 10:46
  • I have explained that ViewExpiredException is not related to JSESSIONID. You should be investigating the former, not the latter. A classic XY problem. – user207421 Sep 23 '13 at 21:27

0 Answers0