Java 在tomcat 7中更改应用程序根上下文
我有一个在上运行的应用程序Java 在tomcat 7中更改应用程序根上下文,java,tomcat,Java,Tomcat,我有一个在上运行的应用程序 http://localhost:8080/templates-web 我想把它改成 http://localhost:8080/templates-ui 我已经创建了文件夹META-INF,并在那里创建了context.xml文件。 context.xml的上下文如下所示 <?xml version='1.0' encoding='utf-8'?> <Context sessionCookiePathUsesTrailingSlash='fa
http://localhost:8080/templates-web
我想把它改成
http://localhost:8080/templates-ui
我已经创建了文件夹META-INF
,并在那里创建了context.xml
文件。
context.xml
的上下文如下所示
<?xml version='1.0' encoding='utf-8'?>
<Context sessionCookiePathUsesTrailingSlash='false' path="templates-ui"></Context>
但它不起作用。它仍然在模板网站上运行
如何更改它?检查它:
<Context path="" docBase="myAPP">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
<Context path="ROOT" docBase="ROOT">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
WEB-INF/WEB.xml
WEB-INF/WEB.xml
并且,将上述内容添加到server.xml中的部分,因为tomcat位于另一台机器上,所以我只能在我的应用程序中进行更改。