问题描述
我有一个应用程序运行在这样的URL上:
我不希望 / myapp 部分。那么我该如何摆脱应用程序名称?我只想要
为网址。我该如何做到这一点?
位详细方法
lockquote
首先关闭你的tomcat [从bin目录( sh shutdown)。那么你的
必须删除你的tomcat webapps文件夹的所有内容( rm -fr * ),然后
将你的WAR文件重命名为 ROOT.war 最后从bin目录( sh startup.sh 第二种方法:
blockquote>
将您的war文件放在 CATALINA_BASE / webapps 的原始名称下 - 关闭
autoDeploy和deployOnStartup server.xml文件。
显式定义server.xml中的所有应用程序上下文,指定路径
和docBase。您必须这样做,因为您已禁用了所有的Tomcat
自动部署机制,并且除非在server.xml中找到它们的Context,否则Tomcat不会再部署您的应用程序
。
注意:
$ b
第三种方法:
I have an application running at a URL like this:
I don’t want the /myapp part in the URL. So how can I get rid of the application name? I want just
to be the URL. How can I do this?
bit detailed approach
First Method:
Second Method:
Note:
Third Method:
这篇关于我如何从Grails应用程序的URL中删除应用程序名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!