0

My JSF application works in my local tomcat for URL like http://localhost:8080/MyApp/admin, but not on the hosting server, the URL there is http://www.myapp.com/admin Do I need to do something with 'context.xml'/ put BocBase & AppBase. I got these things googling, but could not understand what exactly I have to do. Can anyone help me with the exact thing thats has to be done to get this working?

4

1 回答 1

1

这在Tomcat 的配置参考 - 上下文容器中有所描述

文档库

此 Web 应用程序的Document Base(也称为Context Root)目录,或 Web 应用程序归档文件的路径名(如果此 Web 应用程序直接从 WAR 文件执行)。您可以为此目录或 WAR 文件指定绝对路径名,或者指定相对于appBase拥有Host的目录的路径名。

当使用文件配置上下文时,不得设置此字段的值,META-INF/context.xml因为它将由自动部署过程推断。

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

于 2010-09-14T17:37:34.867 回答