在Jboss Wildfly上使用“ /”作为默认项目根目录

时间:2018-11-04 22:42:29

标签: jboss wildfly ear

我有一个wildfly-14.0.1.Final服务器和一个项目(foodHosting),其中有一个名为foodHosting-ear的可部署耳朵模块和一个名为fooHosting-web的网络战争模块。部署后到达我的index.xhtml,我必须将localhost:8080/foodHosting-web/写入浏览器。有什么解决方案可以只写localhost:8080并显示我的应用程序?像localhost:8080/index.xhtml一样?

1 个答案:

答案 0 :(得分:0)

您必须将fooHosting-web.war重命名为ROOT.war

编辑:不需要重命名.ear内部的.war,您必须按照注释中@wirnse的答案更改上下文根,而不是/WEB-INF/jboss-web.xml检查您的/META-INF/application.xml并清空context-root标记:<context-root></context-root>