tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <>
Subject Re: Regarding RDC
Date Fri, 03 Feb 2006 01:54:01 GMT
On 2/2/06, Vani Ampavathina <> wrote:
>  Hi
>  I am evaluating the RDC Tag  libraries to use in our speech
> applications.Ihave a small difficulty in using these tags. can you
> help me in briefing a
> solution for the following problem.
> 1) When I use,say for example "alpha" tag, I would like to have my own logic
> in the "filled" block rather having the default submit and the namelist
> formed from the Nbest.js. From the provided document , I understand that we
> can use the submit attribute to submit to any other JSP, but what about the
> variables i wish to pass on to the next JSP?

I would consider the use of the submit attribute to cover only corner
cases, and on a case-by-case basis. It is generally recommended to
leave it unspecified, so the component submits back to itself which is
its default behavior (and thus, allows its state machine to run to
completion). The RDC framework in itself, does nothing for cross-page
navigation. There are multiple web application frameworks that provide
such controllers (such as Struts), and we encourage you to pick one of
those while authoring your applications. To illustrate the point, the
RDC distribution does provide tags to submit to Struts actions, and
echo the errors from these actions as prompts.

More on that here:

If you want to directly submit to another JSP (without using Struts),
that is quite easy as well, see my other note that Aravilli referenced
earlier in this message thread. These two approaches maintain
component boundaries and responsibilities appropriately.

> Say to have something like
> <filled>
>  <submit next="UseCollectedAlpha.jsp" namelist="alphacollected var1 var2
> var3"/>
> </filled>
> instead of
> <filled>
>    <script src="/rdc-examples/.grammar/nbest.js"/>
>    <var name="alphaResultNBest" expr="serializeNBest()"/>
>    <submit
> next="/rdc-examples/alpha.jsp;jsessionid=CD6603360BFF6C0D33417D414A2D205C"
> method="post" namelist="alphaResultNBest"/>
>  </filled>
> is it possible to implement this?

Yes, as mentioned above.

> whats the reason to send the confidence,
> utterance and the interpretation as a serialized object from the nbest.js?
> by default the maxNBest is set to 5 and all the values are concatenated and
> returned. is there any special reason of such implementation, when i can
> directly take up the "application.lastresult$.utterance" for the most
> probable value, the asr recognized.

A RDC component is a JSP tag, and exists server-side. The information
you quote is only available on the client. The framework makes sure
application.lastresult$ can be examined by the component's private
data model (see Building Blocks for what that means):

> 2) how is a simple JSP with 4 lines of code getting translated to few tens
> lines of code? The tutorials and wikis doesn't help in understanding the
> concept.The only vxml tag I can see in the Tag library is <form> in "
> task.tag".

Its no magic, I assure you ;-) Look at the fsm-*.tag files in this directory:

Those do most of the VoiceXML generation. Each component maintains an
internal finite state machine, which determines what output is
generated at any given turn.

> The config file gives the prompts list, this part is
> understood. But how are the attributes like minLength and maxLength of
> "alpha" tag, for example, used to limit the grammar as I notice there is no
> direct correspondence to these attributes, and where is the input entered by
> the user getting validated?

Those are used by the validate() method of the private data model to
decide whether the input received is valid or not. The private data
models are here:

The methods of importance are validate() and canonicalize().

Please let me know if you have other questions.


> Regards
> Vani

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message