【发布时间】:2014-07-29 07:13:12
【问题描述】:
使用 WildFly 8 时,将浏览器指向 localhost:8080 会显示默认的 welcome-content 页面。
我想更改此行为,以便改为显示 myapplication.war。
我的standalone.xml 文件目前包含以下默认配置:-
<server name="default-server">
<http-listener name="default" socket-binding="http"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>
我在 JBossDeveloper 论坛上发现了一些帖子,建议如下:-
<host name="default-host" alias="localhost" default-web-module="name-of-your.war">
仅添加default-web-module 参数似乎不起作用,因为仍然显示welcome-content 页面。
从 host 部分中删除 location 和 filter-ref 项目会停止显示 welcome-content 页面,但会导致 HTTP 404 - Not found 错误。
谁能告诉我如何解决这个问题?
【问题讨论】:
标签: jakarta-ee wildfly undertow