A convenient way to integrate a Web application with a deployed Inline Service is to use the JSP client integration tags. JSP allows you to generate interactive Web pages that use embedded Java. The JSP tags provided are based on the Java Smart Client discussed in the previous chapter.
There is negligible overhead when using the JSP tags. In addition, the tags incorporate automatic reuse of Smart Clients for same session to enhance performance. When a Java Smart Client is created using the JSP tag, a check is performed to see if a client already exists with the same name and properties and has not been closed. If it does, it automatically reuses that client; if not it will create a new one.
For full information about the JSP Smart Client tags, see the Decision Studio online help.
This chapter contains the following topics:
You must perform the following tasks first before you can work with the JSP client integration tags:
Install a Java Development Kit (JDK), with the
JAVA_HOME environment variable set to its location. To obtain a JDK, go to the site:
For more details about supported versions, see the documents referenced in Section 6.4, "System Requirements and Certification."
Install the Oracle RTD files and deploy Oracle RTD to an application server. See Oracle Fusion Middleware Installation Guide for Oracle Business Intelligence for full information.
The Java Smart Client example works with the sample CrossSell Inline Service. Because of this, you must first populate the Oracle RTD Database with the CrossSell example data, then deploy the CrossSell Inline Service using Decision Studio. For details, see the section "Populating the CrossSell Example Data" in Oracle Fusion Middleware Administrator's Guide for Oracle Real-Time Decisions and Part III, "Decision Studio Reference" for information about deploying Inline Services.
Start Real-Time Decision Server. For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle Real-Time Decisions.
In general, integration using the Java Smart Client includes the following steps:
Prepare a properties file.
Use an Invoke or AsyncInvoke tag to create a request to the server.
Gather and parse any response information from Advisors.
Close the connection.
A working example of using the Smart Client JSP tags for integration can be found at
\client\Client Examples\JSP Client Example\example.jsp.
If your Real-Time Decision Server port is not 8080, you must edit the client properties information before deploying the JSP Smart Client example, as follows:
\client\Client Examples\JSP Client Example\sdclient-test.war with WinZip or WinRAR.
Search for the entry:
HTTP1.url = http://localhost:8080
Change the URL
localhost:8080 to match the host and port of the Real-Time Decision Server that you are using.
Save the file back into
For this example, the CrossSell Inline Service has been integrated to a simple command-line application to demonstrate how to use the Smart Client for integration. You need to deploy the JSP Smart Client example to your application server, as described in the following sections.
This section contains the following topics:
To deploy the JSP Smart Client example to WebLogic:
Access the WebLogic Server Administration Console for your Oracle RTD domain at the URL
/console. At the login prompt, enter the administrator user name and password.
In the tree on the left, click Deployments.
Click Install. You may need to click Lock & Edit first to enable the Install button.
/client/Client Examples and select JSP Client Example, then click Next.
Select Install this deployment as an application, then click Next.
On the Optional Settings page, enter
JSPClientExample for Name. Then, click Next.
Review your settings and click Finish.
Click Save, then click Activate Changes.
Start the application by selecting JSPClientExample application in the Deployments table, then clicking Start > Servicing all Requests. When prompted, click Yes. The application is now running.
To access the application, open a Web browser and go to:
The first web page that appears prompts you for username and password. After you have provided both, a Web page appears that simulates a service call, as shown in Figure 8-1.
Enter a customer ID (such as
5) and click OK. A response page appears, displaying an offer and an option to end the call, as shown in Figure 8-2.
Click the offer link, or click End this call.