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 few years ago. 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.
This custom tag library requires a servlet container that supports the JavaServer Pages Specification, version 2.0 or higher. The dependencies are:
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.1" 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.
alpha | Collect a string of alphabets |
alphanum | Collect a alphanumeric string |
color | Collects a color |
country | Collect a country name |
creditcardAmount | Collect a credit card bill amount |
creditcardExpiry | Collect a credit card expiry date |
creditcardNumber | Collect a credit card number |
creditcardType | Collect a credit card type |
currency | Collect a currency value |
date | Collect a date |
digits | Collect a string of digits |
duration | Collect a duration |
isbn | Collect a international standard book number |
mortgageType | Collect a type of mortgage |
number | Collect a numerical value |
percent | Collect a percentage |
select1 | Collect one choice from a list of options |
ssn | Collect a social security number |
time | Collect a time |
usMajorCity | Collect a major US city name |
usState | Collect a US state name |
zipCode | Collect a zip code |
creditcardInfo | Collect credit card information: includes type of card, card number, expiry date and security code |
dateRange | Collects a date range, denoting the start and end dates of a time period. |
mortgage | Collect mortgage information: includes type of mortgage and percent down-payment |
group | Serve as a container for hosting multiple RDCs and managing the dialog between them using pluggable dialog management strategies |
peek | Peek at the top element of a stack. |
pop | Pop the top element off a stack. |
push | Push element onto a stack. |
task | Provide the scaffolding needed for RDCs |
comment | A RDC comment |
configure | Configure this component's prompts, properties etc. In case the user does not supply a configuration, a pre-specified default configuration is used. |
expand | Evaluate text containing expressions that use the custom syntax "#{...}" as a JSP 2.0 EL expression |
extract-params | Extract the necessary parameters from the HTTP request sent by the browser. |
fsm-confirm | The helper tag that produces the VoiceXML for confirming the input for a component that uses the default RDC FSM. |
fsm-input | The helper tag that produces the VoiceXML for collecting input for a component that uses the default RDC FSM. |
fsm-run | The helper tag that defines the default RDC FSM. |
get-configuration | Get the element corresponding to a given XPath from this RDC's configuration file |
get-default-config | Get the default configuration for this component. |
get-resource | Get the resource specified by the key from a resource bundle. |
hello | A RDC hello world tag |
include-fsm-fragment | Include tag fragment for this instance of the RDC template. |
pause | A possible handler for pausing an application |
set-config-composite | Set the page context and configuration in composite components. |
set-grammar | Set the grammar using the given property from the resource bundle as the grammar URI. |
setup-results | Set this component's properties which influence the how and where the browser submits the results. |
struts-errors | Play out all errors messages from the preceding struts action. |
struts-submit | Submit the values of the RDCs specified in the namelist to the struts layer. |
subdialog-return | Generate the appropriate VoiceXML return statement, if called as a subdialog. The value of the RDC must be serialized according to a standard public contract so meaningful deserialization can take place in the host dialog (or caller). |
template | A template for rapid development of atomic RDCs |
alpha - alpha | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
submit | self-URI | No | Yes | Location where resuls are submitted | |
config | xxx-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 | |
echo | true/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 | |
confirm | true/false | No | Yes | Confirmation option | |
minLength | [0-9]* | No | Yes | Minimum acceptable length | |
maxLength | [0-9]* | No | Yes | Maximum acceptable length | |
pattern | regular-expression | No | Yes | Pattern of acceptable values | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:alpha id="myAlpha" echo="true" />
Examples
|
See alpha-test.jsp in the rdc-examples application. |
|
alphanum - alphanum | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
submit | self-URI | No | Yes | Location where resuls are submitted | |
config | xxx-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 | |
echo | true/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 | |
confirm | true/false | No | Yes | Confirmation option | |
minLength | [0-9]* | No | Yes | Minimum acceptable length | |
maxLength | [0-9]* | No | Yes | Maximum acceptable length | |
pattern | regular-expression | No | Yes | Pattern of acceptable values | |
subdialog | true/false | No | Yes | Subdialog option | |
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. |
|
color - color | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
submit | self-URI | No | Yes | Location where resuls are submitted | |
config | xxx-cfg.xml | No | Yes | Configuration file for the component | |
initial | red | No | Yes | Default color | |
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 | |
locale | [language](-[country])? | No | Yes | RDC Locale | |
echo | true/false | No | Yes | Playback options | |
confirm | true/false | No | Yes | Confirmation option | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:color id="myColor" confirm="true" echo="true" />
Examples
|
See color-test.jsp in the rdc-examples application. |
|
country - country | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
initial | India | No | Yes | Default value of country | |
confirm | true/false | No | Yes | Confirmation option | |
echo | true/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 | |
config | xxx-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 | |
submit | self-URI | No | Yes | Location where results are submitted | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:country id="myCountry" />
Examples
|
See country-test.jsp in the rdc-examples application. |
|
creditcardAmount - credit card amount | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
config | xxx-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 | |
balance | [0-9]*.[0-9]{2} | No | Yes | Balance for this payment | |
minAmount | [0-9]*.[0-9]{2} | No | Yes | Minimum amount due | |
maxAmount | [0-9]*.[0-9]{2} | No | Yes | Maximum payment that can be made | |
maxDenials | [0-9]* | No | Yes | Maximum denied confirmations that will cause this RDC to exit | |
currencyCode | [A-Za-z][A-Za-z][A-Za-z] | No | Yes | ISO 4217 currency code | |
echo | true/false | No | Yes | Playback options | |
maxNoInput | [0-9]* | No | Yes | Graceful exit on noinput | |
maxNoMatch | [0-9]* | No | Yes | Graceful exit on nomatch | |
initial | creditcard amount | No | Yes | Default value for the credit card amount | |
confirm | true/false | No | Yes | Confirmation option | |
submit | self-URI | No | Yes | isubmit URL | |
subdialog | true/false | No | Yes | Subdialog option | |
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 | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
config | xxx-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 | |
echo | true/false | No | Yes | Playback options | |
maxNoInput | [0-9]* | No | Yes | Graceful exit on noinput | |
maxNoMatch | [0-9]* | No | Yes | Graceful exit on nomatch | |
initial | creditcard expiry date | No | Yes | Default value for the credit card expiry | |
maxDenials | [0-9]* | No | Yes | Maximum denied confirmations that will cause this RDC to exit | |
confirm | true/false | No | Yes | Confirmation option | |
submit | self-URI | No | Yes | isubmit URL | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:creditcardExpiry id="myCCExpiry" />
Examples
|
See creditcardExpiry-test.jsp in the rdc-examples application. |
|
creditcardNumber - credit card number | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
config | xxx-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 | |
echo | true/false | No | Yes | Playback options | |
maxNoInput | [0-9]* | No | Yes | Graceful exit on noinput | |
maxNoMatch | [0-9]* | No | Yes | Graceful exit on nomatch | |
initial | creditcard number | No | Yes | Default value for the credit card number | |
maxDenials | [0-9]* | No | Yes | Maximum denied confirmations that will cause this RDC to exit | |
confirm | true/false | No | Yes | Confirmation option | |
submit | self-URI | No | Yes | isubmit URL | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:creditcardNumber id="myCCNumber" confirm="true" />
Examples
|
See creditcardNumber-test.jsp in the rdc-examples application. |
|
creditcardType - credit card type | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
config | xxx-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 | |
echo | true/false | No | Yes | Playback options | |
maxNoInput | [0-9]* | No | Yes | Graceful exit on noinput | |
maxNoMatch | [0-9]* | No | Yes | Graceful exit on nomatch | |
initial | creditcard-type | No | Yes | Default value for the credit card type | |
confirm | true/false | No | Yes | Confirmation option | |
submit | self-URI | No | Yes | isubmit URL | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:creditcardType id="myCCType" initial="Visa"
echo="true" />
Examples
|
See creditcardType-test.jsp in the rdc-examples application. |
|
currency - currency | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-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 | |
initial | xxxxxx | No | Yes | Default amount | |
confirm | true/false | No | Yes | Confirmation option | |
echo | true/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 | |
config | xxx-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 | |
submit | self-URI | No | Yes | isubmit URL | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:currency id="myCurrency" minValue="100" echo="true" />
Examples
|
See currency-test.jsp in the rdc-examples application. |
|
date - date | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
minDate | xxxxxxxx | No | Yes | Minimum acceptable date | |
maxDate | xxxxxxxx | No | Yes | Maximum acceptable date | |
initial | xxxxxx | No | Yes | Default value of date | |
confirm | true/false | No | Yes | Confirmation option | |
echo | true/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 | |
config | xxx-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 | |
submit | self-URI | No | Yes | Location where results are submitted | |
format | date-format | No | Yes | The format in which the date string is returned | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:date id="myDate" minDate="01012004"
maxDate="12312005" echo="true" />
Examples
|
See date-test.jsp in the rdc-examples application. |
|
digits - digits | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
minLength | [0-9]* | No | Yes | Minimum acceptable digit length | |
maxLength | [0-9]* | No | Yes | Maximum acceptable digit length | |
initial | [0-9]* | No | Yes | Default value of digit | |
confirm | true/false | No | Yes | Confirmation option | |
echo | true/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 | |
config | xxx-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 | |
submit | self-URI | No | Yes | Location where results are submitted | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:digits id="myDigits" minLength="3" maxLength="7" />
Examples
|
See digits-test.jsp in the rdc-examples application. |
|
duration - duration | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
minDuration | P([0-9]{2}Y)?([0-9]{2}M)?([0-9]{2}D)? | No | Yes | Minimum acceptable duration | |
maxDuration | P([0-9]{2}Y)?([0-9]{2}M)?([0-9]{2}D)? | No | Yes | Maximum acceptable duration | |
initial | P([0-9]{2}Y)?([0-9]{2}M)?([0-9]{2}D)? | No | Yes | Default value of duration | |
confirm | true/false | No | Yes | Confirmation option | |
locale | [language](-[country])? | No | Yes | RDC Locale | |
echo | true/false | No | Yes | Playback options | |
maxNoInput | [0-9]* | No | Yes | Graceful exit on noinput | |
maxNoMatch | [0-9]* | No | Yes | Graceful exit on nomatch | |
config | xxx-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 | |
submit | self-URI | No | Yes | Location where results are submitted | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:duration id="myDuration" echo="true" />
Examples
|
See duration-test.jsp in the rdc-examples application. |
|
isbn - isbn | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
pattern | a-regular-expression | No | Yes | A regular expression representing the set of valid international standard book numbers | |
config | xxx-cfg.xml | No | Yes | Configuration file for the component | |
echo | true/false | No | Yes | Playback options | |
confirm | true/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 | |
initial | xxxxxxxxxxx | 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 | |
submit | submit-uri | No | Yes | URI of the jsp page | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:isbn id="myISBN" confirm="true" echo="true" />
Examples
|
See isbn-test.jsp in the rdc-examples application. |
|
mortgageType - mortgage type | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-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 | |
confirm | true/false | No | Yes | Confirmation option | |
maxNoInput | [0-9]* | No | Yes | Graceful exit on noinput | |
maxNoMatch | [0-9]* | No | Yes | Graceful exit on nomatch | |
echo | true/false | No | Yes | Playback options | |
config | xxx-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 | |
submit | self-URI | No | Yes | Location where results are submitted | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:mortgageType id="myMortgageType" echo="true" />
Examples
|
See mortgageType-test.jsp in the rdc-examples application. |
|
number - number | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
submit | self-URI | No | Yes | Location where resuls are submitted | |
config | xxx-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 | |
echo | true/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 | |
confirm | true/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 | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:number id="myNumber" minValue="0"
maxValue="100" />
Examples
|
See number-test.jsp in the rdc-examples application. |
|
percent - percent | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
minPercent | [0-9]{1,2} | No | Yes | Minimum acceptable percentage | |
maxPercent | [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 | |
confirm | true/false | No | Yes | Confirmation option | |
echo | true/false | No | Yes | Playback options | |
maxNoInput | [0-9]* | No | Yes | Graceful exit on noinput | |
maxNoMatch | [0-9]* | No | Yes | Graceful exit on nomatch | |
config | xxx-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 | |
submit | self-URI | No | Yes | Location where results are submitted | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:percent id="myPercent" minPercent="10"
maxPercent="75" />
Examples
|
See percent-test.jsp in the rdc-examples application. |
|
select1 - select one | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
optionList | *-opt.xml | Yes | Yes | List from which user will be asked to choose | |
initial | some-option | No | Yes | The default choice | |
confirm | true/false | No | Yes | Confirmation option | |
echo | true/false | No | Yes | Playback options | |
locale | [language](-[country])? | No | Yes | RDC Locale | |
config | xxx-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 | |
submit | self-URI | No | Yes | isubmit URL | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:select1 id="myChoice" config="myConfig.xml"
optionsList="myOptions.xml" echo="true" />
Examples
|
See select1-test.jsp in the rdc-examples application. |
|
ssn - ssn | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
pattern | a-regular-expression | No | Yes | A regular expression representing the set of valid social security numbers | |
config | xxx-cfg.xml | No | Yes | Configuration file for the component | |
echo | true/false | No | Yes | Playback options | |
confirm | true/false | No | Yes | Confirmation option | |
locale | [language](-[country])? | No | Yes | RDC Locale | |
initial | xxxxxxxxxx | 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 | |
submit | submit-uri | No | Yes | URI of the jsp page | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:ssn id="mySSN" />
Examples
|
See ssn-test.jsp in the rdc-examples application. |
|
time - time | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
minTime | xxxxxx | No | Yes | Minimum acceptable time | |
maxTime | xxxxxx | No | Yes | Maximum acceptable time | |
initial | xxxxxx | No | Yes | Default value of time | |
confirm | true/false | No | Yes | Confirmation option | |
echo | true/false | No | Yes | Playback options | |
locale | [language](-[country])? | No | Yes | RDC Locale | |
config | xxx-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 | |
submit | self-URI | No | Yes | Location where results are submitted | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:time id="myTime" minTime="xx30x"
maxTime="xx60x" confirm="true" />
Examples
|
See time-test.jsp in the rdc-examples application. |
|
usMajorCity - major US city | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | a-name | Yes | No | Component ID | |
config | xxx-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 | |
echo | true/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 | US major city | No | Yes | Default value for the city | |
confirm | true/false | No | Yes | Confirmation option | |
submit | submit-uri | No | Yes | URI of the jsp page | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:usMajorCity id="myCity" echo="true" />
Examples
|
See usMajorCity-test.jsp in the rdc-examples application. |
|
usState - US state | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | a-name | Yes | No | Component ID | |
config | xxx-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 | |
echo | true/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 | US state | No | Yes | Default value for the state | |
confirm | true/false | No | Yes | Confirmation option | |
submit | submit-uri | No | Yes | URI of the jsp page | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:usState id="myState" />
Examples
|
See usState-test.jsp in the rdc-examples application. |
|
zipCode - zip code | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | a-name | Yes | No | Component ID | |
config | xxx-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 | |
echo | true/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 | |
confirm | true/false | No | Yes | Confirmation option | |
initial | Zip code | No | Yes | Default value for the zipcode | |
length | a-positive-integer | No | Yes | Number of digits in the zip code | |
pattern | a-regular-expression | No | Yes | A regular expression representing the set of valid zip codes | |
submit | submit-uri | No | Yes | URI of the jsp page | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:zipCode id="myZip" confirm="true" echo="true" />
Examples
|
See zipCode-test.jsp in the rdc-examples application. |
|
creditcardInfo - credit card information | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
submit | self-URI | No | Yes | Location where results are submitted | |
subdialog | true/false | No | Yes | Subdialog option | |
mode | FULL | No | Yes | The mode under which this credit card information composite will operate | |
locale | [language](-[country])? | No | Yes | RDC Locale | |
initial | CreditCardData | No | Yes | Default credit card data | |
config | xxx-cfg.xml | No | Yes | Configuration file for this composite | |
Usage: |
<rdc:creditcardInfo id="myCCInfo" mode="short" />
Examples
|
See creditcardInfo-test.jsp in the rdc-examples application. |
|
dateRange - Date Range | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
submit | self-URI | No | Yes | Location where results are submitted | |
subdialog | true/false | No | Yes | Subdialog option | |
initial | DateRangeData | No | Yes | Default date range | |
config | xxx-cfg.xml | No | Yes | Configuration file for this composite | |
locale | [language](-[country])? | No | Yes | RDC Locale | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:dateRange id="myDateRange" />
Examples
|
See dateRange-test.jsp in the rdc-examples application. |
|
mortgage - mortgage | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
submit | self-URI | No | Yes | Location where results are submitted | |
subdialog | true/false | No | Yes | Subdialog option | |
initial | MortgageData | No | Yes | Default mortgage data | |
config | xxx-cfg.xml | No | Yes | Configuration file for this composite | |
locale | [language](-[country])? | No | Yes | RDC Locale | |
Usage: |
<rdc:mortgage id="myMortgage" />
Examples
|
See mortgage-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 Body | scriptless | ||||
Attributes | Name | Required | 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 | Yes | |||
The strategy specific config attribute. |
|||||
submit | No | Yes | |||
The URI where this container will submit its *intermediate* results to. |
|||||
Variables | None | ||||
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:
|
|
peek | |||||
Peek at the top element of a stack. |
|||||
Tag Body | EMPTY | ||||
Attributes | Name | Required | Runtime Expression Evaluation | Availability | |
var | Yes | No | |||
Variable holding result of the peek operation. |
|||||
stack | Yes | Yes | |||
Variable holding target stack. |
|||||
Variables | Name | Scope | Availability | ||
var attribute value | Start of tag to end of page | ||||
Properties | None | ||||
Usage: | <rdc:peek var="stateMap" stack="${requestScope.rdcStack}"/> |
pop | |||||
Pop the top element off a stack. |
|||||
Tag Body | EMPTY | ||||
Attributes | Name | Required | Runtime Expression Evaluation | Availability | |
var | Yes | No | |||
Variable holding value that will get popped. |
|||||
stack | Yes | Yes | |||
Variable holding target stack. |
|||||
Variables | Name | Scope | Availability | ||
var attribute value | Start of tag to end of page | ||||
Properties | None | ||||
Usage: | <rdc:pop var="discard" stack="${rdcStack}"/> |
push | |||||
Push element onto a stack. |
|||||
Tag Body | EMPTY | ||||
Attributes | Name | Required | Runtime Expression Evaluation | Availability | |
stack | Yes | Yes | |||
Variable holding target stack. |
|||||
element | Yes | Yes | |||
Variable holding value being pushed. |
|||||
Variables | None | ||||
Usage: | <rdc:push stack="${rdcStack}" element="${dialogMap}"/> |
task - task tag | |||||
|
|||||
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 Body | scriptless | ||||
Attributes | None | ||||
Variables | None | ||||
Usage: | <rdc:expand>#{model.utterance} </rdc:expand> |
get-configuration | |||||
Get the element corresponding to a given XPath from this RDC's configuration file |
|||||
Tag Body | EMPTY | ||||
Attributes | Name | Required | Runtime Expression Evaluation | Availability | |
xml | Yes | Yes | |||
The parsed configuration file for this component. |
|||||
locator | Yes | Yes | |||
The XPath to the element of interest. |
|||||
Variables | None | ||||
Usage: | <rdc:get-configuration xml="${parsedDoc}" locator="/config/input/property-list/property" /> |
get-default-config | |||||
Get the default configuration for this component. |
|||||
Tag Body | EMPTY | ||||
Attributes | Name | Required | 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. |
|||||
Variables | None | ||||
Usage: | <rdc:get-default-config name="${defaultConfig}" model="${model}" /> |
get-resource | |||||
Get the resource specified by the key from a resource bundle. |
|||||
Tag Body | EMPTY | ||||
Attributes | Name | Required | 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. |
|||||
Variables | None | ||||
Usage: | <rdc:get-resource bundle="${rdcResourceBundle}" key="my.property.key" var="myResourceString" /> |
include-fsm-fragment | |||||
Include tag fragment for this instance of the RDC template. |
|||||
Tag Body | EMPTY | ||||
Attributes | Name | Required | Runtime Expression Evaluation | Availability | |
template | Yes | Yes | |||
The data model of this template instance. |
|||||
context | Yes | Yes | |||
The pageContext of the host tag file. |
|||||
Variables | None | ||||
Usage: | <rdc:include-fsm-fragment template="${model}" context="${pageContext}" /> |
struts-errors | |||||
Play out all errors messages from the preceding struts action. |
|||||
Tag Body | EMPTY | ||||
Attributes | None | ||||
Variables | None | ||||
Usage: | <rdc:struts-errors /> |
struts-submit | |||||
Submit the values of the RDCs specified in the namelist to the struts layer. |
|||||
Tag Body | EMPTY | ||||
Attributes | Name | Required | 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. |
|||||
Variables | None | ||||
Usage: | <rdc:struts-submit submit=${self}" context="${pageContext}" namelist="myDate myTime"/> |
comment - comment tag | |
|
|
Usage: | <rdc:comment> This is a RDC comment </rdc:comment> |
configure - configure tag | |
|
|
Usage: | <rdc:configure model="${model}" config="${config}" defaultConfig="META-INF/tags/rdc/config/date.xml" /> |
extract-params - extract params tag | |
|
|
Usage: | <rdc:extract-params target="${model}" parameters="${model.paramsMap}"/> |
fsm-confirm - fsm confirm tag | |
|
|
Usage: | <rdc:fsm-confirm model="${model}" /> |
fsm-input - fsm input tag | |
|
|
Usage: | <rdc:fsm-input model="${model}" /> |
fsm-run - fsm run tag | |
|
|
Usage: | <rdc:fsm-run model="${model}" /> |
hello - hello world tag | |
|
|
Usage: | <rdc:hello name="whole wide world" /> |
pause - pause tag | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
locale | [language](-[country])? | No | Yes | RDC Locale | |
config | xxx-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" /> |
set-config-composite - set config composite tag | |
|
|
Usage: | <rdc:set-config-composite model="${model}" context="${pageContext}" config="${config}" /> |
set-grammar - set grammar tag | |
|
|
Usage: | <rdc:set-grammar model="${model}" bundle="${rdcResourceBundle}" key="my.property.key" /> |
setup-results - setup results tag | |
|
|
Usage: | <rdc:setup-results model="${model}" submit="${submit}" minConfidence="${minConfidence}" numNBest="${numNBest}" /> |
subdialog-return - generate return statement if called as a subdialog | |
|
|
Usage: | <rdc:subdialog-return model="${model}" /> |
template - RDC template | |||||
|
|||||
Attributes | Name | Value | Required | Runtime Expression Evaluation | Summary |
id | some-name | Yes | No | Component ID | |
grammar | xxx.grxml or array of Grammar objects | Yes | Yes | One or more grammars needed by this instance, passed as a URI or array of Grammar objects | |
config | xxx-cfg.xml | Yes | Yes | Configuration file for the component | |
constraints | instance specific map | No | Yes | Constraints on the return value of this instance, passed as a Map | |
bean | fully qualified data model class | No | Yes | Data model for this instance | |
data | instance specific object | No | Yes | External data needed by this instance | |
fsmFragment | URI to FSM fragment | No | Yes | Custom FSM for this component | |
initial | instance specific | No | Yes | Default value of this instance | |
confirm | true/false | No | Yes | Confirmation option | |
echo | true/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 | |
submit | self-URI | No | Yes | Location where results are submitted | |
subdialog | true/false | No | Yes | Subdialog option | |
Usage: |
<rdc:template id="myTemplate" grammar="grammar/myGrammar.grxml"
config="config/myConfig.xml" />
Examples
|
See simple-template-test.jsp in the rdc-examples application. |
|
See the example application taglibs-rdc-examples.war for examples of the usage of the tags from this custom tag library.
Java programmers can view the java class documentation for this tag library as javadocs .
Review the complete revision history of this tag library.