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