You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Will Glass-Husain <wg...@forio.com> on 2003/10/26 05:33:32 UTC

patch requests

Hi,

A request... Bugzilla contains various patches, some of which are bug fixes
and some of which add specific user-requested functionality.

Here's one that's an easy add.  Windows users running WinCVS can't run "ant
test" as test-encoding fails.  (It's a line feed issue).
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20992

I have to re-apply this patch to my personal Velocity build everytime I
resync with CVS.  (yes, I develop on Windows.  hold the sarcasm and pass the
mustard, please).  Any chance this could get added?


####
Not to distract from my main message above, here's a few other patches that
include code and test cases.  I'd be willing to help out with docs.
(Especially for the first two, which I created).  The list is a bit random
(I searched bugzilla for the word "patch", then used my discretion), but
they all look reasonably complete, straightforward to update (or at least
fairly modular) and solve particular problems for users.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20342
new event handler for input directives (#parse, #include)

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20341
prevents execution of "dangerous" methods with ClassLoader and reflection.
(can be turned off w/ configuration).

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20999
#set does not allow to assign nulls  (needs a test case)

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21417
Allows anakia users to include custom contexts

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22419
Fixes bug in ClassPathResourceLoader


WILL

_______________________________________
Forio Business Simulations
Will Glass-Husain
wglass@forio.com
www.forio.com


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


Re: patch requests

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Sunday, October 26, 2003, at 12:33 AM, Will Glass-Husain wrote:

> Hi,
>
> A request... Bugzilla contains various patches, some of which are bug 
> fixes
> and some of which add specific user-requested functionality.
>
> Here's one that's an easy add.  Windows users running WinCVS can't run 
> "ant
> test" as test-encoding fails.  (It's a line feed issue).
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20992
>
> I have to re-apply this patch to my personal Velocity build everytime I
> resync with CVS.  (yes, I develop on Windows.  hold the sarcasm and 
> pass the
> mustard, please).  Any chance this could get added?

Done.  And there's no sarcasm, just heartfelt pity.

( I just got my copy of Panther :)  )

The rest we'll cover one by one.  Some aren't bugs, but changes, and 
will follow up in separate emails.

geir

-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


Re: input event cartridge

Posted by Claude Brisson <cl...@savoirweb.com>.
Will wrote :

> That's a nice idea.  Consistent with the way other plugins (like custom
> directives) are handled as well, i.e. in the Velocity properties file.
>

I agree, but I'm not sure at all that an event cartridge is pertinent for relative resource loading.

After all, it is the duty of the Ressource Manager and Loaders to perform such a relative loading : the path "." should appear as a
search path among others in the velocity.properties file, like :

[...]
webapp.resource.loader.path = .
webapp.resource.loader.path = /WEB-INF/templates/
webapp.resource.loader.path = /
[...]

Also, unless you impose absolute pathes to always start with a "/" (which is not backward compatible), a relative path is always
ambiguous (it can be interpreted as absolute or relative). If "." is listed as a search path among others, the ambiguity is resolved
with the order of precedence given by the properties (according to the given the exemple : first check relative then absolute).

But to implement it this way, the ResourceLoader, as long as the ResourceManager, needs a reference to the InternalContextAdapter
(passed to it via new versions of the getContent / getTemplate methods). It can still be backward compatible considering that if the
ICA is not specified, no relative pathname resolution will occur.

I've implemented it this way. Should I share it ?

CloD



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


Re: input event cartridge

Posted by Will Glass-Husain <wg...@forio.com>.
That's a nice idea.  Consistent with the way other plugins (like custom
directives) are handled as well, i.e. in the Velocity properties file.

WILL

----- Original Message ----- 
From: "Geir Magnusson Jr." <ge...@optonline.net>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
Sent: Tuesday, October 28, 2003 8:49 AM
Subject: Re: input event cartridge


>
> On Tuesday, October 28, 2003, at 09:05 AM, Will Glass-Husain wrote:
>
> > Yay!  I've been using this patch on my private build for some time
> > now, and
> > find it quite useful.
> >
> > What are you thinking regarding your comment on configuring an event
> > cartridge?  Do you mean that there should be a "relativeload" event
> > cartridge that can be used at the developer's discretion?
>
> Well, right now, if you want to use the event handling stuff, you have
> to add an event cartridge in the code, which doesn't work if it isn't
> your code.  It might be nice to configure an event cartridge via
> properties rather than code, so that you could add a input handler that
> does what claude wants, for example...
>
> >
> > WILL
> >
> >
> > ----- Original Message -----
> > From: "Geir Magnusson Jr." <ge...@optonline.net>
> > To: "Velocity Developers List" <ve...@jakarta.apache.org>
> > Sent: Tuesday, October 28, 2003 3:51 AM
> > Subject: Re: patch requests
> >
> >
> >>
> >> On Sunday, October 26, 2003, at 12:33 AM, Will Glass-Husain wrote:
> >>
> >>>
> >>> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20342
> >>> new event handler for input directives (#parse, #include)
> >>
> >> I love this idea, and there is a related suggestion :
> >>
> >> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18072
> >>
> >> which I am less of a fan of the solution, because I think you'd run
> >> into serious confusion especially w/ things invoked from VMs.
> >>
> >> However, I think we can combine the two ideas because the former
> >> covers
> >> the latter.  The event handler method is natural now.  In order to
> >> make
> >> it automatic, as Claude wants, we can look at being able to configure
> >> an event cartridge rather than only be able to do in code.  That way
> >> you can modify behavior through configuration.
> >>
> >> Does that sound right?
> >>
> >> I'll start with Will's patch.
> >>
> >> -- 
> >> Geir Magnusson Jr                                   203-247-1713(m)
> >> geirm@optonline.net
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
> >
> >
> -- 
> Geir Magnusson Jr                                   203-247-1713(m)
> geirm@optonline.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>


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


Re: input event cartridge

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Tuesday, October 28, 2003, at 09:05 AM, Will Glass-Husain wrote:

> Yay!  I've been using this patch on my private build for some time 
> now, and
> find it quite useful.
>
> What are you thinking regarding your comment on configuring an event
> cartridge?  Do you mean that there should be a "relativeload" event
> cartridge that can be used at the developer's discretion?

Well, right now, if you want to use the event handling stuff, you have 
to add an event cartridge in the code, which doesn't work if it isn't 
your code.  It might be nice to configure an event cartridge via 
properties rather than code, so that you could add a input handler that 
does what claude wants, for example...

>
> WILL
>
>
> ----- Original Message -----
> From: "Geir Magnusson Jr." <ge...@optonline.net>
> To: "Velocity Developers List" <ve...@jakarta.apache.org>
> Sent: Tuesday, October 28, 2003 3:51 AM
> Subject: Re: patch requests
>
>
>>
>> On Sunday, October 26, 2003, at 12:33 AM, Will Glass-Husain wrote:
>>
>>>
>>> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20342
>>> new event handler for input directives (#parse, #include)
>>
>> I love this idea, and there is a related suggestion :
>>
>> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18072
>>
>> which I am less of a fan of the solution, because I think you'd run
>> into serious confusion especially w/ things invoked from VMs.
>>
>> However, I think we can combine the two ideas because the former 
>> covers
>> the latter.  The event handler method is natural now.  In order to 
>> make
>> it automatic, as Claude wants, we can look at being able to configure
>> an event cartridge rather than only be able to do in code.  That way
>> you can modify behavior through configuration.
>>
>> Does that sound right?
>>
>> I'll start with Will's patch.
>>
>> -- 
>> Geir Magnusson Jr                                   203-247-1713(m)
>> geirm@optonline.net
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


Re: input event cartridge

Posted by Will Glass-Husain <wg...@forio.com>.
Yay!  I've been using this patch on my private build for some time now, and
find it quite useful.

What are you thinking regarding your comment on configuring an event
cartridge?  Do you mean that there should be a "relativeload" event
cartridge that can be used at the developer's discretion?

WILL


----- Original Message ----- 
From: "Geir Magnusson Jr." <ge...@optonline.net>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
Sent: Tuesday, October 28, 2003 3:51 AM
Subject: Re: patch requests


>
> On Sunday, October 26, 2003, at 12:33 AM, Will Glass-Husain wrote:
>
> >
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20342
> > new event handler for input directives (#parse, #include)
>
> I love this idea, and there is a related suggestion :
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18072
>
> which I am less of a fan of the solution, because I think you'd run
> into serious confusion especially w/ things invoked from VMs.
>
> However, I think we can combine the two ideas because the former covers
> the latter.  The event handler method is natural now.  In order to make
> it automatic, as Claude wants, we can look at being able to configure
> an event cartridge rather than only be able to do in code.  That way
> you can modify behavior through configuration.
>
> Does that sound right?
>
> I'll start with Will's patch.
>
> -- 
> Geir Magnusson Jr                                   203-247-1713(m)
> geirm@optonline.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>


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


Re: patch requests

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Sunday, October 26, 2003, at 12:33 AM, Will Glass-Husain wrote:

>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20342
> new event handler for input directives (#parse, #include)

I love this idea, and there is a related suggestion :

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18072

which I am less of a fan of the solution, because I think you'd run 
into serious confusion especially w/ things invoked from VMs.

However, I think we can combine the two ideas because the former covers 
the latter.  The event handler method is natural now.  In order to make 
it automatic, as Claude wants, we can look at being able to configure 
an event cartridge rather than only be able to do in code.  That way 
you can modify behavior through configuration.

Does that sound right?

I'll start with Will's patch.

-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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