Now that you have successfully installed the PDK-Java Framework and Samples, you may now want to build portlets that pass parameters from on JSP to another JSP and render each result in the same portlet container (window). This portlet sample is implemented as a JSP and displays a portlet that asks the user to complete a survey. The survey takes place over two JSPs and displays information based on the user's answers in the third JSP. The information from the second and third JSP is displayed in the same portlet container as the original JSP. This article describes how to install and view the Multipage Form Portlet sample.
You have already successfully installed PDK-Java Framework and Samples by following the Installing the PDK-Java Framework and Samples article.
You have already download and extracted the sample into the following directory: D:\pdk\jpdk\providers\multipageform\. This article assumes that you are using the directory specified. For other directories, simply adjust as needed.
Installing the Multipage Form Portlet Sample (this article).
provider.xml - XML provider definition that points to the first JSP (Page1.jsp).
Page1.jsp - First page of survey.
Page2.jsp - Second page of survey.
Page3.jsp - Survey results.
Note: It is important to backup all files prior to making changes. This section will update one Oracle9iAS HTTP Server configuration files (zone.properties and jserv.properties).
Stop the Oracle9iAS HTTP Server.
Under the D:\pdk\jpdk\providers\multipageform directory is another directory called multipageform. Copy this directory under your document root for Oracle9iAS.
For example: D:\Oracle9iAS\Apache\Apache\htdocs\
becomes
D:\Oracle9iAS\Apache\Apache\htdocs\multipageform
So, under D:\Oracle9iAS\Apache\Apache\htdocs\multipageform, you should have four files: Page1.jsp, Page2.jsp, Page3.jsp, and UserInfo.class.
Open the zone.properties file. This document uses the root zone which has a virtual path of "/servlets". For manageability, you may choose to use a different zone.
Under the Servlet Aliases section, add the alias that points to the Provider Adapter:
servlet.multiform.code=oracle.portal.provider.v1.http.HttpProvider
Under the Aliased Servlet Init Parameters section, add the initial arguments needed by the sample. This points the Adapter (sample) to the location of the provider.xml file. Make sure to modify the directory to point to the correct location of the provider.xml file.
servlet.multiform.initArgs=provider_root=D:\pdk\jpdk\providers\multipageform,sessiontimeout=1800000,debuglevel=1
Save and close the zone.properties file.
The sample includes a XML provider definition called provider.xml. You will need to modify the physicalRoot and provide the correct location of your document root.
Open the provider.xml file. It is location in D:\pdk\jpdk\providers\multipageform.
You should not need to modify the appRoot tag if you have a directory called multipageform below your document root.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?providerDefinition version="2.0"?>
<!DOCTYPE provider [
<!ENTITY virtualRoot "/">
<!ENTITY physicalRoot "D:\ORACLE9iAS\Apache\Apache\htdocs\">
]>
<provider class="oracle.portal.provider.v1.http.DefaultProvider">
<session>true</session>
<useOldStyleHeaders>false</useOldStyleHeaders>
<portlet class="oracle.portal.provider.v1.http.DefaultPortlet">
<id>1</id>
<name>MultipageFormPortlet</name>
<title>Multipage Form Portlet</title>
<description>This portlet sample displays parameter passing from one JSP to another in the same portlet window.</description>
<timeout>30</timeout>
<timeoutMessage>Multipage Form Portlet timed out</timeoutMessage>
<acceptContentType>text/html</acceptContentType>
<defaultLocale>en.US</defaultLocale>
<renderer class="oracle.portal.provider.v1.RenderManager">
<appPath>&virtualRoot;multipageform</appPath>
<appRoot>&physicalRoot;multipageform</appRoot>
<contentType>text/html</contentType>
<charSet>UTF-8</charSet>
<renderContainer>true</renderContainer>
<renderCustomize>false</renderCustomize>
<showPage>Page1.jsp</showPage>
<pageParameterName>next_page</pageParameterName>
</renderer>
</portlet>
</provider>
You can test that you have properly setup the sample by using Oracle9iAS.
Start the Oracle9iAS HTTP Server
Execute the sample from the Oracle9iAS listener. This refers to the Oracle9iAS listener where you configured your sample.
For example: http://myserver.mydomain.com:port/servlet/multiform
After setting up the Web Provider with the Oracle9iAS HTTP Server, you can now register the provider with Oracle9iAS Portal.
Under the Administer tab, click on Add a Portlet Provider within the portlet called Provider.
Name: MultiPageFormProvider
Display Name: Multipage Form Provider
Timeout: 40
Timeout Message: Multipage Form Provider Timed Out
Implementation Style: Web
Register on Remote Nodes: No
Provider Login Frequency: Once per User Session
URL: http://myserver.mydomain.com:port/servlet/multiform (replace this with your URL)
Check the following radio button: The user has the same identity in the HTTP providers application as in the Single Sign-On identity.
Proxy: No (As long as no proxy is required to contact the Provider Adapter).
Click OK.
Revision History:
February 28, 2002.