WebFOCUS Release 8.0 Versions 10 and 09 > App Studio > WebFOCUS App Studio Installation and Configuration Guide > Configuring the Web Server or Application Server
Configuring Apache Tomcat
In this section:
- Tomcat Configuration Overview
- Configuring Tomcat
- Additional Tomcat Configuration Options
- Apache Tomcat Application Server Unicode Configuration
- Deploying the App Studio Help on a Remote Application Server
The App Studio installation provided the option to installand configure Apache Tomcat for you. If you chose this option andthe verification tool ran successfully, you do not need to manuallyconfigure Tomcat. However, if you are not familiar with Tomcat, youmay wish to review this section to understand the configurationprocess.
Note:
- If Tomcat is notyet installed, install it at this time. You can install Tomcat by restartingthe App Studio installation program, choosing the Full Install option,choosing the Apache Tomcat installation option,and deselecting the App Studio option.
- Tomcat uses TCP ports8080, 8009, and 8005 by default. If you need to change them, see Tomcat Ports.
- If App Studio installsTomcat, it increases the default Java VM memory options. If youmanually install Tomcat or need to troubleshoot memory issues, see Java Memory Issues.
Top of page |
Tomcat Configuration Overview
To configure Tomcat, you tell Tomcat where App Studiofiles are located and the contexts in which to use them. For example, theWebFOCUS web application is installed with App Studio in:
drive:\ibi\AppStudio80\webapps\webfocus
Tomcat must know to serve files from the web application whenit 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 afterit 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.
- When using Tomcatas both web and application server, the following contexts mustbe created:
Context (path)
Directory (DocumentBase)
/ibi_apps
drive:\ibi\AppStudio80\webapps\webfocus
/ibi_apphelp
drive:\ibi\AppStudio80\webapps\ibi_apphelp
/approot
drive:\ibi\apps
- When using Tomcatas the application server and IIS as the web server, create only onecontext on Tomcat:
Context (path)
Directory (DocumentBase)
/ibi_apps
drive:\ibi\AppStudio80\webapps\webfocus
/ibi_apphelp
drive:\ibi\AppStudio80\webapps\ibi_apphelp
The ibi_apphelp and approot contexts are thencreated as aliases (Virtual Directories) on IIS and IIS is configuredto send requests for ibi_apps to Tomcat.
Top of page |
Configuring Tomcat
How to:
- Create Contexts for Apache Tomcat
- Test the Tomcat Configuration
There are many ways to configure Tomcat. InformationBuilders 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.
Top of page |
Procedure: How to Create Contexts for Apache Tomcat
- Stop Tomcatfrom the Windows Services window by right-clicking ApacheTomcat and choosing Stop.
- Navigateto the following directory in Windows Explorer or My Computer:
<catalina_home>\conf\Catalina\localhost
This directory can contain XML files that definecontexts. If the App Studio installation installed and configuredTomcat for you, the following files should appear to define theibi_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 youwould use to access the web application and should have the followingsyntax:
<?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 fileor directory you are deploying.
- contextRoot
-
Is the context root.
Note: They can optionally contain additional information,as explained in Tomcat documentation.
- If the ibi_apps.xmlfile does not exist, create it using Notepad. For example:
<?xml version='1.0' encoding='utf-8'?><Context docBase="C:\ibi\AppStudio80\webapps\webfocus" path="/ibi_apps"></Context>
Be sure to specifythe correct directory on your machine and change the context rootif you are not using the default (ibi_apps).
- If you areusing stand-alone Tomcat and approot.xml does not exist, createit using Notepad. For example:
<?xml version='1.0' encoding='utf-8'?><Context docBase="C:\ibi\apps" path="/approot"></Context>
Be sure to specifythe correct directory on your machine.
- If you areusing stand-alone Tomcat and ibi_apphelp.xml does not exist, createit 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 specifythe correct directory on your machine.
See AlsoStarting/Stoping Tomcat Server - RestartTomcat from the Services window.
Top of page |
Procedure: How to Test the Tomcat Configuration
- Ensure thatTomcat has been restarted.
- Test theibi_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 receivean error, see Troubleshooting App Studio.
Top of page |
Additional Tomcat Configuration Options
Reference:
- Tomcat Ports
- Reloading Web Applications
- Additional Configuration Steps
You should be aware of how to secure the Tomcat ManagerWeb Tool, Tomcat TCP ports, and how to reload web applications.
Top of page |
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 usingthis port. For example: http://localhost:8080 |
8009 | Connector Port | Web servers can route servlet requests toTomcat on this port. The Tomcat connector (plug-in) for IIS uses thisport. Tomcat listens on this port even if no web server is connecting. |
8005 | Shutdown Port | Tomcat uses this port for internal operationsand for shutting down. |
If these ports are not availableor you wish to change them, do the following:
- Open the followingfile in a text editor:
<catalina_home>\conf\server.xml
- Search for the portnumbers you wish to replace (8080, 8009, 8005) and replace themwith the ports you wish to use.
- Save and exit thefile.
- Restart Tomcat.
If you change defaults, substitute accordingly in proceduresand examples. You also need to update the App Studio connectionsettings so it knows the correct Tomcat HTTP port if you changethe default.
Top of page |
Reference: Reloading Web Applications
This is not a consideration if you just installed Tomcatwith App Studio for the first time, only when installing a servicepack or new release. When you upgrade App Studio or install a servicepack, Tomcat must use the new web application rather than cachedcopies of the old version.
- If the expanded webfocusdirectory was deployed, the new web applications should be usedautomatically, but you should remove the following directory andrestart Tomcat.
<catalina_home>\work\Catalina\localhost\ibi_apps
For a stand-alone Tomcat configuration, also removethe approot and ibi_apphelp directories.
- If you deploy thewebfocus.war file or your new release is located in a different directoryfrom the old release, remove the following, recreate the context,and restart Tomcat:
<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, removethe approot.xml file as well.
Top of page |
Reference: Additional Configuration Steps
If you are using Tomcat as the application server andIIS as the web server, configure IIS, as explained in the next section.
Top of page |
Apache Tomcat Application Server Unicode Configuration
To set up a Unicode environment, follow these steps:
- Edit the server.xmlfile located under drive:\ibi\tomcat\conf.
- Add useBodyEncodingForURI="true"to the Connector, as shown in the following image.
- Recycle the TomcatApplication Server to activate.
Top of page |
Deploying the App Studio Help on a Remote Application Server
This section is required if you are deploying the AppStudio Help system on a remote application server. The App StudioHelp web application must be deployed to an application server.
If Tomcat is your remote application server, you can do one ofthe following:
- Copy the ibi\AppStudio80\webapps\ibi_apphelp folder, tothe following location, and restart Tomcat.
<catalina_home>\webapps
or
- Create a context that points to the deployed Help web application.Create the context ibi_apphelp.xml, and place it in the followinglocation:
<catalina_home>\conf\Catalina\localhost\
Thexml should include the following syntax:
<?xml version='1.0' encoding='utf-8'?><Context docBase="drive:\ibi\AppStudio80\webapps\ibi_apphelp" path="/ibi_apphelp"></Context>
To configure the App Studio Help on a remote application serverother than Tomcat, you must deploy the ibi_apphelp.xml web applicationto the server.
WebFOCUS |