Jboss 超时是如何工作的?

发布于 2024-08-19 06:51:48 字数 129 浏览 5 评论 0原文

jboss中的超时是如何工作的?网络应用程序如何知道何时重定向到登录页面?

只是为了澄清! -我知道如何在jboss上配置超时。我的问题是,Jboss 如何知道会话已超时,当超时时,如何配置它以在超时发生后将请求发送到登录页面?

How does timeout in jboss works? How does a web-app knows when to re-direct to a login page?

Just to clarify!
-I know how to configure timeout on jboss. My question is, how does Jboss know that a session has timed out and when it does, how do you configure it to send the request to login page once the timeout has happened?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

悲歌长辞 2024-08-26 06:51:48

您可以在所有可部署单元(例如 web.xml 中的 .war 文件)上配置超时

<session-config>
  <session-timeout>30</session-timeout>
</session-config>

You can configure a time out on an all deployable units like .war files in web.xml

<session-config>
  <session-timeout>30</session-timeout>
</session-config>
梦萦几度 2024-08-26 06:51:48

JBoss 中的 HttpSession 超时可以设置为三个不同级别:

  • #1 要更改每个 Web 应用程序的默认超时值:

编辑 Web 部署程序的 超时值默认 wed 应用程序配置:在 web.xml

<session-config>
   <session-timeout>30</session-timeout>
</session-config>
  • #2 要覆盖每个 Web 应用程序的默认 HttpSession 超时:

将与上面相同的标签添加到 WEB-INF/ web.xml。以下是进一步说明的 DTD:

<!--
The session-config element defines the session parameters for
this web application.

Used in: web-app
-->
<!ELEMENT session-config (session-timeout?)>

来自 https://developer.jboss.org/wiki/HttpSessionTimeout

session-timeout 元素定义默认会话超时
在此 Web 应用程序中创建的所有会话的时间间隔。这
指定的超时必须以整数分钟表示。
如果超时为 0 或更小,则容器确保默认值
会话的行为永远不会超时。
用于:会话配置

  • #3 覆盖全局和 Web 应用程序值对于单个客户,

请致电

HttpSession.setMaxInactiveInterval(int seconds)

The HttpSession timeout in JBoss can be set at three different levels:

  • #1 To change default timeout value for every web application:

Edit the Web Deployer's default wed application configuration: in the web.xml

<session-config>
   <session-timeout>30</session-timeout>
</session-config>
  • #2 To override the default HttpSession timeout on a per-webapp basis:

Add the same tags as above to WEB-INF/web.xml. Here is the DTD for further explanation:

<!--
The session-config element defines the session parameters for
this web application.

Used in: web-app
-->
<!ELEMENT session-config (session-timeout?)>

From https://developer.jboss.org/wiki/HttpSessionTimeout

The session-timeout element defines the default session timeout
interval for all sessions created in this web application. The
specified timeout must be expressed in a whole number of minutes.
If the timeout is 0 or less, the container ensures the default
behaviour of sessions is never to time out.
Used in: session-config

<!ELEMENT session-timeout (#PCDATA)>

  • #3 To override the global and web app value for a single client,

call

HttpSession.setMaxInactiveInterval(int seconds)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文