Skip to content

Commit

Permalink
[AS7-1546] The welcome root context is not enabled on domain AS insta…
Browse files Browse the repository at this point in the history
…nce.
  • Loading branch information
darranl authored and bstansberry committed Aug 18, 2011
1 parent f4124d3 commit 83b1cc4
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 3 deletions.
57 changes: 57 additions & 0 deletions build/src/main/resources/welcome-content/index_noconsole.html
@@ -0,0 +1,57 @@
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright (c) 2011, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Welcome to JBoss Application Server 7</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="StyleSheet" href="as7_style.css" type="text/css">
</head>

<body>
<div class="wrapper">
<div class="as7">
<img src="as7_logo.png" alt="JBoss Application Server 7... it's here." width="195" height="228" border="0">
</div>

<div class="content">
<h1>Welcome to AS 7</h1>

<h3>Your JBoss Application Server 7 is running.</h3>

<p><a href="documentation.html">Documentation</a><br/>

<a href="http://www.jboss.org/jbossas"><br>
JBoss AS Project</a> | <a href="http://community.jboss.org/en/jbossas/as7_users?view=all">User
Forum</a> | <a href=
"https://issues.jboss.org/browse/AS7">Report an issue</a></p>

<p class="logos"><a href="http://jboss.org"><img src="jboss_community.png" alt="JBoss and JBoss Community" width=
"254" height="31" border="0"></a></p>

<p class="note">To replace this page set "enable-welcome-root" to false in your server configuration and deploy
your own war with / as its context path.</p>
</div>
</div>
</body>
</html>
5 changes: 3 additions & 2 deletions build/src/main/resources/welcome-content/noconsole.html
Expand Up @@ -38,8 +38,9 @@
<div class="content">
<h1>No Console Active</h1>

<p>The server configuration does not appear to have an active console. Check the standalone.xml or host.xml for a
management-interfaces configuration.</p>
<p>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.</p>
</div>
</div>
</body>
Expand Down
3 changes: 3 additions & 0 deletions web/src/main/java/org/jboss/as/web/WebVirtualHostAdd.java
Expand Up @@ -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;
}

Expand Down
Expand Up @@ -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");
Expand Down

0 comments on commit 83b1cc4

Please sign in to comment.