You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org> on 2007/03/08 01:10:39 UTC

[jira] Closed: (VELOCITY-138) Velocity-Tools: Loggers and Resource Loaders ignores in config file

     [ https://issues.apache.org/jira/browse/VELOCITY-138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henning Schmiedehausen closed VELOCITY-138.
-------------------------------------------


> Velocity-Tools: Loggers and Resource Loaders ignores in config file
> -------------------------------------------------------------------
>
>                 Key: VELOCITY-138
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-138
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.3-rc1
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Anthony Kay
>         Assigned To: Nathan Bubna
>         Attachments: config_sample.tgz, diffs, README
>
>
> The configuration file passed to VelocityViewServlet is ignoring custom Loggers
> and Resource Loaders.
> Part of the reason for this is the default logging and resource loading needed
> to have a ServletContext, and the current hack to make that work forced a
> specific logger and resource loader.
> Proposed fix:
> 1) Put the ServletContext in the velocity application attributes
> 2) Let the loggers and loaders rely on the fact that they can get to
> ServletContext through the key VelocityViewServlet.SERVLET_CONTEXT
> 3) Check the incoming configuration file, and take a reasonable default for the
> logger and resource loader IF they are not explicitly set.
> While patching this bug, I have found the following additional issues:
> - The tools rely on 1.3-dev of velocity. When building against the current
> CVS of velocity (1.4), I get null pointer exceptions on the Velocity.init() when
> called from VelocityViewServlet. I will need to look into this further.
> - The new recommended init-param property is supposed to be named
> org.apache.velocity.properties, but with 1.3-dev it only works if you use the
> old name "properties".
> I have eliminated the need for the interface WebappLoaderAppContext, and have
> also written a simple proof of concept example called config_sample (to be
> placed in view/examples).
> I want to write/run some more tests, but this seems to work with the 1.3-dev.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org