Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在JSP页面中获取maxInactiveInterval值_Java_Jsp_El - Fatal编程技术网

Java 在JSP页面中获取maxInactiveInterval值

Java 在JSP页面中获取maxInactiveInterval值,java,jsp,el,Java,Jsp,El,我试图在会话超时时刷新页面。我正在将此添加到HTML的部分: <meta http-equiv="refresh" content="${sessionScope['maxInactiveInterval']};url=${pageContext.servletContext.contextPath}/index.htm?reason=expired"/> 但是,这:${sessionScope['maxInactiveInterval']}或${sessionSc

我试图在会话超时时刷新页面。我正在将此添加到HTML的
部分:

<meta http-equiv="refresh"
      content="${sessionScope['maxInactiveInterval']};url=${pageContext.servletContext.contextPath}/index.htm?reason=expired"/>

但是,这:
${sessionScope['maxInactiveInterval']}
${sessionScope.maxInactiveInterval}
打印空值(无)


我知道在JSF中我可以使用:
#{session.maxInactiveInterval}
,它可以工作。如何在JSP页面中实现这一点?

下面的行将为您提供
maxInactiveInterval

${pageContext.session.maxInactiveInterval}
因为
sessionScope
只将会话范围内的变量名映射到它们的值, 其中as
pageContext.session
为客户端提供会话对象


您可以在中找到它。

您是否尝试过使用
sessionScope.maxInactiveInterval
?是的。我在我的问题中提到了这一点。有点忘记了pageContext对象。向上投票,因为它提醒了我你提到的事实:)