Jakarta Project: Reusable Dialog Components (RDC) Tag library

Version: 1.0.0

Table of Contents

Overview

JSP-2.0 Reusable Dialog Components (RDC) --- a framework for creating JSP taglibs that aid in rapid development of voice and multimodal applications.

Server-side generation of HTML has proven an effective way of generating the user interface for visual Web applications that are implemented using server-side application frameworks such as Struts. Over time, the effort involved in such HTML generation has been reduced by the availability of various JSP tag libraries that abstract away the minutiae of HTML markup. The goal of the RDC project is to achieve for voice applications what JSP tag libraries have already achieved in the world of visual Web applications.

The voice application space is seeing rapid growth with the maturation of speech technologies along with the arrival of a stable and robust voice programming model as defined in the W3C VoiceXML 2.0 REC. A necessary next step in mainstreaming the development of server-side voice applications within environments like Tomcat is the availability of the appropriate tag libraries that help isolate the JSP developer from the intricacies of spoken interaction. The goal is to help package specialized speech design skills in the form of JSP tag libraries that make it possible for JSP developers to easily speech-enable Web applications.

Requirements

This custom tag library requires a servlet container that supports the JavaServer Pages Specification, version 2.0 or higher + jstl.jar and standard.jar from the Apache project + commons-el.jar for delayed EL evaluation + struts.jar, commons-beanutils.jar and commons-digester.jar (for building the struts support).

Configuration

Follow these steps to configure your web application with this tag library:

To use the tags from this library in your JSP pages, add the following directive at the top of each page:

      <%@ taglib uri="http://tomcat.apache.org/taglibs/rdc-1.0" prefix="rdc" %>
    

where "rdc" is the tag name prefix you wish to use for tags from this library. You can change this value to any prefix you like.

Tag Summary

Atomic Components
dateCollect a date
timeCollect a time
durationCollect a duration
creditcardAmountCollect a credit card bill amount
creditcardExpiryCollect a credit card expiry date
creditcardNumberCollect a credit card number
creditcardTypeCollect a credit card type
zipCodeCollect a zip code
usMajorCityCollect a major US city name
usStateCollect a US state name
alphaCollect a string of alphabets
currencyCollect a currency value
alphanumCollect a alphanumeric string
select1Collect one choice from a list of options
countryCollect a country name
ssnCollect a social security number
isbnCollect a international standard book number
percentCollect a percentage
numberCollect a numerical value
digitsCollect a string of digits
mortgageTypeCollect a type of mortgage
templateA template for rapid development of atomic RDCs
 
Composite Components
mortgageCollect mortgage information: includes type of mortgage and percent down-payment
creditcardInfoCollect credit card information: includes type of card, card number, expiry date and security code
 
Framework Tags
taskProvide the scaffolding needed for RDCs
groupServe as a container for hosting multiple RDCs and managing the dialog between them using pluggable dialog management strategies
pushPush element onto a stack.
popPop the top element off a stack.
peekPeek at the top element of a stack.
 
Helper Tags
commentA RDC comment
pauseA possible handler for pausing an application
helloA RDC hello world tag
fsm-inputThe helper tag that produces the VoiceXML for collecting input for a component that uses the default RDC FSM.
fsm-confirmThe helper tag that produces the VoiceXML for confirming the input for a component that uses the default RDC FSM.
fsm-runThe helper tag that defines the default RDC FSM.
extract-paramsExtract the necessary parameters from the HTTP request sent by the browser.
setup-resultsSet this component's properties which influence the how and where the browser submits the results.
set-config-compositeSet the page context and configuration in composite components.
set-grammarSet the grammar using the given property from the resource bundle as the grammar URI.
configureConfigure this component's prompts, properties etc. In case the user does not supply a configuration, a pre-specified default configuration is used.
expandEvaluate text containing expressions that use the custom syntax "#{...}" as a JSP 2.0 EL expression
include-fsm-fragmentInclude tag fragment for this instance of the RDC template.
struts-submitSubmit the values of the RDCs specified in the namelist to the struts layer.
struts-errorsPlay out all errors messages from the preceding struts action.
get-configurationGet the element corresponding to a given XPath from this RDC's configuration file
get-resourceGet the resource specified by the key from a resource bundle.
getDefaultConfigGet the default configuration for this component.
 

Tag Reference

date - date

Collect a date

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 minDatexxxxxxxx  No   Yes Minimum acceptable date
 maxDatexxxxxxxx  No   Yes Maximum acceptable date
 initialxxxxxx  No   Yes Default value of date
 confirmtrue/false  No   Yes Confirmation option
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 submitself-URI  No   Yes Location where results are submitted
Usage: <rdc:date id="myDate" minDate="01012004" maxDate="12312005" echo="true" />
Examples

See date-test.jsp in the rdc-examples application.

 
 


time - time

Collect a time

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 minTimexxxxxx  No   Yes Minimum acceptable time
 maxTimexxxxxx  No   Yes Maximum acceptable time
 initialxxxxxx  No   Yes Default value of time
 confirmtrue/false  No   Yes Confirmation option
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 submitself-URI  No   Yes Location where results are submitted
Usage: <rdc:time id="myTime" minTime="xx30x" maxTime="xx60x" confirm="true" />
Examples

See time-test.jsp in the rdc-examples application.

 
 


duration - duration

Collect a duration

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 minDurationP([0-9]{2}Y)?([0-9]{2}M)?([0-9]{2}D)?  No   Yes Minimum acceptable duration
 maxDurationP([0-9]{2}Y)?([0-9]{2}M)?([0-9]{2}D)?  No   Yes Maximum acceptable duration
 initialP([0-9]{2}Y)?([0-9]{2}M)?([0-9]{2}D)?  No   Yes Default value of duration
 confirmtrue/false  No   Yes Confirmation option
 locale[language](-[country])?  No   Yes RDC Locale
 echotrue/false  No   Yes Playback options
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 submitself-URI  No   Yes Location where results are submitted
Usage: <rdc:duration id="myDuration" echo="true" />
Examples

See duration-test.jsp in the rdc-examples application.

 
 


creditcardAmount - credit card amount

Collect a credit card bill amount

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 locale[language](-[country])?  No   Yes RDC Locale
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 echotrue/false  No   Yes Playback options
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 initialcreditcard amount  No   Yes Default value for the credit card amount
 confirmtrue/false  No   Yes Confirmation option
 submitself-URI  No   Yes isubmit URL
Usage: <rdc:creditcardAmount id="myCCAmount" minAmount="USD20.00" balance="USD123.45" />
Examples

See creditcardAmount-test.jsp in the rdc-examples application.

 
 


creditcardExpiry - credit card expiry

Collect a credit card expiry date

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 locale[language](-[country])?  No   Yes RDC Locale
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 echotrue/false  No   Yes Playback options
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 initialcreditcard expiry date  No   Yes Default value for the credit card expiry
 confirmtrue/false  No   Yes Confirmation option
 submitself-URI  No   Yes isubmit URL
Usage: <rdc:creditcardExpiry id="myCCExpiry" />
Examples

See creditcardExpiry-test.jsp in the rdc-examples application.

 
 


creditcardNumber - credit card number

Collect a credit card number

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 locale[language](-[country])?  No   Yes RDC Locale
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 echotrue/false  No   Yes Playback options
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 initialcreditcard number  No   Yes Default value for the credit card number
 confirmtrue/false  No   Yes Confirmation option
 submitself-URI  No   Yes isubmit URL
Usage: <rdc:creditcardNumber id="myCCNumber" confirm="true" />
Examples

See creditcardNumber-test.jsp in the rdc-examples application.

 
 


creditcardType - credit card type

Collect a credit card type

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 locale[language](-[country])?  No   Yes RDC Locale
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 echotrue/false  No   Yes Playback options
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 initialcreditcard-type  No   Yes Default value for the credit card type
 confirmtrue/false  No   Yes Confirmation option
 submitself-URI  No   Yes isubmit URL
Usage: <rdc:creditcardType id="myCCType" initial="Visa" echo="true" />
Examples

See creditcardType-test.jsp in the rdc-examples application.

 
 


zipCode - zip code

Collect a zip code

AttributesNameValueRequired Runtime Expression EvaluationSummary
 ida-name  Yes   No Component ID
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 confirmtrue/false  No   Yes Confirmation option
 lengtha-positive-integer  No   Yes Number of digits in the zip code
 patterna-regular-expression  No   Yes A regular expression representing the set of valid zip codes
 submitsubmit-uri  No   Yes URI of the jsp page
Usage: <rdc:zipCode id="myZip" confirm="true" echo="true" />
Examples

See zipCode-test.jsp in the rdc-examples application.

 
 


usMajorCity - major US city

Collect a major US city name

AttributesNameValueRequired Runtime Expression EvaluationSummary
 ida-name  Yes   No Component ID
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 confirmtrue/false  No   Yes Confirmation option
 submitsubmit-uri  No   Yes URI of the jsp page
Usage: <rdc:usMajorCity id="myCity" echo="true" />
Examples

See usMajorCity-test.jsp in the rdc-examples application.

 
 


usState - US state

Collect a US state name

AttributesNameValueRequired Runtime Expression EvaluationSummary
 ida-name  Yes   No Component ID
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 confirmtrue/false  No   Yes Confirmation option
 submitsubmit-uri  No   Yes URI of the jsp page
Usage: <rdc:usState id="myState" />
Examples

See usState-test.jsp in the rdc-examples application.

 
 


alpha - alpha

Collect a string of alphabets

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 submitself-URI  No   Yes Location where resuls are submitted
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 initial[a-zA-Z ']*  No   Yes Default value of alpha
 confirmtrue/false  No   Yes Confirmation option
 minLength[0-9]*  No   Yes Minimum acceptable length
 maxLength[0-9]*  No   Yes Maximum acceptable length
 patternregular-expression  No   Yes Pattern of acceptable values
Usage: <rdc:alpha id="myAlpha" echo="true" />
Examples

See alpha-test.jsp in the rdc-examples application.

 
 


currency - currency

Collect a currency value

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 minValue[0-9]*.?[0-9]{0,2}  No   Yes Minimum acceptable amount
 maxValue[0-9]*.?[0-9]{0,2}  No   Yes Maximum acceptable amount
 currencyCode[A-Za-z][A-Za-z][A-Za-z]  No   Yes ISO 4217 currency code
 initialxxxxxx  No   Yes Default amount
 confirmtrue/false  No   Yes Confirmation option
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 submitself-URI  No   Yes isubmit URL
Usage: <rdc:currency id="myCurrency" minValue="100" echo="true" />
Examples

See currency-test.jsp in the rdc-examples application.

 
 


alphanum - alphanum

Collect a alphanumeric string

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 submitself-URI  No   Yes Location where resuls are submitted
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 initial[a-z0-9]*  No   Yes Default value of alphanum
 confirmtrue/false  No   Yes Confirmation option
 minLength[0-9]*  No   Yes Minimum acceptable length
 maxLength[0-9]*  No   Yes Maximum acceptable length
 patternregular-expression  No   Yes Pattern of acceptable values
Usage: <rdc:alphanum id="myAlphanum" minLength="5" maxLength="5" pattern="[0-9]*" confirm="true" echo="true"/>
Examples

See alphanum-test.jsp in the rdc-examples application.

 
 


select1 - select one

Collect one choice from a list of options

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 optionList*-opt.xml  Yes   Yes List from which user will be asked to choose
 initialsome-option  No   Yes The default choice
 confirmtrue/false  No   Yes Confirmation option
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 submitself-URI  No   Yes isubmit URL
Usage: <rdc:select1 id="myChoice" config="myConfig.xml" optionsList="myOptions.xml" echo="true" />
Examples

See select1-test.jsp in the rdc-examples application.

 
 


country - country

Collect a country name

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 initialIndia  No   Yes Default value of country
 confirmtrue/false  No   Yes Confirmation option
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 submitself-URI  No   Yes Location where results are submitted
Usage: <rdc:country id="myCountry" />
Examples

See country-test.jsp in the rdc-examples application.

 
 


ssn - ssn

Collect a social security number

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 patterna-regular-expression  No   Yes A regular expression representing the set of valid social security numbers
 configxxx-cfg.xml  No   Yes Configuration file for the component
 echotrue/false  No   Yes Playback options
 confirmtrue/false  No   Yes Confirmation option
 locale[language](-[country])?  No   Yes RDC Locale
 initialxxxxxxxxxx  No   Yes Default value of SSN
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 submitsubmit-uri  No   Yes URI of the jsp page
Usage: <rdc:ssn id="mySSN" />
Examples

See ssn-test.jsp in the rdc-examples application.

 
 


isbn - isbn

Collect a international standard book number

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 patterna-regular-expression  No   Yes A regular expression representing the set of valid international standard book numbers
 configxxx-cfg.xml  No   Yes Configuration file for the component
 echotrue/false  No   Yes Playback options
 confirmtrue/false  No   Yes Confirmation option
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 initialxxxxxxxxxxx  No   Yes Default ISBN value
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 submitsubmit-uri  No   Yes URI of the jsp page
Usage: <rdc:isbn id="myISBN" confirm="true" echo="true" />
Examples

See isbn-test.jsp in the rdc-examples application.

 
 


percent - percent

Collect a percentage

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 minValue[0-9]{1,2}  No   Yes Minimum acceptable percentage
 maxValue[0-9]{1,2}  No   Yes Maximum acceptable percentage
 initial[0-9]{1,2}  No   Yes Default value of percentage
 locale[language](-[country])?  No   Yes RDC Locale
 confirmtrue/false  No   Yes Confirmation option
 echotrue/false  No   Yes Playback options
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 submitself-URI  No   Yes Location where results are submitted
Usage: <rdc:percent id="myPercent" minPercent="10" maxPercent="75" />
Examples

See percent-test.jsp in the rdc-examples application.

 
 


number - number

Collect a numerical value

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 submitself-URI  No   Yes Location where resuls are submitted
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 initial[0-9]*.[0-9]*  No   Yes Default value of alpha
 confirmtrue/false  No   Yes Confirmation option
 minValue[0-9]*.[0-9]*  No   Yes Minimum acceptable value
 maxValue[0-9]*.[0-9]*  No   Yes Maximum acceptable value
Usage: <rdc:number id="myNumber" minValue="0" maxValue="100" />
Examples

See number-test.jsp in the rdc-examples application.

 
 


digits - digits

Collect a string of digits

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 minDigit[0-9]*  No   Yes Minimum acceptable digit length
 maxDigit[0-9]*  No   Yes Maximum acceptable digit length
 initial[0-9]*  No   Yes Default value of digit
 confirmtrue/false  No   Yes Confirmation option
 echotrue/false  No   Yes Playback options
 locale[language](-[country])?  No   Yes RDC Locale
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 configxxx-cfg.xml  No   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 submitself-URI  No   Yes Location where results are submitted
Usage: <rdc:digits id="myDigits" minLength="3" maxLength="7" />
Examples

See digits-test.jsp in the rdc-examples application.

 
 


mortgageType - mortgage type

Collect a type of mortgage

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 minTerm[0-9]{1,2}Y(fixed|adjustable)  No   Yes Minimum acceptable mortgage type
 maxTerm[0-9]{1,2}Y(fixed|adjustable)  No   Yes Maximum acceptable mortgage type
 locale[language](-[country])?  No   Yes RDC Locale
 initial[0-9]{1,2}Y(fixed|adjustable)  No   Yes Default value of mortgage type
 confirmtrue/false  No   Yes Confirmation option
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 echotrue/false  No   Yes Playback options
 configxxx-cfg.xml  Yes   Yes Configuration file for the component
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 submitself-URI  No   Yes Location where results are submitted
Usage: <rdc:mortgageType id="myMortgageType" echo="true" />
Examples

See mortgageType-test.jsp in the rdc-examples application.

 
 


template - RDC template

A template for rapid development of atomic RDCs

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 grammarxxx.grxml  Yes   Yes One or more grammars needed by this instance
 configxxx-cfg.xml  Yes   Yes Configuration file for the component
 constraintsinstance specific map  No   Yes Constraints on the return value of this instance
 beanfully qualified data model class  No   Yes Data model for this instance
 datainstance specific object  No   Yes External data needed by this instance
 initialinstance specific  No   Yes Default value of this instance
 confirmtrue/false  No   Yes Confirmation option
 echotrue/false  No   Yes Playback options
 numNBest[0-9]*  No   Yes Maximum number of N-best values requested
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
 maxNoInput[0-9]*  No   Yes Graceful exit on noinput
 maxNoMatch[0-9]*  No   Yes Graceful exit on nomatch
 submitself-URI  No   Yes Location where results are submitted
Usage: <rdc:template id="myTemplate" grammar="grammar/myGrammar.grxml" config="config/myConfig.xml" />
Examples

See simple-template-test.jsp in the rdc-examples application.

 
 


mortgage - mortgage

Collect mortgage information: includes type of mortgage and percent down-payment

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 submitself-URI  No   Yes Location where results are submitted
 subdialogtrue/false  No   Yes Whether this RDC is invoked as a subdialog
Usage: <rdc:mortgage id="myMortgage" />
Examples

See mortgage-test.jsp in the rdc-examples application.

 
 


creditcardInfo - credit card information

Collect credit card information: includes type of card, card number, expiry date and security code

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 submitself-URI  No   Yes Location where results are submitted
 subdialogtrue/false  No   Yes Whether this RDC is invoked as a subdialog
 modeFULL  No   Yes The mode under which this credit card information composite will operate
Usage: <rdc:creditcardInfo id="myCCInfo" mode="short" />
Examples

See creditcardInfo-test.jsp in the rdc-examples application.

 
 


group

Serve as a container for hosting multiple RDCs and managing the dialog between them using pluggable dialog management strategies

Tag Bodyscriptless    
AttributesNameRequired Runtime Expression Evaluation Availability
 id  Yes   Yes  
 

The unique identifier for this group.

 strategy  Yes   No  
 

The fully qualified class name for the pluggable dialog management strategy.

 config  No   No  
 

The strategy specific config attribute.

 submit  No   Yes  
 

The URI where this container will submit its *intermediate* results to.

VariablesNone
Usage: <rdc:group id="myDateTime" strategy="org.apache.taglibs.rdc.dm.SimpleDirectedDialog"> <rdc:date id="myDate" /> <rdc:time id="myTime" /> </rdc:group>
Examples

The rdc-examples application provides multiple <rdc:group> examples. The following dialog management strategies are included in the samples:

  • Simple Directed Dialog - Children execute in document order. See:
    • group-test.jsp
    • nested-group-test.jsp
  • Rule Based Directed Dialog - Children execute according to rules defined in XML navigation rule set. See:
    • rulebased-nested.jsp
    • rulebased-conditions.jsp

 
 


push

Push element onto a stack.

Tag BodyEMPTY    
AttributesNameRequired Runtime Expression Evaluation Availability
 stack  Yes   Yes  
 

Variable holding target stack.

 element  Yes   Yes  
 

Variable holding value being pushed.

VariablesNone
Usage: <rdc:push stack="${rdcStack}" element="${dialogMap}"/>
pop

Pop the top element off a stack.

Tag BodyEMPTY    
AttributesNameRequired Runtime Expression Evaluation Availability
 var  Yes   No  
 

Variable holding value that will get popped.

 stack  Yes   Yes  
 

Variable holding target stack.

VariablesNameScopeAvailability
  var attribute value   Start of tag to end of page  
 
 PropertiesNone
Usage: <rdc:pop var="discard" stack="${rdcStack}"/>
peek

Peek at the top element of a stack.

Tag BodyEMPTY    
AttributesNameRequired Runtime Expression Evaluation Availability
 var  Yes   No  
 

Variable holding result of the peek operation.

 stack  Yes   Yes  
 

Variable holding target stack.

VariablesNameScopeAvailability
  var attribute value   Start of tag to end of page  
 
 PropertiesNone
Usage: <rdc:peek var="stateMap" stack="${requestScope.rdcStack}"/>
task - task tag

Provide the scaffolding needed for RDCs

Usage: <rdc:task map="${taskmap}"> <rdc:date id="myDate" confirm="true" /> </rdc:task>
Examples

See task-test.jsp in the rdc-examples application.

 
 


expand

Evaluate text containing expressions that use the custom syntax "#{...}" as a JSP 2.0 EL expression

Tag Bodyscriptless    
AttributesNone
VariablesNone
Usage: <rdc:expand>#{model.utterance} </rdc:expand>
include-fsm-fragment

Include tag fragment for this instance of the RDC template.

Tag BodyEMPTY    
AttributesNameRequired Runtime Expression Evaluation Availability
 template  Yes   Yes  
 

The data model of this template instance.

 context  Yes   Yes  
 

The pageContext of the host tag file.

VariablesNone
Usage: <rdc:include-fsm-fragment template="${model}" context="${pageContext}" />
struts-submit

Submit the values of the RDCs specified in the namelist to the struts layer.

Tag BodyEMPTY    
AttributesNameRequired Runtime Expression Evaluation Availability
 submit  Yes   Yes  
 

The URI to submit the results to (a struts mapping).

 context  Yes   Yes  
 

The pageContext of the host JSP.

 namelist  No   Yes  
 

The list of the RDCs whose values should be submitted.

 clearlist  No   Yes  
 

The list of the RDCs whose values should be cleared. Item in the list can be a component or container.

 dialogMap  No   Yes  
 

The RDC dialog map used by the host JSP.

VariablesNone
Usage: <rdc:struts-submit submit=${self}" context="${pageContext}" namelist="myDate myTime"/>
struts-errors

Play out all errors messages from the preceding struts action.

Tag BodyEMPTY    
AttributesNone
VariablesNone
Usage: <rdc:struts-errors />
get-configuration

Get the element corresponding to a given XPath from this RDC's configuration file

Tag BodyEMPTY    
AttributesNameRequired Runtime Expression Evaluation Availability
 xml  Yes   Yes  
 

The parsed configuration file for this component.

 locator  Yes   Yes  
 

The XPath to the element of interest.

VariablesNone
Usage: <rdc:get-configuration xml="${parsedDoc}" locator="/config/input/property-list/property" />
get-resource

Get the resource specified by the key from a resource bundle.

Tag BodyEMPTY    
AttributesNameRequired Runtime Expression Evaluation Availability
 bundle  Yes   Yes  
 

The ResourceBundle to look into.

 key  Yes   Yes  
 

The key for the property to be retrieved.

 var  Yes   Yes  
 

The variable which will hold the property value.

 isGrammarURI  No   Yes  
 

The ability to escape the handling specific to RDC grammar URIs.

VariablesNone
Usage: <rdc:get-resource bundle="${rdcResourceBundle}" key="my.property.key" var="myResourceString" />
getDefaultConfig

Get the default configuration for this component.

Tag BodyEMPTY    
AttributesNameRequired Runtime Expression Evaluation Availability
 name  Yes   Yes  
 

The URI for the default configuration file for this component.

 model  Yes   Yes  
 

The data model of this component.

VariablesNone
Usage: <rdc:getDefaultConfig name="${defaultConfig}" model="${model}" />
comment - comment tag

A RDC comment

Usage: <rdc:comment> This is a RDC comment </rdc:comment>
pause - pause tag

A possible handler for pausing an application

AttributesNameValueRequired Runtime Expression EvaluationSummary
 idsome-name  Yes   No Component ID
 locale[language](-[country])?  No   Yes RDC Locale
 configxxx-cfg.xml  No   Yes Configuration file for the component
 minConfidence[0-9][0-9].[0-9]*F  No   Yes Minimum confidence value of the recognised output
Usage: <rdc:pause id="myPause" />
hello - hello world tag

A RDC hello world tag

Usage: <rdc:hello name="whole wide world" />
fsm-input - fsm input tag

The helper tag that produces the VoiceXML for collecting input for a component that uses the default RDC FSM.

Usage: <rdc:fsm-input model="${model}" />
fsm-confirm - fsm confirm tag

The helper tag that produces the VoiceXML for confirming the input for a component that uses the default RDC FSM.

Usage: <rdc:fsm-confirm model="${model}" />
fsm-run - fsm run tag

The helper tag that defines the default RDC FSM.

Usage: <rdc:fsm-run model="${model}" />
extract-params - extract params tag

Extract the necessary parameters from the HTTP request sent by the browser.

Usage: <rdc:extract-params target="${model}" parameters="${model.paramsMap}"/>
setup-results - setup results tag

Set this component's properties which influence the how and where the browser submits the results.

Usage: <rdc:setup-results model="${model}" submit="${submit}" minConfidence="${minConfidence}" numNBest="${numNBest}" />
set-config-composite - set config composite tag

Set the page context and configuration in composite components.

Usage: <rdc:set-config-composite model="${model}" context="${pageContext}" config="${config}" />
set-grammar - set grammar tag

Set the grammar using the given property from the resource bundle as the grammar URI.

Usage: <rdc:set-grammar model="${model}" bundle="${rdcResourceBundle}" key="my.property.key" />
configure - configure tag

Configure this component's prompts, properties etc. In case the user does not supply a configuration, a pre-specified default configuration is used.

Usage: <rdc:configure model="${model}" config="${config}" defaultConfig="META-INF/tags/rdc/config/date.xml" />

Examples

See the example application rdc-examples.war for examples of the usage of the tags from this custom tag library.