In this section: |
Note: If you chose the option for the WebFOCUS installation to install Tomcat, you can skip this chapter. Tomcat will be configured as a Tomcat stand-alone configuration.
This section explains how to install and configure Apache Tomcat.
Tomcat can be used as both a web server and application server where all processing is done by Tomcat. This is referred to as a Tomcat stand-alone configuration.
Steps are the following:
How to: |
To prepare Tomcat for WebFOCUS, you need to choose how to create WebFOCUS graphics and add the ReportCaster JDBC driver.
To generate and display certain graphics, WebFOCUS Servlets either need access to an X Server or they can use the Java VM headless option. You can set either by editing the setenv.sh file.
/tomcat_home/bin/setenv.sh
Near the beginning of the file just after the commented section, add the appropriate DISPLAY and XAUTHORITY definitions. For example:
export DISPLAY=xserver_host:0.0 export XAUTHORITY=/home/user/.Xauthority
where:
Is the host name or IP Address of a machine that is running an X server.
Is the user name that created the .Xauthority file.
Note: Graphics are not actually displayed on the machine you set to DISPLAY, but WebFOCUS Servlets must access this X Server to generate graphics. After finishing this chapter, be sure to review the tests to verify graphics in Verifying and Troubleshooting Server Side Graphics (PCHOLD).
/TOMCAT_HOME/bin/setenv.sh
You can add the headless option by setting the $JAVA_OPTS variable. Add the following line and then save the changes:
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
To set the Tomcat CLASSPATH:
/tomcat_home/bin/setenv.sh
export CLASSPATH="$CLASSPATH":/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar
If your jt400.jar file is in a different location, substitute the correct location in the CLASSPATH setting.
How to: Reference: |
Configuring Tomcat mainly requires telling Tomcat where WebFOCUS files are located and the context roots in which to use them. For example, you must tell Tomcat to serve files from the WebFOCUS web application:
/install_directory/ibi/WebFOCUS80/webapps/webfocus
When it receives a request for the WebFOCUS context root:
http://TomcatHost:tomcatHTTPport/ibi_apps
By creating this context, you deploy the WebFOCUS web application.
Context Path: /ibi_apps
WAR or Directory URL:
/install_directory/ibi/WebFOCUS80/webapps/webfocus
Context Path: /ibi_help
WAR or Directory URL:
/install_directory/ibi/WebFOCUS80/webapps/ibi_help
The ibi_help and approot contexts are then created as aliases on the HTTP Server. The HTTP Server is then configured to send requests for ibi_apps to Tomcat. However, this assumes the HTTP Server handles some WebFOCUS content directly. If you want the HTTP Server to only forward requests through a firewall, do not create aliases on the HTTP Server, but instead configure Tomcat to handle all WebFOCUS content.
Context Path | WAR or Directory URL |
---|---|
/ibi_apps | /install_directory/ibi/WebFOCUS80/webapps/webfocus |
/ibi_help | /install_directory/ibi/WebFOCUS80/webapps/ibi_help |
/approot | /install_directory/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, a traditional web server alias is treated like a context root, even when serving files outside of a web application.
There are several ways to create contexts:
This procedure explains how to create contexts using the web-based tools. When you create a context for a web application, the web application is deployed.
/tomcat_folder/bin/catalina.sh start
http://tomcat_host:tomcat_port
You may need to log on based on settings in:
/tomcat_folder/conf/tomcat-users.xml
Context Path: /ibi_apps
WAR or Directory URL:
/installation_directory/ibi/webfocus80/webapps/webfocus.war
Context Path:/ibi_help
WAR or Directory URL:
/installation_directory/ibi/webfocus80/webapps/ibi_help.war
Context Path:/approot
WAR or Directory URL:
/installation_directory/ibi/webfocus80/webapps/approot.war
Note: This process may take some time to complete.
After deploying the WebFOCUS web applications, you can test them in a browser as follows:
http://TomcatHost:TomcatHTTPport/ibi_apps
A WebFOCUS 8 welcome page is displayed.
If the page fails to load, restart Tomcat, and ensure it can compile JSP files. In some environments, the very first time a JSP file is compiled you might receive an error.
This is not a consideration if you just installed WebFOCUS for the first time, but you should be aware of it for when you install a service pack or new release. When you upgrade WebFOCUS or install a service pack, Tomcat must use the new web applications rather than cached copies of the old version.
/tomcat_home/work/Catalina/localhost/ibi_apps
/tomcat_home/work/Catalina/localhost/ibi_help
/tomcat_home/work/Catalina/localhost/approot
/tomcat_home/conf/Catalina/localhost/ibi_apps.xml
/tomcat_home/work/Catalina/localhost/ibi_apps
/tomcat_home/webapps/ibi_apps
Note: When you deploy WAR files, Tomcat expands them into its own directory structure and does not always know the original location.
How to: |
After finishing the configuration, run test calls to verify operability.
http://hostname:port/ibi_apps/
where:
Are the host name and port of the web server. However, if you use an application server only configuration, then these are the host name and HTTP port of the application server. For Tomcat standalone configurations, the default port is 8080. If you require SSL, use https instead of http.
The WebFOCUS Sign In page opens, as shown in the following image.
The WebFOCUS Business Intelligence Portal Welcome page opens in your web browser. Your Welcome page may have different folders displayed.
The WebFOCUS Administration Console opens.
The following page opens, which lists your WebFOCUS Reporting Server instance if it is available.
If your WebFOCUS Reporting Server is running with Security enabled (ON), then you are prompted for WebFOCUS Reporting Server credentials, as shown in the following image.
If you receive an error, ensure that your WebFOCUS Reporting Server is running and that valid credentials are used.
The Run a Stored Procedure page opens, as shown in the following image.
A procedure is normally launched using the WebFOCUS Servlet and a sample report should display. You can also call the servlet directly to run a specific procedure, such as carinst.fex. For example:
http://host:port/ibi_apps/WFServlet?IBIF_ex=carinst
Be aware that you may need to increase your Java memory settings if you are using InfoAssist. For more information, see Java Memory Issues.
WebFOCUS |