Anthony said:
> 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).

you know, i've never really looked at this stuff before.  when i don't write
it myself or have any problems with it, i just tend to glaze over sometimes.
:)  anyway, yeah, at first glance, i don't see why the wrapper is
needed/useful either  (and that attribute key should really be a constant
somewhere!).

Geir?  are you out there?  i'm assuming there's a reason it was done this
way.  is there still a reason?

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


these sound reasonable, but as i said, i haven't looked into the
code/problem carefully.  i may try to look thru this myself in the next week
or so, but in the meantime, feel free to try it out yourself and let us know
if it works.  if it does, send a patch and i'll give it a go.  code is a lot
easier (and less time-consuming) for me to evaluate than suggested plans
are. :)

Nathan Bubna
[EMAIL PROTECTED]


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

Reply via email to