J2EE web applications
A J2EE web application is a collection of JSP pages, Java classes, archive and configuration files and that can be deployed on an application server.
J2EE web applications are assembled and deployed in Web Archive Archive (WAR) file. After placing the components of your web application in the appropriate directory structure, create a WAR file that you can deploy on your application server.
A web application that uses the Web Intelligence Report Engine SDK or Business Objects Enterprise SDK contains:
- JSP and HTML pages.
- Java classes and libraries.
- Application configuration files.
Application configuration files describe the web application and its configuration parameters. Generally these files are standard J2EE components. An example of a standard J2EE configuration file is such as the deployment descriptor. Some application servers require specific configuration files. For more information on these, refer to the documentation provided with your application server.
- Business Objects components
Including Java classes and libraries, as well as applets and other Business Objects components.
Installing Business Objects components
Business Objects SDK components are added to the development machine when BusinessObjects Enterprise XI is installed on the system. To develop a custom Web Intelligence Report Engine SDK application it is necessary to connect to a running BusinessObjects Enterprise server, however, the development environment does not have to be on the same machine as the BusinessObjects Enterprise Server. Install Web Intelligence Report Engine SDK components on a development machine by:
- Run BusinessObjects Enterprise XI installer.
- Click Next on the Business Objects Enterprise XI Installation Wizard panel.
- Select the I accept the License Agreement button in the License Agreement panel.
- Click Next.
- Select the Perform Server Installation
- Click Next.
- Enter your corporate information and keycode.
- Click Next.
- Specify the destination folder in the Destination folder text box.
- Click Next.
- Select the Custom button
- Click Next.
- Deselect all Business Objects Enterprise Features.
- Enable the SDK products feature.
To install J2EE components only, deselect the SDK products feature and install the Java features sub -c omponent.
- Click Next.
- Click Next.
This installs all components necessary to develop custom Business Objects applications; Java libraries are installed and registered correctly and .NET libraries are registered in the GAC.
Assembling a web application
To deploy a custom Web Intelligence application, you must archive the components in a Web Application Archive (.war) file. WAR files are defined in the Java Servlet API 2.2 specification.
To assemble all the components in a WAR file, you must:
- Create the web application directory structure.
WAR files require a specific directory structure. For information on the directory structure, see Assembling Business Objects components for J2EE.
- Add necessary J2EE components in the application directory structure.
- Add the Business Objects components.
For information on how to add the Business Objects components, seeAdding Business Objects components for J2EE.
- Generate a WAR file containing the contents of the directory structure created in step 1.
For information on how to generate a WAR file, see Generating a WAR file.
Defining the web application directory structure
Before you assemble the application components, you must define the directory structure for the application. To do so:
- Create a root directory with an appropriate name for the application
- In the root directory, create the following directory structure.
Structure of a J2EE web application
For more information on the directories necessary to create a web application see page 18.
Web application directories
The table below describes the directories and components needed to create a deployable Web Intelligence Report Engine customized application.
Adding Business Objects components for J2EE
To add the Business Objects components to the application:
- Copy the components manually from your Business Objects XI installation to your web application directory structure.
For information on manually coping the components, see Assembling Business Objects components for J2EE.
Business Objects components that must added to a Web Intelligence Report Engine customized application are described in the next section.
Which Business Objects components does my web application need?
A web application that uses the Web Intelligence Report Engine SDK or Business Objects Enterprise SDK and RAS and Viewers SDK must contain certain basic Business Objects components in addition as the standard J2EE components. You can also include or customize other Business Objects components to create a more elaborate custom application.
The following table lists components and configuration files required by a custom Web Intelligence Report Engine SDK, BusinessObjects Enterprise SDK, RAS or Viewers SDK application. Optional Business Objects components are marked as "opt".
Component | File name | Required/Optional | ||
---|---|---|---|---|
REBean SDK | BOE SDK | RAS + ViewersSDK | ||
| ||||
| ||||
This is the configuration file for the log4j package discussed on page 20. | | | ||
| | |||
| ||||
Apache logging library. This package is required if wilog.jar is used. This package used to debug applications. | | | ||
Third party components for using XML and XSL, included in the Business Objects installation. | | | | |
Classes common and necessary for both REBean.FC and REBean.WI. | | | ||
Classes necessary to work with DesktopIntelligence documents. | | | ||
| | |||
Interfaces for the Web Intelligence Report Engine object model. | | | ||
Contains the gateway between the Web Intelligence Java Report Panel and its server. It is required when if the Java Report Panel is used. | | | ||
Web Intelligence Java Report Panel This is used for a web application used to create and edit Web Intelligence documents. Note: you can create and edit documents using the REBean package rather than using the Java Report Panel. For more information, see the Customizing Web Intelligence with REBean guide. | | | ||
Web Intelligence HTML cascading style sheets These files are required for the Web Intelligence HTML viewer. | | | ||
Default settings for the Web Intelligence Java report panel. Required only when the Java Report Panel (ThinCadenza.jar) is included in the web application. | | | ||
Default settings for Web Intelligence report creation when using Web Intelligence Report Engine SDK. | | | ||
JavaScript files used to provide DHTML popup menu functionality. | | | ||
Image files for viewing Web Intelligence documents in HTML format. These images required for all applications unless documents are viewed in PDF or Excel format only. | | | ||
| | |||
| | |||
| | |||
| | |
How do the Business Objects components fit together?
Business Objects components provide Web Intelligence, BusinessObjects Enterprise and Crystal Reports functionality and support utilities to the application. They enable the application to access the Business Objects cluster. The deployed web application uses the data in the Business Objects configuration files to access the Business Objects cluster.
Web Intelligence Report Engine SDK applications
The figure below shows how Business Objects components fit in a custom Web Intelligence application. It illustrates how components relate to the Business Objects deployment.
Assembling Business Objects components for J2EE
The rest of this guide is concerned with the Business Objects Enterprise SDK, Web Intelligence Report Engine SDK and associated REBean samples.
After you create the directory structure (see Defining the web application directory structure), you must place application components in the appropriate directories.
This section explains where in the directory structure you must place each component. It also lists the source for each component. A component may be created by a developer or copied from an existing Business Objects product or web application.
For a description of each component, see Which Business Objects components does my web application need?.
The document root directory
You must add application components that will be accessed directly by the client browser in the document root directory. The following table lists the standard J2EE and Business Objects components that must be stored in the document root directory or an appropriate subdirectory as well as the source of each component.
Component | File name | Source |
---|---|---|
created by the application developer or copied from one of the WAR files in $INSTALLDIR/Tomcat/ | ||
Note: If your application server is configured to run with a web server, you can deploy static resource files on the web server while deploying the rest of the application on the application server. See Static resource files. | | |
Web Intelligence HTML cascading style sheets These files must be accessible to the JSP pages that are using them. | ||
Web Intelligence HTML generation scripts These scripts must be accessible to the JSP pages that are using them. They are required for applications that view Web Intelligence documents. | ||
image files for Web Intelligence HTML generation The images directory should be in the directory where the JSP pages that are using it are stored. Note: You must not rename the Web Intelligence images directory when you copy it to an application. |
The /WEB-INF directory
Add private files that are not served to clients in the /WEB -I NF directory.
The deployment descriptor, web.xml must be stored in the /WEB -I NF directory. Web.xml can be created manually, generated by your development environment or retrieved from an existing application and modified.
Deployment descriptor
A WAR archive requires at least one deployment descriptor file called web.xml, that is stored in the WEB -I NF directory. The deployment descriptor is an XML file that describes the web application and the components it contains.
Some application servers also require their own additional deployment descriptors. For information, refer to your application server documentation.
Example: Deployment descriptor
The following text is an example of a simple deployment descriptor. In the file an web application ID, name and a description are defined.
< ? xml version="1.0" encoding="UTF -8 " ? >
<!DOCTYPE web -a pp PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.2//EN" "http://java.sun.com/j2ee/dtds/
web -a pp_2_2.dtd">
<web -a pp id="web_application_ID">
<display -n ame>web_application_name</display -n ame>
<description>web_application_description</description>
</web -a pp>
The /WEB-INF/classes directory
Application components may use servlets or classes that are not served directly to the client. Place servlet and utility classes used only by the application in the /WEB -I NF/classes directory.
The following table lists Business Objects components that must be stored in the /WEB -I NF/classes directory and where to find them.
Component | File name | Source |
---|---|---|
See also the Apache logging package listed in The WebiApplet/AppletConfig directory. | ||
Default settings for Web Intelligence reports created using Web Intelligence Report Engine SDK. The defaultConfig.xml file is also deployed in the /WebiApplet/AppletConfig directory to set default settings for the Web Intelligence Java Report Panel. See The WebiApplet/AppletConfig directory. |
The WebiApplet directory
The WebiApplet directory contains files necessary to use the Web Intelligence Java Report panel. The following table shows the files in the directory:
Component | File name | Source |
---|---|---|
Note: the WEBI -I NF/classes folder also contains files necessary for the Web Intelligence Java Report Panel. See The /WEB -I NF/classes directory for more information.
The WebiApplet/AppletConfig directory
Applications that use the Java Report Panel use the configuration files found in the WebiApplet/AppletConfig folder to retrieve default settings for Java Report Panel. The following table shows the files in the directory:
Component | File name | Source |
---|---|---|
Default settings for the Web Intelligence Java Report Panel. The defaultConfig.xml file is also deployed in the /WEBI -I NF/classes directory. It is used to set default values when creating Web Intelligence documents using theWeb Intelligence Report Engine SDK. See The /WEB -I NF/classes directory | %CommonProgramFiles%/Business Objects/3.5/java/webiApplet/AppletConfig |
The /WEB-INF/lib directory
Applications may contain classes or JAR files that are not served to the client. Place JAR files used only by the application in the /WEB -I NF/lib directory.
The following table lists Business Objects and third party components that must be stored in the /WEB -I NF/lib directory and where to find them.
Component | File name | Source |
---|---|---|
See also the log4j properties file listed in The /WEB -I NF/classes directory | ||
The /META-INF directory
The META -I NF directory contains a standard manifest file, manifest.mf which can contain information about the files packaged in the WAR file.
The manifest file in a WAR file is the same as manifest file contained in a JAR file. Manifest.mf is generated when you create the WAR file or you can create it manually. For information, see http://java.sun.com.
Generating a WAR file
When you have created and assembled the components of your application, you must generate the WAR file that will be deployed on your application server. You can do so using one of the following methods:
- The JAR utility included in Java 2 SDK.
You can find more information about the JAR utility at:
- A WAR generation tool included with some application servers or development environments.
Static resource files
If your application server is configured to run with a web server, you can deploy static resource files on the web server. For more on static resource files, see Static resources on a web server.
<script language="JavaScript" type="text/javascript"> </script> <script src="DeploymentGuideHTML.js" type="text/javascript"></script>
![]() ![]() |
Business Objects http://www.businessobjects.com/ Support services http://www.businessobjects.com/services/support/ |