如何实施“站点正在维护”在 OC4J 上运行的 JSP 应用程序页面

发布于 2024-12-24 15:56:10 字数 335 浏览 3 评论 0原文

我的基于 JSP 的网站已经投入生产,在 OC4J 上运行(由 opmnctl 管理)。当应用程序关闭时,用户会收到 500 错误页面。这不是一个顶级域名,它就像:

http://localhost/myJspApp

我怎样才能实现“欢迎” ' 页?如果应用程序正在运行,则需要显示登录屏幕,否则在 OC4J 关闭时显示“站点正在维护”消息。

我确信当 OC4J 关闭时,不可能在此欢迎页面上使用 JSP(尽管这是可取的,因为应用程序状态存储在表中,并且可以使用 JSP 轻松从数据库中获取它)。

My JSP based wesite is already in production, running over OC4J (managed by opmnctl). When the application is down, users get a 500 error page. This is not a top-level domain, it is like:

http://localhost/myJspApp

How can I implement a 'welcome' page? it needs to show login screen if the application is running, otherwise show a 'Site Under Maintenance' message in case of OC4J being down.

I am sure it is not possible to use JSP on this welcome page when OC4J is down (altough it was desirable because application status is stored in a table, and it could be easily fetched from db using JSP).

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

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

发布评论

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

评论(1

长不大的小祸害 2024-12-31 15:56:10

如果 OC4J 关闭,则意味着您没有容器来运行 JSP。
但是,您仍然可以从不同的站点或 HTML 返回一个不错的错误页面。为此,您需要配置 Apache HTTP 服务器。这是在 httpd.conf 文件中使用 ErrorDocument 部分完成的。
请参阅此处了解更多详细信息

If the OC4J is down, it means that you have no container to run your JSPs.
But, you can still return a nice error page from a different site or HTML. For doing that you need to configure the Apache HTTP server. This is done in the httpd.conf file, using the ErrorDocument part.
Look here for more details

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