Hi Sato,
> I'm using VelocityView and am very happy it's much easier creating
> dynamic HTML than JSP and custom tags.
Agreed. :)
> Now I need to use some my own implementation of ServletToolboxRuleSet
> (which is in "org.apache.velocity.tools.view.servlet" package),
> so I tried to extend ServletToolboxManager to overrride "getRuleSet()"
> method in it. But I couldn't because ServletToolboxManager is singleton
> and its only constructor is private.
It is so easy to change the constructor protected. ;)
> ServletToolboxManager source (VelocityTools 1.1) is like this:
> ===
## snip
> and I made subclass like this (it's bad solution. it fails to compile...):
> ===
> public class MyServletToolboxManger extends ServletToolboxManager {
> public static synchronized ServletToolboxManger getInstance(
> ServletContext servlet,
> String toolboxFile) {
> ...
> }
> protected RuleSet getRuleSet() { /* return my own RuleSet */ }
> }
> ===
>
> If any good idea to extend ServletToolboxManager, please could you
> tell me?
Hacking VelocityViewServlet#initToolbox()? Actually, I think it might
be nice if you could configure the RuleSet via init-param.
Best regards,
-- Shinobu
--
Shinobu "Kawai" Yoshida <[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]