Locating an OFBiz Application

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 directory
  • Beneath the WEB-INF directory, find a web.xml deployment descriptor file
  • Also beneath the WEB-INF directory, a controller.xml controller servlet configuration file may be present
  • Many other resources may be present depending on the needs of the Application

Getting ready

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.

How to do 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 a webapp tag. There may be many of these declarations within a single ofbiz-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 the location attribute value for the webapp 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"/>
    

How it works...

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.

There's more...

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.195.111