How do you configure a Web Application as Default Web app ?

User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive
 

 

JBoss AS 4-5-6

  • First you have to remove the default Web application that ships with JBoss (ROOT.war).

  • Then deploy your web application taking care to add in your application the file WEB-INF\jboss-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
   <context-root>/</context-root>
</jboss-web>

JBoss AS 7


Follow these steps:

  • Disable the Welcome application.
  • Use the Management CLI script EAP_HOME/bin/jboss-cli.sh to run the following command. (You may need to change the profile to modify a different managed domain profile, or remove the /profile=default portion of the command for a standalone server).


    /profile=default/subsystem=web/virtual-server=default-host:write-attribute(name=enable-welcome-root,value=false)

    Configure your Web application to use the root context.
    To configure your web application to use the root context (/) as its URL address, modify its jboss-web.xml, which is located in the META-INF/ or WEB-INF/ directory. Replace its <context-root> directive with one that looks like the following.

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
   <context-root>/</context-root>
</jboss-web>

    Deploy your application to the server group or server you modified in the first step. The application is now available on http://SERVER_URL:PORT/.

Related articles available on mastertheboss.com

How do I reload dynamically my jsp from an ear ?

  Deploy your Jsp as part of an application deployed in exploded

Where is my compiled JSP ?

JBoss recipe of the day

How do you configure JBoss to enable HTTP logging ?

To enable HTTP logging, you need to go to the deploy/jbossweb-tom

JBoss Struts tutorial

This article explains how you can setup quickly an application ba

How to restrict access to JBoss web application by IP or Host?

You can create easily Access control list based on the IP address

Developing Portlets with JBoss Portal

JBoss Portal is an open source platform for hosting and serving a

Follow us on Twitter