In this section: |
The Developer 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:
To configure Tomcat, you tell Tomcat where Developer Studio files are located and the contexts in which to use them. For example, the WebFOCUS web application is installed with Developer Studio in:
drive:\ibi\DevStudio80\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.
Context (path) | Directory (DocumentBase) |
---|---|
/ibi_apps | drive:\ibi\DevStudio80\webapps\webfocus |
/ibi_help | drive:\ibi\DevStudio80\webapps\ibi_help |
/approot | drive:\ibi\apps |
Context (path) | Directory (DocumentBase) |
---|---|
/ibi_apps | drive:\ibi\DevStudio80\webapps\webfocus |
/ibi_help | drive:\ibi\DevStudio80\webapps\ibi_help |
The approot context is then created as an alias (Virtual Directories) on IIS and IIS is configured to send requests for ibi_apps to Tomcat.
How to: |
There are many ways to configure Tomcat. Information Builders recommends creating XML files under
<catalina_home>\conf\Catalina\localhost
where:
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.
<catalina_home>\conf\Catalina\localhost
This directory can contain XML files that define contexts. If the Developer Studio installation installed and configured Tomcat for you, the following file should appear to define the ibi_apps context that deploys the webfocus directory:
ibi_apps.xml
If you are using stand-alone Tomcat, the following files should appear as well:
approot.xml ibi_html.xml ibi_help.xml
Note: The installation program silently creates the ibi_html.xml file. This file is installed to run applications that were created using an earlier version of Developer Studio that may have references to the ibi_html alias.
If a custom alias was used for ibi_html, see How to Configure the ibi_html Alias.
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:
Is the absolute path to the WAR file or directory you are deploying.
Is the context root.
Note: They can optionally contain additional information, as explained in Tomcat documentation.
<?xml version='1.0' encoding='utf-8'?> <Context docBase="C:\ibi\DevStudio80\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).
<?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.
<?xml version='1.0' encoding='utf-8'?> <Context docBase="C:\ibi\DevStudio80\webapps\ibi_help" path="/ibi_help"> </Context>
Be sure to specify the correct directory on your machine.
The following procedure only applies to users who have installed earlier versions of Developer Studio and need to configure the ibi_html alias. As of Developer Studio 8, the ibi_html alias is no longer required. All content that was previously accessed through this alias can now be accessed through the ibi_apps alias.
If you select the option to configure Tomcat during the Developer Studio installation process, the ibi_html alias (ibi_html.xml) is created to ensure that older applications with hard coded references to the ibi_html alias will continue to run. The ibi_html.xml file is located in the following directory:
<tomcat_home>\conf\Catalina\localhost\
where:
Is the root location where Apache Tomcat is installed.
Note:
<tomcat_home>\conf\Catalina\localhost\
The following code displays when you open the file.
<?xml version='1.0' encoding='utf-8'?> <Context docBase="C:\ibi\DevStudio80\webapps\ibi_apps" path="/ibi_apps"> </Context>
An example of the updated code is shown below.
<?xml version='1.0' encoding='utf-8'?> <Context docBase="C:\ibi\DevStudio80\webapps\ibi_html.war" path="/ibi_html"> </Context>
You can now use your ibi_html alias.
http://localhost:8080/ibi_apps/
The WebFOCUS home page should appear. If you receive an error, see Troubleshooting Developer Studio.
Reference: |
You should be aware of how to secure the Tomcat TCP ports, and how to reload web applications.
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:
<catalina_home>\conf\server.xml
If you change defaults, substitute accordingly in procedures and examples. You also need to update the Developer Studio connection settings so it knows the correct Tomcat HTTP port if you change the default.
This is not a consideration if you just installed Tomcat with Developer Studio for the first time, only when installing a service pack or new release. When you upgrade Developer Studio or install a service pack, Tomcat must use the new web application rather than cached copies of the old version.
<catalina_home>\work\Catalina\localhost\ibi_apps
For a stand-alone Tomcat configuration, also remove the approot and ibi_html directories.
<catalina_home>\webapps\ibi_apps
<catalina_home>\work\Catalina\localhost\ibi_apps
<catalina_home>\conf\Catalina\localhost\ibi_apps.xml
For a stand-alone Tomcat configuration, remove the approot.xml and ibi_html.xml files as well.
To set up a Unicode environment, follow these steps:
WebFOCUS |