Show Table of Contents
17.2. 替换默认的 Welcome Web 应用程序
JBoss EAP 6 包含了一个 Welcome 应用程序,它在您访问服务器端口 8080 时显示。使用下列步骤,您可以用自己的 Web 应用程序替换这个程序。
过程 17.1. 用自己的 Web 应用程序替换默认的 Welcome 应用程序。
禁用 Welcome 应用程序。
用管理 CLI 脚本EAP_HOME/bin/jboss-cli.sh运行下列命令。对于受管域,您可能需要修改受管域配置集;对于独立服务器,您可能需要删除/profile=default。/profile=default/subsystem=web/virtual-server=default-host:write-attribute(name=enable-welcome-root,value=false)
配置您的 Web 应用程序使用根上下文。
要配置您的 Web 应用程序将根上下文(/)作为 URL 地址,请修改META-INF/或WEB-INF/目录下的jboss-web.xml。用类似于下面的内容替换<context-root>指令。<jboss-web> <context-root>/</context-root> </jboss-web>部署您的应用程序
部署您的应用程序到服务器组或在第一个步骤修改的服务器里。这个应用程序应该可以通过这个地址访问:http://SERVER_URL:PORT/。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.