How to set SPRING MVC web application context as R

2019-07-19 01:11发布

问题:

I have SPRING MVC web application (my.war). It deploys on Tomcat 6 server to http://host/my/ folder. How can I change this to be accessible this web application in http://host/ ?

回答1:

Look at the /ROOT directory under /webapps. In default installation it holds bunch of exploded JSPs and /WEB-INF subdirectory that are accessible from main context.



回答2:

You need to deploy your web application as ROOT.war

Have a look at this post which describes the whole topic pretty well: http://benhutchison.wordpress.com/2008/07/30/how-to-configure-tomcat-root-context/



回答3:

remove ROOT folder and make your app as ROOT.war deploy it as ROOT folder