An OFBiz "Application" is a set of directories and files that are located within a Component. Referred to as "webapps", an OFBiz Application may contain all the artifacts necessary to deliver a web browser-compliant UI. As a testament to its flexibility, an OFBiz instance and any OFBiz Component may include an unlimited number of webapps.
An OFBiz Application is defined by the presence of the webapp
directory located just beneath a containing Component's top-level directory, and may include one or more of the following files and directories:
A single
WEB-INF
directoryBeneath the
WEB-INF
directory, find aweb.xml
deployment descriptor fileAlso beneath the
WEB-INF
directory, acontroller.xml
controller servlet configuration file may be presentMany other resources may be present depending on the needs of the Application
To locate an Application, firstly the following should be taken care of:
1. Determine the name of the Application you are searching for.
2. Try to ascertain the Component in which this Application is located An OFBiz Component may have one or more OFBiz Applications within it.
To locate the Application, perform the following:
1. Navigate to the OFBiz install directory.
2. If you know the name of the Component in which this Application is located, navigate to that Component's top-level directory.
3. Open the
ofbiz-component.xml
file in the top-level Component directory. In this file, locate any XML elements starting with awebapp
tag. There may be many of these declarations within a singleofbiz-component.xml
file. Each declaration represents the configuration of a single OFBiz web Application. For example, the following is taken from the OFBiz e-commerce Component. Two OFBiz Applications, the"eccomerce"
and the"ecomclone"
, are configured. The top-level directory location of each Component is given by thelocation
attribute value for thewebapp
element:<webapp name="ecommerce" title="eCommerce" server="default-server" location="webapp/ecommerce" mount-point="/" app-bar-display="false"/> <webapp name="ecomclone" title="eCommerce Clone" server="default-server" location="webapp/ecomclone" mount-point="/ecomclone" app-bar-display="false"/>
OFBiz Applications are configured for each Component using the ofbiz-component.xml
file. If one or more webapp
elements are present in an ofbiz-component.xml
file, this is a trigger to OFBiz that there are Applications for this Component. OFBiz will attempt to load all Component applications in the order defined in the ofbiz-component.xml
file at system startup.
To mount an Application as the "root" Application, set the mount-point
attribute value to"/"
as shown earlier. This will change the default URL for this webapp from http://localhost:8080/name to http://localhost:8080/. Only one webapp may be set to the root mount-point per OFBiz instance.