【发布时间】:2014-02-12 10:50:43
【问题描述】:
我有一个情况,我在 jsf-2.1 中有一个应用程序,部署为 http://localhost:8080/myWebApplication,在“META-INF”中我有 context.xml,它具有以下配置
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/myWebApplication" />
现在我想在不丢失上下文的情况下缩短名称 => 'myWebApplication' like '/mwp'
我尝试执行以下操作,但未达到预期效果:
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/myWebApplication" />
<Context antiJARLocking="true" path="/mwp" />
请告知是否可能或有任何解决方法来实现这一点。
【问题讨论】:
-
这是我为解决我的问题所做的。它不符合主要问题,但对我有用。我在 tomcat/webapps 中创建了一个名为 mwp 的文件夹,并向其中添加了一个 index.html 文件,其中包含 meta-refresh 标记以指向原始上下文。
标签: java deployment tomcat7 contextpath