Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 wildfly-14.0.1.Final 服务器和一个项目 ( foodHosting),其中包含一个名为的可部署 ear 模块foodHosting-ear和一个名为fooHosting-web. 在部署到我的 index.xhtml 之后,我必须写入localhost:8080/foodHosting-web/我的浏览器。有什么解决方案可以只写localhost:8080并显示我的应用程序吗?喜欢localhost:8080/index.xhtml?
foodHosting
foodHosting-ear
fooHosting-web
localhost:8080/foodHosting-web/
localhost:8080
localhost:8080/index.xhtml
您必须将其重命名fooHosting-web.war为ROOT.war
fooHosting-web.war
ROOT.war
编辑:不需要在.ear 中重命名.war,您必须按照@wirnse 在评论中所说的答案更改上下文根,而不是/WEB-INF/jboss-web.xml 检查您的/META -INF/application.xml 并清空上下文根标签:<context-root></context-root>
<context-root></context-root>