ATG JSP tags with sample codes

Below are the few usages of JSP tags in ATG context.

1.Setting Bean values in different ways

Setting Bean from a parameter

<dsp:a href="myfile.jsp" bean="" paramvalue="user">

some text...


Setting Bean from a constant

<dsp:a href="myfile.jsp" bean="" value="sebastian">

some text...



<dsp:getvalueof id="name" bean="" idtype="java.lang.String">

this can be used inside other tags(dsp or jstl) or in the page itself using scriplet tags.given below one usage.

<c:if test="${empty name}">

<c:set var="name" value="atg_store_formValidationError"/>



The setvalue tag allows you to set a bean property or page parameter with a value copied from another bean property,page parameter or constant.

Setting a parameter value to bean value

<dsp:setvalue param="myparam" beanvalue=""/>

setting a bean value to a page parameter

<dsp:setvalue bean="" paramvalue="myparam"/>

setting a parameter value to a constant

<dsp:setvalue param="myparam" value="Hello World"/>

setting a bean value to a constant

<dsp:setvalue bean="" value="Hello World"/>


Setting param from constant

<dsp:param name="amount" value="20.12"/>

setting param from a component

<dsp:param name="repository" bean="/atg/userprofiling/ProfileAdapterRepository" />

setting param from an inscope parameter

<dsp:param name="id" value="element.repositoryId"/>

See usages for other tags as well.


Post a Comment

Related Posts Plugin for WordPress, Blogger...