Comparison of DSP and DSPEL
by Frank Kim on Apr.29, 2008, under Page Development, Subversion
ATG has two JSP tag libraries, DSP and DSPEL. Both have similar syntax but DSPEL allows you to use JSTL.
Here’s a simple comparison of how you would use DSP versue how you would use DSPEL to do a simple RQL query.
DSPEL
<dspel:droplet name="/atg/dynamo/droplet/RQLQueryForEach">
<dspel:param name="repository" bean="/betweengo/Repository"/>
<dspel:param name="itemDescriptor" value="Merchant"/>
<dspel:param name="queryRQL"
value="name EQUALS \"${requestScope['nm']}\""/>
<dspel:oparam name="empty">
No merchant with the name "<c:out value="${requestScope['nm']}"/>".
</dspel:oparam>
<dspel:oparam name="output">
Name: <dspel:valueof param="element.name"/>
</dspel:oparam>
</dspel:droplet>
DSP
<% String query = "name EQUALS \"" + request.getAttribute("nm") + "\"";%>
<dsp:droplet name="/atg/dynamo/droplet/RQLQueryForEach">
<dsp:param name="repository" bean="/betweengo/Repository"/>
<dsp:param name="itemDescriptor" value="Merchant"/>
<dsp:param name="queryRQL" value="<%= query %>"/>
<dsp:oparam name="empty">
No merchant with the name "<%= request.getAttribute("nm") %>".
</dsp:oparam>
<dsp:oparam name="output">
Name: <dsp:valueof param="element.name"/>
</dsp:oparam>
</dsp:droplet>
Related posts:
August 4th, 2008 on 1:58 AM
what is the difference between and