简体   繁体   中英

change application root context in tomcat 7

I've got an application that runs on

http://localhost:8080/templates-web

I want to change it to

http://localhost:8080/templates-ui

I've created folder META-INF and created there context.xml file. The context of context.xml looks like this

<?xml version='1.0' encoding='utf-8'?>

<Context sessionCookiePathUsesTrailingSlash='false' path="templates-ui"></Context>

But it does not work. It still runs on templates-web .

How to change it?

Check it:

<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>

And, add above to the section in server.xml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM