Configuring Apache Tomcat

In this section:

The App Studio installation provided the option to install and configure Apache Tomcat for you. If you chose this option and the verification tool ran successfully, you do not need to manually configure Tomcat. However, if you are not familiar with Tomcat, you may wish to review this section to understand the configuration process.

Note:


Top of page

x
Tomcat Configuration Overview

To configure Tomcat, you tell Tomcat where App Studio files are located and the contexts in which to use them. For example, the WebFOCUS web application is installed with App Studio in:

drive:\ibi\AppStudio81\webapps\webfocus

Tomcat must know to serve files from the web application when it receives a request for the ibi_apps context path. For example:

http://localhost:8080/ibi_apps

Tomcat can be used as both a web server and application server, so Tomcat can also serve files outside of a web application after it knows their location and context. On a traditional web server, you create aliases. With Tomcat, an alias is treated like a context root, even when serving files outside of a web application.



x
Configuring Tomcat

How to:

There are many ways to configure Tomcat. Information Builders recommends creating XML files under

<catalina_home>\conf\Catalina\localhost

where:

<catalina_home>

Is the actual location of your Tomcat installation directory. For example:

drive:\ibi\tomcat

or

C:\Program Files\Apache Software Foundation\tomcat x.x.

Context roots can be created as specified in the following steps.



x
Procedure: How to Create Contexts for Apache Tomcat
  1. Stop Tomcat from the Windows Services window by right-clicking Apache Tomcat and choosing Stop.
  2. Navigate to the following directory in Windows Explorer or My Computer:
    <catalina_home>\conf\Catalina\localhost

    This directory can contain XML files that define contexts. If the App Studio installation installed and configured Tomcat for you, the following files should appear to define the ibi_apps context that deploys the webfocus directory:

    approot.xml
    ibi_apps.xml

    If you are using stand-alone Tomcat, the following file should appear as well:

    ibi_apphelp.xml

    The XML files are named for the context root you would use to access the web application and should have the following syntax:

    <?xml version='1.0' encoding='utf-8'?>
    <Context docBase="path_To_WebApplication" path="/contextRoot">
    </Context>

    where:

    path_To_WebApplication

    Is the absolute path to the WAR file or directory you are deploying.

    contextRoot

    Is the context root.

    Note: They can optionally contain additional information, as explained in Tomcat documentation.

  3. If the ibi_apps.xml file does not exist, create it using Notepad. For example:
    <?xml version='1.0' encoding='utf-8'?>
    <Context docBase="C:\ibi\AppStudio81\webapps\webfocus" path="/ibi_apps">
    </Context>

    Be sure to specify the correct directory on your machine and change the context root if you are not using the default (ibi_apps).

  4. If you are using stand-alone Tomcat and approot.xml does not exist, create it using Notepad. For example:
    <?xml version='1.0' encoding='utf-8'?>
    <Context docBase="C:\ibi\apps" path="/approot">
    </Context>

    Be sure to specify the correct directory on your machine.

  5. If you are using stand-alone Tomcat and ibi_apphelp.xml does not exist, create it using Notepad. For example:
    <?xml version='1.0' encoding='utf-8'?>
    <Context docBase="C:\ibi\AppStudio80\webapps\ibi_apphelp" path="/ibi_apphelp">
    </Context>

    Be sure to specify the correct directory on your machine.

  6. Restart Tomcat from the Services window.


x
Procedure: How to Test the Tomcat Configuration
  1. Ensure that Tomcat has been restarted.
  2. Test the ibi_apps context by going to the following URL in a web browser:
    http://localhost:8080/ibi_apps/

    The WebFOCUS home page should appear. If you receive an error, see Troubleshooting App Studio.


Top of page

x
Additional Tomcat Configuration Options

Reference:

You should be aware of how to secure the Tomcat Manager Web Tool, Tomcat TCP ports, and how to reload web applications.



x
Reference: Tomcat Ports

By default, Tomcat uses the three TCP ports listed below:

Default Port

Name

Use

8080

HTTP Listener Port

You access Tomcat in a web browser using this port. For example:

http://localhost:8080
8009

Connector Port

Web servers can route servlet requests to Tomcat on this port. The Tomcat connector (plug-in) for IIS uses this port. Tomcat listens on this port even if no web server is connecting.

8005

Shutdown Port

Tomcat uses this port for internal operations and for shutting down.

If these ports are not available or you wish to change them, do the following:

  1. Open the following file in a text editor:
    <catalina_home>\conf\server.xml
  2. Search for the port numbers you wish to replace (8080, 8009, 8005) and replace them with the ports you wish to use.
  3. Save and exit the file.
  4. Restart Tomcat.

If you change defaults, substitute accordingly in procedures and examples. You also need to update the App Studio connection settings so it knows the correct Tomcat HTTP port if you change the default.



x
Reference: Reloading Web Applications

This is not a consideration if you just installed Tomcat with App Studio for the first time, only when installing a service pack or new release. When you upgrade App Studio or install a service pack, Tomcat must use the new web application rather than cached copies of the old version.



x
Reference: Additional Configuration Steps

If you are using Tomcat as the application server and IIS as the web server, configure IIS, as explained in the next section.


Top of page

x
Apache Tomcat Application Server Unicode Configuration

To set up a Unicode environment, follow these steps:

  1. Edit the server.xml file located under drive:\ibi\tomcat\conf.
  2. Add useBodyEncodingForURI="true" to the Connector, as shown in the following image.

    Configuration XML example

  3. Recycle the Tomcat Application Server to activate.

Top of page

x
Deploying the App Studio Help on a Remote Application Server

This section is required if you are deploying the App Studio Help system on a remote application server. The App Studio Help web application must be deployed to an application server.

If Tomcat is your remote application server, you can do one of the following:

or

To configure the App Studio Help on a remote application server other than Tomcat, you must deploy the ibi_apphelp.xml web application to the server.


WebFOCUS