When a JSP executes a servlet bean, the dsp:droplet cycles through its code internally several times in order to arrange the servlet bean code in a manner that is cohesive with the expectations of open parameters.
Note: All references to dsp:droplet in this section describe the dsp:droplet tag or its class. The term servlet bean refers to a specific kind of bean implemented by a dsp:droplet tag.
Consider how the ATG platform processes this example:
<dsp:droplet name="/atg/dynamo/droplet/ForEach"> <dsp:param name="array" bean="/samples/Student.subjects"/> <dsp:oparam name="output"> <p><dsp:valueof param="element"/> </dsp:oparam> </dsp:droplet>
The
dsp:droplettag is called.dsp:dropletallows its body to be executed once. During that execution, the nested input parameter tags (in this case, justarray) pass their information back todsp:droplet, which uses it to construct a table of input parameter names (array) and values (Reading;Writing;Arithmetic). The open parameter tags are ignored during this phase.dsp:dropletfinds the servlet bean referenced by thedsp:droplet“name="property (forEach) and calls the servlet bean’sservice()method with the input parameter values collected during step #2 (Reading;Writing;Arithmetic).As the servlet bean executes, it halts calls to
setParameterandserviceParameter, and instead records them as a list ofDropletActions. These methods are organized in a manner that is readable by the open parameters that process them and are made available to open parameters for execution.The
dsp:dropletparses through eachsetParameterandserviceParametermethod inDropletActions:setParameterdirects thedsp:dropletto set the specified request parameter to the recorded name (output) and value (element).serviceParameterinstructs thedsp:dropletto allow its body to be executed. This causes the related open parameter to run (elementequalsReading;Writing;Arithmetic).
After the
dsp:dropletfinishes theDropletActionslist, servlet bean execution ends.

