velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <shinobu.ka...@gmail.com>
Subject Re: how to inherit ServletToolboxManager?
Date Fri, 07 Jan 2005 05:14:41 GMT
Hi Sato,

> Thank you for your advice!

No sweat.  :)

> So far, I chose a solution to just copy the ServletToolboxManager source
> and customize it to make my own ServletToolboxManager extention. But I think
> it's not good solution... Now I'm looking for a better way.
> 
> > Hacking VelocityViewServlet#initToolbox()?  Actually, I think it might
> > be nice if you could configure the RuleSet via init-param.
> 
> Yes, I hacked initToolbox(). And I don't think it might be solution
> to configure the RuleSet via init-param. (I'm not good skilled, so
> this might be wrong)
> 
> The real story is: my aim is to hack the mechanism of instance
> creation of ViewTools and attach some additional function (such as
> dependency injection) at the instance creation time. So I found
> that I need to prepare replacements for all classes of
> VelocityViewServlet, ServletToolboxManager, ServletToolboxRuleSet
> and ServletToolInfo in my library.
> 
> I would really appreciate if you would give me another comment.
> Thank you very much.

I was wondering if you can use the o.a.v.t.view.tools.Configurable
interface.  Don't know how to use it (yet), but it /might/ be of help.
    http://svn.apache.org/viewcvs.cgi/jakarta/velocity-tools/trunk/src/java/org/apache/velocity/tools/view/tools/Configurable.java?rev=72058&view=auto

Best regards,
-- Shinobu

--
Shinobu "Kawai" Yoshida <shinobu.kawai@gmail.com>

---------------------------------------------------------------------
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