I am facing a issue with iceface 3.3 when session timeout:
[1] session timeout
[2] user do a activity.
[3] error in firebug - empty respose from server
[4] UI hangs forever
[5] user hit F5
[6] redirect to login page
[7] user input credential
[8] redirect to a xml error page
<partial-response>
<error>
<error-name>
class org.icefaces.application.SessionExpiredException
</error-name>
<error-message>
<![CDATA[ Session has expired ]]>
</error-message>
</error>
<changes>
<extension aceCallbackParam="validationFailed">{"validationFailed":false}</extension>
</changes>
</partial-response>
[9] user hit refresh ..user redirect to a normal application
This use to work fine in 1.8... i am now trying it with 3.3
During debugging i figured out one major difference between 1.8 and 3.3
in 1.8 when session timeout and user do a activity the response to this request is of the form:
response.status = 200
response.reponseXML = <sessionTimeOut><sessionTimeOut/>
where as in 3.3 when session timeout and user do a activity the response is:
reponse.status = 302 with response.header.location = login page
since status is 302 browser itself make a request for login page.
To icefaces javascript code the response that it got looks like
response.status=200
reponse.responseXML=null
response.reponseHTML=<HTML CODE OF LOGIN PAGE>
and in jsf.js the response handler just logs a error if reponseXML is null.
So thats why icefaces does not redirect or show popup.
Now does anybody having a fix or a work around for this ?
I am using icefaces 3.3, glassfish 3.1, spring 3.0.1
You need to use this context param in web.xml for icefaces 3.3. Observe the difference in param name for icefaces 1.8 which starts with com and for icefaces 3.3 it starts with org.