Tomcat 上的 Web 应用程序上下文文件

发布于 2024-08-11 21:40:59 字数 474 浏览 5 评论 0原文

我使用 Tomcat 5.5.15 提供下载服务。它是通过在 $TOMCAT_HOME/conf/Catalina/localhost 中添加 XML 文件来创建的。例如 downloads.xmlhttp://example.com/app.downloads/

<Context path="/app.downloads" docBase="Z:\Sites\example.com\downloads\"/>

Tomcat重新启动后,上下文文件有时会被删除(并非总是如此),我必须手动重新创建该文件。

可能是什么问题?有修复它的方法吗?

I have a download service served using Tomcat 5.5.15. It is created by adding an XML file in $TOMCAT_HOME/conf/Catalina/localhost. E.g downloads.xml for http://example.com/app.downloads/

<Context path="/app.downloads" docBase="Z:\Sites\example.com\downloads\"/>

After Tomcat restart the context file is sometimes deleted(not always), and I have to manually recreate the file.

What could be the problem? Is there a was of fixing it?

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

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

发布评论

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

评论(2

带刺的爱情 2024-08-18 21:40:59

这不是正常情况。我也不希望您为简单的下载服务部署 WAR。我认为您的 Tomcat 实例是由其他东西控制的,例如 Eclipse 等 IDE。您也不应该在生产中这样做。如果您独立运行 Tomcat,问题应该可以解决。

That is not the normal case. I also don't expect that you're deploying a WAR for a simple download service. I think that your Tomcat instance is controlled by something else, for example an IDE such as Eclipse. You shouldn't do that for production as well. If you run Tomcat standalone, the problem should be solved.

独守阴晴ぅ圆缺 2024-08-18 21:40:59

这是 Tomcat 中的一个错误。我提交了 Tomcat 5 的报告,但修复很复杂。

该文件在重新部署期间被删除,而不是重新启动。因此,您需要确保您的应用程序不会被重新部署。服务器运行时请勿更改您的应用程序。

This is a bug in Tomcat. I filed a report for Tomcat 5 but the fix is complicated.

The file is removed during re-deploy, not restart. So you need to make sure your app doesn't get re-deployed. Don't change your app while server is running.

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