Hi all,

I've tried to integrate DWR with Tapestry and the both frameworks seem
to work great together (perhaps because they don't do the same work ;-)
and are not so integrated). For the test, i've just put the to
javascript libraries needed by DWR directly in the XHTML code like this :
    <script type='text/Javascript' src='/myapp/dwr/engine.js'></script>
    <script type='text/Javascript' src='/myapp/dwr/util.js'></script>

Now, in a production environment, i would like to use the Tapestry
RenderSupport possibilities :
    renderSupport.addScriptLink("/myapp/dwr/engine.js");
    renderSupport.addScriptLink("/myapp/dwr/util.js");

And use Assets to avoid leaving the "myapp" hardcoded !

@Inject
@Path("context:dwr/engine.js")
private Asset engine;

renderSupport.addScriptLink(engine);

but this piece of code doesn't work : Tapestry can't find the file when
the application starts. Indeed, DWR works with it's own servlet which
return the javascript files !
Is there a way to tell Tapestry to get the file from another servlet or
not to check the file existence when the application starts ?
Or should i dig into tapestry code and develop a "dwr:" prefix like the
"context:" and "classpath:" ones (i haven't give a look at that and
don't know if it's even possible ...)

Thanks in advance for any clue or advice.

Stephane

Reply via email to