<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import = "oracle.portal.provider.v2.render.PortletRenderRequest,
                  oracle.portal.provider.v2.http.HttpCommonConstants"
%>

This portlet has two public portlet parameters that can receive 
values from page parameters. 

<p><p>
<table border=1>
    <tr>
        <th align=left>Parameter Name</th>
        <th align=left>Value</th>
    </tr>
<%
try
{
    PortletRenderRequest portletRequest = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);

    //
    // The portlet definition in provider.xml includes 
    // public portlet parameters "param1" and "param2"
    //
    String[] names = { "param1", "param2" };

    // Display values for each of the public portlet 
    // parameters "param1" and "param2"
    for ( int i = 0; i < 2; i++ )
    {
        // Get the public portlet parameter values
        String[] values = portletRequest.getParameterValues(names[i]);

        // Display the parameter's values.
        // Each portlet parameter can have 0, 1, or multiple values.  
        if ( values == null )
        {
            // No values for this parameter.
%>
    <tr>
        <td><%= names[i] %></td>
        <td>No values have been submitted yet.</td>
    </tr>
<%
        }
        else
        {
            // Display each non-null value of the current parameter 
            // on a separate line.
            for ( int j = 0; (values != null) && (j < values.length); j++ )
            {
%>
    <tr>
        <td><%= names[i] %></td>
        <td><%= values[j] %></td>
    </tr>
<%
            }
        }
    }
}
catch (Exception e)
{
%>
    <br>Exception occurred: <%= e.getMessage() %>
<%
}
%>

</table>

