Nathan,

I looked into the source. Let me bounce this off of you.

1) Why is there a wrapper (VelocityStrutsServletAppContext)
to "safely" pass ServletContext to other parts of the app?
It is being passed by reference anyway, and a copy is 
not being made, so I see no extra safety in this. If it is to
avoid someone putting something wierd in its place for a later
app module to find, can't the same thing happen with the wrapper?
IMHO, it would be advantageous to store the
ServletContext itself under a standardized key, which would 
then allow a custom resource loader or logger to find it
(if it needed it).

2) On logging. It looks as if the user need only supply a derivation
of LogSystem classname in a property, and then something like 
the following might work:

a. Put ServletContext under a well-known key (see (1))
b. Get the logger class name from properties
   b.2 default to current ServletLogger if not specified
c. Load the class and instantiate (no-arg constructor)
   c.2 insure object is instanceof LogSystem
   c.2 Class can get ServletContext from well-known key
d. Put LogSystem instance into Velocity

3) Resource loader. Correct me if I'm wrong, but you want the
resource loader to be configurable so that someone can do
something wiggy like load templates from a database or 
network server? If the ServletContext is under a well-known
key, a solution similar to the logging one I just proposed
would probably be just fine, no?

- Tony

--- Nathan Bubna <[EMAIL PROTECTED]> wrote:
> Anthony said:
> ...
> > Nathan said:
> > > if you're really looking for something to dig into, the current
> > > configuration issue (hard-coded, non-overwritable logger and
> resource
> > > loader) might be a good one for you.  i've looked at it a bit,
> and
> > > i've yet
> > > to see a clean solution for it.  if you want to take a shot, i
> think
> > > that'd
> > > be great place to start.
> >
> > Could you give me a little better direction than this? Are you
> talking
> > about issues with the stand-alone Velocity or the Tools?
> 
> i was referring to the "Known Issues/Bugs" section in the STATUS
> document
> for the tools subproject.  in particular, the first listed "issue."
> 
> if you're interested in digging into this, the first place you'll
> want to
> look is in the initVelocity() method of the VelocityViewServlet. 
> there the
> velocity.properties file is loaded and the log system and resource
> loader
> are explicitly set (in hard-coded fashion, regardless of the
> velocity.properties that were loaded).  this is not really a
> "showstopper,"
> and if it ends up requiring some more drastic changes, i may be
> willing to
> support a 1.0 release without dealing with this.  but, we need to at
> least
> take a shot at it.
> 
> Nathan Bubna
> [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to