Now that we have examined the JBoss web server, we will take a look at some of the main configuration files and what they are used for. All paths are relative to the server configuration directory (
server/default, for example).
JBoss web server by default configures
$JBOSS_HOME/jboss-as-web/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.warin$JBOSS_HOME/jboss-as-web/server/$PROFILE/deployto 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 theWEB-INFfolder, 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>
By setting the context-root to/you are making your application the default application. Your application will now be available athttp://localhost:8080/.Note
Renaming theROOT.wartojboss.warwill make that application be available athttp://localhost:8080/jboss