JSF Problem with using maxInactiveInterval

后端 未结 1 799
别跟我提以往
别跟我提以往 2021-01-19 16:08

Folks, I\'m finding that with a test value of 1 minute expiry in web.xml the following code redirects to the given url immediately when the page is rendered:



        
相关标签:
1条回答
  • 2021-01-19 16:26

    The ${pageContext} is only available when you're using JSF on JSP. It seems that you're using JSF on JSP's successor Facelets as you're trying to redirect to a XHTML file. Facelets has totally no notion of a ${pageContext}. You should be using #{facesContext} instead. The session is then available by #{facesContext.externalContext.session}. However, Facelets offers a shorthand to get it: #{session}. The same for the #{request}.

    So, this should do:

    <meta http-equiv="refresh" content="#{session.maxInactiveInterval};url=#{request.contextPath}/index.xhtml"/> 
    
    0 讨论(0)
提交回复
热议问题