此内容没有您所选择的语言版本。

5.3. Setting the Default Server Application


JBoss Enterprise Application Platform, by default, configures <JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy/ROOT.war as the default application on the server. So accessing http://localhost:8080/ results in displaying the index page of this application. If you want your application to be available as the default application, then you will wish to follow these steps:
  • Rename ROOT.war in <JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy to something else, for example, jboss.war.
  • In your WAR file (the one which you want to be the default application), add a jboss-web.xml, in the WEB-INF folder, with a configuration for the context-root:
    <?xml version="1.0"?>
    <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
    <jboss-web>
    <context-root>/</context-root>
    <!-- Other configurations as needed -->
    </jboss-web>
    
    Copy to Clipboard Toggle word wrap
    By setting the context-root to / you are making your application the default application. Your application will now be available at http://localhost:8080/.

    Note

    Renaming the ROOT.war to jboss.war will make that application be available at http://localhost:8080/jboss
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat