Each servlet bean has a predefined set of parameters that control the servlet bean’s behavior. Servlet beans have three types of parameters:


Input parameters are passed into the servlet bean. For example, the ForEach servlet bean requires the input parameter array to identify the type of data to process—in the following extract, the component array property Student_01.subjects:

<dsp:droplet name="/atg/dynamo/droplet/ForEach">
  <dsp:param name="array" bean="/samples/Student_01.subjects"/>
  <dsp:oparam name="outputStart">
    <p>The student is registered for these courses:</p>
  <dsp:oparam name="output">
    <li><dsp:valueof param="element"></dsp:valueof></li>

Output parameters are set by the servlet bean. In the previous example, element is an output parameter that contains the value of the current array element. As the ForEach bean cycles through the subjects array, element is successively set to each element value. Thus, if there are five elements in the array, on each loop iteration element is set to five different values.


Open parameters are marked by dsp:oparam tags, and specify code to execute at different stages of servlet processing. The previous example uses three ForEach servlet bean open parameters:

The HTML that is rendered by the example’s open parameters might look like this:

<p>The student is registered for these courses:
<li>Victorian Poetry</li>

While output parameters are set by the servlet bean, they are rendered on the page only if they are referenced in an open parameter. In this example, the output parameter element is set by the servlet bean, but the dsp:valueof tag in the open parameter is used to display the element values.

Note: Certain HTML tags cannot overlap different open parameters. For example, the open and close tags of dsp:form<dsp:form> and </dsp:form>—must both be embedded in the same open parameter. This constraint applies to the following DSP tags:

<dsp:a href="...>
<dsp:form ...>
<dsp:textarea ...>