diff --git a/build/src/main/resources/welcome-content/index_noconsole.html b/build/src/main/resources/welcome-content/index_noconsole.html new file mode 100644 index 00000000000..c2822b3ca09 --- /dev/null +++ b/build/src/main/resources/welcome-content/index_noconsole.html @@ -0,0 +1,57 @@ + + + + + + Welcome to JBoss Application Server 7 + + + + + +
+
+ JBoss Application Server 7... it's here. +
+ +
+

Welcome to AS 7

+ +

Your JBoss Application Server 7 is running.

+ +

Documentation
+ +
+ JBoss AS Project
| User + Forum | Report an issue

+ +

JBoss and JBoss Community

+ +

To replace this page set "enable-welcome-root" to false in your server configuration and deploy + your own war with / as its context path.

+
+
+ + diff --git a/build/src/main/resources/welcome-content/noconsole.html b/build/src/main/resources/welcome-content/noconsole.html index b2150a95ffb..d34b4b4b7a4 100644 --- a/build/src/main/resources/welcome-content/noconsole.html +++ b/build/src/main/resources/welcome-content/noconsole.html @@ -38,8 +38,9 @@

No Console Active

-

The server configuration does not appear to have an active console. Check the standalone.xml or host.xml for a - management-interfaces configuration.

+

The server configuration does not appear to have an active console. If you are running a standalone server + check the http interface is enabled in the standalone.xml configuration, if you are running a domain the + http interface can not be automatically detected so check the host.xml configuration and connect directly.

diff --git a/web/src/main/java/org/jboss/as/web/WebVirtualHostAdd.java b/web/src/main/java/org/jboss/as/web/WebVirtualHostAdd.java index b131eccc2d6..081838f371d 100644 --- a/web/src/main/java/org/jboss/as/web/WebVirtualHostAdd.java +++ b/web/src/main/java/org/jboss/as/web/WebVirtualHostAdd.java @@ -151,6 +151,9 @@ static ModelNode getAddOperation(final ModelNode address, final ModelNode subMod if (subModel.hasDefined(Constants.REWRITE)) { operation.get(Constants.REWRITE).set(subModel.get(Constants.REWRITE)); } + if (subModel.hasDefined(Constants.ENABLE_WELCOME_ROOT)) { + operation.get(Constants.ENABLE_WELCOME_ROOT).set(subModel.get(Constants.ENABLE_WELCOME_ROOT)); + } return operation; } diff --git a/web/src/main/java/org/jboss/as/web/WelcomeContextService.java b/web/src/main/java/org/jboss/as/web/WelcomeContextService.java index a0866468bbe..182a13be0d6 100644 --- a/web/src/main/java/org/jboss/as/web/WelcomeContextService.java +++ b/web/src/main/java/org/jboss/as/web/WelcomeContextService.java @@ -78,7 +78,11 @@ public synchronized void start(StartContext startContext) throws StartException context.setInstanceManager(new LocalInstanceManager(httpMS)); context.setReplaceWelcomeFiles(true); - context.addWelcomeFile("index.html"); + if (httpMS != null) { + context.addWelcomeFile("index.html"); + } else { + context.addWelcomeFile("index_noconsole.html"); + } Wrapper wrapper = context.createWrapper(); wrapper.setName("default");