Consider the following code snippet:
<dsp: param name = “first” value = “joe”/>
<dsp:droplet name “printName”>
<dsp:param name = “last” value = “Bruin”/>
</dsp:droplet>
To get an output of “Joe Bruin”, which two methods should the droplet use in the code?
A.
getLocalParameter(“first”) and getLocalParamter(“last”)
B.
getParameter(“first”) and getLocalParameter(“last”)
C.
getLocalParameter(“first”) and getParameter(“last”)
D.
getPageParameter(“first”) and getParameter(“last”)
Explanation:
first is a page parameter. We use getPageParameter to access it.
last is a bean parameter. We use getParameter to access it.
Note: dsp:param
Identifies a servlet bean input parameter; or defines a page parameter.
<dsp:param name=”sbparam
–
name” sb
param-value />
<dsp:param name=”pgparamname” pgparam-value />
attributes
name (servlet bean)
Identifies an input parameter that is defined for the current servlet bean. For information on input
parameters for specific servlet beans, see Appendix B, ATG Servlet Beans.
name (page parameter)
Defines a page parameter that is accessible to the current JSP and embedded child pages.
ATG Page Developer’s Guide, dsp:param