gpt4 book ai didi

java - JSF 应用程序为子上下文提供 404

转载 作者:行者123 更新时间:2023-11-28 23:08:17 24 4
gpt4 key购买 nike

我的 JSF 应用程序在我的本地 tomcat 中工作,用于 URL,如 http://localhost:8080/MyApp/admin ,但不在托管服务器上,那里的 URL 是 http://www.myapp.com/admin我需要用'context.xml'/put BocBase & AppBase 做些什么吗?我用谷歌搜索了这些东西,但不明白我到底要做什么。任何人都可以帮助我解决必须完成的确切事项才能使其正常工作吗?

最佳答案

这在 Tomcat's Configuration Reference - The Context Container 中有描述

docBase

The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host.

The value of this field must not be set when the Context is configured using a META-INF/context.xml file as it will be inferred by the automatic deployment process.

您的 URL 表明您希望将它放在 root 的文档库中。所以应该设置为/

关于java - JSF 应用程序为子上下文提供 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3711257/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com