tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <>
Subject Re: help with RDC
Date Tue, 07 Feb 2006 06:55:50 GMT
On 2/6/06, Easwaren, Shaivya (Cognizant) <> wrote:
> We are using RDC in a small project on Multimodal technologies and are testing with Opera

This is good stuff, and the next logical thing for RDCs. The RDC
framework, to date, has been used for pure voice applications.
However, if you are willing to try a couple of things, we should be
able to get the X+V example up and running pretty quickly. I hope to
install the multimodal toolkit on Opera soon (had it on the older box)
so I can play with this and possibly write up a recipe for the wiki

> After configuring the project to use RDC taglibs, we tested with the Hello World tag
which is working fine, but none of the other tags are working. Could someone show us how to
use RDC in a JSP page?

Get the rdc-examples.war [2] from the nightly build, it has numerous
examples. The tutorials [3] on the wiki have some explanations that
might help. Your usage below is correct, but will require adjustments
due to the fact that the application isn't voice only (more on that

> Here is a sample page in our application that is saying "Hello World from Shaivya" and
then giving a VXML parsing error on the first line using the grammar file import. None of
the javascript imports are getting recognized either.

Can you quote the error? Did you define the GrammarServlet in the
web.xml? What happens if you try a static VoiceXML form using the RDC
grammar as the ev:handler instead of an RDC? (I will try this myself
in a few days)

Some other comment inlined in the JSP below:
> <!DOCTYPE html PUBLIC "-//VoiceXML Forum//DTD XHTML+Voice 1.2//EN" "">
> <html xmlns="" xmlns:ev=""
xmlns:xv="" xml:lang="en-US">
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>

Don't use the Struts HTML taglib. It gives little in X+V apps. What
the RDC framework mostly uses Struts for is the "controller" bits (the
cross-page navigation) for the web app.

> <%@ taglib uri="" prefix="rdc"%>
> <%@ taglib prefix="c" uri="" %>
> <head>
>  <title>Example 1: "Hello, World"</title>
>  <xv:sync xv:input="userid" xv:field="#useridInput" />
>  <form xmlns="" id="sayHello">
>    <rdc:hello name="shaivya"/>
>  </form>
> <vxml version="2.0" xml:lang="en-US"  xmlns="">
> <jsp:useBean id="dialogMap" class="java.util.LinkedHashMap" scope="session"/>
>  <rdc:task map="${dialogMap}" id="takeText">

This reminds me to add the id attribute to the task tag [4] so it gets
rendered as the form id. If you add an issue in bugzilla [5] (under
Product:Taglibs, Component: RDC Taglib) it will make sure we don't

>        <rdc:alpha id="userid" echo="true" />
>  </rdc:task>
> </vxml>
> <c:if test="${not empty userid}">
>  <rdc:struts-submit submit="/DummyAction" context="${pageContext}" namelist="userid"
> </c:if>

In X+V (atleast the 1.x versions), X is the master and therefore, V
should not submit. The rdc:struts-submit and the surrounding c:if
should be removed.

> </head>
> <body ev:event="load" ev:handler="#sayHello">
>  <h1>"Hello World!" example</h1>
>  <html:form action="/DummyAction">
>  <html:text property="userid" size="20"/>
> <input type="text" id="userid" size="20" ev:event="focus" ev:handler="#takeText"/>

userid is repeated? Again, avoid html:text, inline HTML instead (as
you've done via the <input> element).

>  <html:submit value="Submit"/>
>  </html:form>
> </body>
> </html>

I propose the following roadmap:

1) Fix task.tag
   a) Add "id" attribute
   b) Add "namespace" attribute to render the xmlns (so the wrapper
<vxml> element that you have in the above example is no longer needed)

2) Make RDCs X+V aware
   a) Add a "xv" (or some such name) attribute that conditionally
alters the component's FSM [6] to behave as a voice form for a event
handler from the X side.
   b) Not emit the <filled> content (this will bypass validation,
confirmation and echo) in fsm-input.tag [7]

3) Explore strategies to allow RDC validation, confirmation and echo
in conjunction with X+V apps (this is somewhat above and beyond what
the V currently does in X+V, but will be fun exploring)

What do you think? Would you like to try any of this out? (will
require changes to RDC library code as pointed out above). Feel free
to open enhancement requests in bugzilla, which will ensure this stays
on my radar.

Please let us know if you any other questions or comments.



> Thanks and regards,
> Shaivya Easwaren

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

View raw message