Spoonfeed


Let us analyze this simple RDC-based JSP:

10.  <%@ page language="java" contentType="application/vxml" %>
20.  <%@ taglib prefix="rdc" uri="http://jakarta.apache.org/taglibs/rdc-1.0"%>
30.
40.  <vxml version="2.0" xml:lang="en-US"  xmlns="http://www.w3.org/2001/vxml" >
50.  <jsp:useBean id="dialogMap" class="java.util.LinkedHashMap" scope="session"/>
60.  <rdc:task map="${dialogMap}">
70.
80.    <rdc:alpha id="alpha" minLength="4" maxLength="8" numNBest="5" 
90.      echo="true"/>
100.
110. </rdc:task>
120. </vxml>

Line 10: Set page language and appropriate response content type.

Line 20: Bind the RDC taglib to prefix rdc

Line 40,120: The <vxml> element start and end tags (template text)

Line 50,60,110: Standard boilerplate RDC markup, which must occur in most JSPs hosting RDCs. The dialogMap is used to persist component states across request, and the task tag is used to maintain the execution context within which the private data models are stored in the dialogMap.

Line 80,90: The RDC component which this JSP hosts (an atomic component, in this introductory page).

ReusableDialogComponents/Tutorials/FirstPage (last edited 2009-09-20 22:14:03 by localhost)