velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr. <ge...@optonline.net>
Subject Re: Registering event handlers via velocity.properties ?
Date Wed, 29 Oct 2003 18:25:28 GMT

On Wednesday, October 29, 2003, at 12:27 PM, Peter Lammich wrote:

> Geir Magnusson Jr. wrote:
>
>>
>> On Wednesday, October 29, 2003, at 12:06 PM, Peter Lammich wrote:
>>
>>> I need to write a custom ReferenceInsertionEventHandler.
>>> My problem is: I do not have the source code of the Servlet, so I do 
>>> not know how to get my EventHandler attached.
>>> Can I modify one of the config files (web.xml, velocity.properties, 
>>> or similiar) to register my EventHandler as the
>>> default event-handler for the ReferenceInsertionEvent ?
>>
>>
>> Funny you should ask.
>>
>> We are just talking about that - if we should add to the config the 
>> ability to setup a handler.  Can you actually config Velocity w/ that 
>> servlet?
>
> That's the problem. I don't have any possibility to view the source of 
> that weird servlet (some commercial closed-source stuff), and there is 
> no (documented) configuration interface. I cannot even access the 
> velocity context within my templates. I thoght about the following 
> options:
>    -   Inserting the eventHandler via the properties file (see above)

If Velocity had that feature, you could do that by modifying the 
default properties in the vel.jar

>    -   Modifying the velocity sources to look for my event handler 
> upon initializing the renderer (I do not know the sources, so I 
> probably would do something quick&dirty)

It might be easy

>    -  Just resigning
>
>

:)

>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message