velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Sidler <>
Subject Re: [VelTools] Velocity for Struts
Date Tue, 05 Mar 2002 13:39:11 GMT
"Geir Magnusson Jr." wrote:
> > The code is now structured such that all Struts Know-How is
> > kept in a class StrutsUtils. This is a utility class with all
> > static methods. All context tools use it to access to the
> > Struts resources. This avoids the spreading of Struts Know How
> > all over. The methods of StrutsUtils reflect what Velocity context
> > tools need from Struts. I hope that at some point these
> > utilities can be integrated into Struts itself.
> It would have been cuter if you called it 'StrutsKnowHow'.

Are you serious? :-) This sounds a little awkward...

> >
> > I introduced an abstract context tool ServletContextTool. All
> > Struts context tools extend ServletContextTool. It provides
> > logging to the logging facility provided by the Servlet API.
> > I am not fully satisfied yet with this approach. I think we
> > should forsee logging support already in the ContextTool interface.
> Struts has no concept of logging????

Standard Struts relies on the logging facilities provided by the servlet 
API. It adds a thin layer that supports log levels (as a log() method of the 
Struts servlet). There's now some discussion on the dev list about adding
the commons logging.

But, how do context tools get access to the logging facilities? That's
not straightforward. The current ContextTool interface doesn't forsee 
One approach would be to add a setLogger(Logger l) method to the 
ContextTool interface. A context tool manager, like VelocityViewServlet, 
could then use this method to pass a reference to a logger. Such an approach 
wouldn't be specific to a servlet environments.


> --
> Geir Magnusson Jr.                           
> System and Software Consulting
> The question is : What is a Mahnamahna?

Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message