I have an .xhtml page in which I have tried both BalusC’s suggestion here and also the following without avoiding the OP’s issue
<meta http-equiv="refresh" content="#{session.maxInactiveInterval}"/>
Basically, I start the application and the form based authentication page is rendered. I then wait for the session time to expire. If I try to login after that then the OP’s problem occurs.
The
#{session}is available in Facelets only. That it doesn’t work suggests that you are not using Facelets for this particular view, but its legacy predecesor JSP or even plain vanilla HTML.For JSP you should be using
${pageContext.session}to get the session, exactly as demonstrated in my answer on the question which you found yourself.Or, much better, get rid of legacy JSP altogether and replace it by its successor Facelets.