You can use dsp:getvalueof and dsp:tomap tags to extract data from a component or parameter and place it in a scripting variable, which can then be referenced by other library tags that support Java expressions.

In the following example, dsp:getvalueof sets the bgcolor variable to the value held by the Profile.preferredColor property. When the ATG platform processes the body color code, it retrieves the bgcolor value and uses it to set the current page background color:

<dsp:getvalueof id="bgcolor" bean="Profile.preferredColor">
  <body bgcolor="<%=bgcolor%>">
</dsp:getvalueof>

DSP tags can also reference scripting variables in Object runtime expressions. In the following example, dsp:getvalueof sets the scripting variable profile to the Profile component. The dsp:param tag sets the page parameter userRole from the component’s Role property, which it obtains from the runtime expression <%=profile.getRole()%>:

<dsp:getvalueof id="profile" bean="atg/userprofiling/Profile">
  <dsp:param userRole="value" value="<%=profile.getRole()%>"/>
</dsp:getvalueof>
 
loading table of contents...