简体   繁体   中英

I have tomcat7 server i want that we access .war

I have tomcat7 server in it I have upload .war file in webapps directory. After that we access it url "localhost:8080/warfile"

But here I want that we access .war in this url "localhost:8080" is it possible, if yes then please help me

thanks

Rename your war file to ROOT.war, to access it via yourhost.com rather than yourhost.com/nameOfWar.

Also, especially in a local environment, set the path variable to "/" in your server.xml. In eclipse, you will probably have a "Servers" project folder, where you can simply edit the server.xml of the specific tomcat server.

<Context docBase="YourApp" path="/" reloadable="true"
                    source="org.eclipse.jst.jee.server:YourApp" />

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