I've come up with this idea :

String context = request.getContextPath();
renderSupport.addScriptLink(context + "/dwr/engine.js");

and the DWR servlet mapping could be passed as a parameter to my
component to be fully customized ...

What do you think about it ?

Stephane


Andy Pahne a écrit :
>
> I don't know if that's possible.
>
> You - as a library provider - and the consumer at least need to find a
> convention about how the dwr servlet is mapped. /dwr/ is kind of
> standard, but not granted. That's the first problem.
>
> Next problem: Do the Tapestry facilities (@IncludeScriptLibrary...)
> support your use case? I guess not.
>
> When I integrated dwr, I did not even think that far, because I did
> not have to bundle it as a component lib. So I ended up using the same
> script-tags that you used.
>
> Andy
>
>
>
>
>
>
> Stephane Decleire schrieb:
>> Thanks Andy,
>>
>> But i've already done this. It works great on the DWR side but that
>> doesn't help on the way to integrate the DWR javascript files in my
>> Tapestry components ... does it ?
>>
>> Stephane
>>
>> Andy Pahne a écrit :
>>  
>>> Stephane Decleire schrieb:
>>>    
>>>> 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). [...]
>>>>         
>>> +1. Works like a charm.
>>>
>>>
>>>    
>>>> 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 ...)
>>>>
>>>>         
>>> In deed, there is a way, exactly for your use case.
>>>
>>> See the "Configuring Tapestry",
>>>    http://tapestry.apache.org/tapestry5/tapestry-core/guide/conf.html
>>> esp. the section on "Ignored Paths".
>>>
>>>
>>> If you do it this way, you configure dwr like it's documentation says.
>>> There's no more special setup needed than contributing the ignored
>>> path.
>>>
>>>
>>> Andy
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>     
>>
>>   
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

Reply via email to