You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Antonio Petrelli <an...@gmail.com> on 2008/07/06 12:00:56 UTC
[Semi-OT] Loading resources/files with wildcards
Hi all,
I would like to know if in S1 or in S2 there is a mechanism to load
resources (from classpath) and/or files using wildcards. I really
would like to use it inside Tiles.
I noticed that there such a mechanism in Spring:
http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/core/io/support/PathMatchingResourcePatternResolver.html
but I wish to remain in the Apache world to avoid licensing and
dependencies implications.
TIA
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Semi-OT] Loading resources/files with wildcards
Posted by Antonio Petrelli <an...@gmail.com>.
2008/7/7 Owen Berry <ow...@gmail.com>:
> In terms of licensing, from the bottom of http://springframework.org/about
>
> "All Spring projects are licensed under the terms of the Apache
> License, Version 2.0."
>
You're right, sorry for using the wrong term. The problem is that,
using a 3rd party software source, we need to create a different
header in source files, and I don't want to do so and, if it is
possible, I want to use software developed @Apache.
Anyway thank you :-)
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Semi-OT] Loading resources/files with wildcards
Posted by Owen Berry <ow...@gmail.com>.
In terms of licensing, from the bottom of http://springframework.org/about
"All Spring projects are licensed under the terms of the Apache
License, Version 2.0."
On Sun, Jul 6, 2008 at 6:00 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> Hi all,
> I would like to know if in S1 or in S2 there is a mechanism to load
> resources (from classpath) and/or files using wildcards. I really
> would like to use it inside Tiles.
> I noticed that there such a mechanism in Spring:
> http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/core/io/support/PathMatchingResourcePatternResolver.html
> but I wish to remain in the Apache world to avoid licensing and
> dependencies implications.
>
> TIA
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Semi-OT] Loading resources/files with wildcards
Posted by Antonio Petrelli <an...@gmail.com>.
2008/7/7 Musachy Barroso <mu...@gmail.com>:
> There are also new classes under: com.opensymphony.xwork2.util.finder
> (borrowed from xbeans) to find classes/resources in the classpath.
> They are pretty handy if you use them with UrlSet (in that package
> also).
Interesting too, thanks Musachy :-)
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Semi-OT] Loading resources/files with wildcards
Posted by Musachy Barroso <mu...@gmail.com>.
There are also new classes under: com.opensymphony.xwork2.util.finder
(borrowed from xbeans) to find classes/resources in the classpath.
They are pretty handy if you use them with UrlSet (in that package
also).
musachy
On Mon, Jul 7, 2008 at 11:19 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> 2008/7/7 Wes Wannemacher <we...@wantii.com>:
>> I'm not an XWork committer, and I think Don actually wrote the
>> PatternMatcher, which is basically the main component behind
>> ClassPathFinder. Don ended up committing the patch for me. None of the
>> Struts code needed altered when this was added, so I never really
>> worried about the header.
>>
>> WildcardHelper doesn't look for files, ClassPathFinder does though. It
>> searches recursively, so use with caution.
>
> Thanks a lot Wes, I will check it :-)
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Semi-OT] Loading resources/files with wildcards
Posted by Antonio Petrelli <an...@gmail.com>.
2008/7/7 Wes Wannemacher <we...@wantii.com>:
> I'm not an XWork committer, and I think Don actually wrote the
> PatternMatcher, which is basically the main component behind
> ClassPathFinder. Don ended up committing the patch for me. None of the
> Struts code needed altered when this was added, so I never really
> worried about the header.
>
> WildcardHelper doesn't look for files, ClassPathFinder does though. It
> searches recursively, so use with caution.
Thanks a lot Wes, I will check it :-)
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Semi-OT] Loading resources/files with wildcards
Posted by Wes Wannemacher <we...@wantii.com>.
I'm not an XWork committer, and I think Don actually wrote the
PatternMatcher, which is basically the main component behind
ClassPathFinder. Don ended up committing the patch for me. None of the
Struts code needed altered when this was added, so I never really
worried about the header.
WildcardHelper doesn't look for files, ClassPathFinder does though. It
searches recursively, so use with caution.
On Mon, Jul 7, 2008 at 10:50 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> 2008/7/7 Wes Wannemacher <we...@wantii.com>:
>> I added some wildcard support to XMLConfigurationProvider a while ago.
>> It's not particularly feature-rich, but it works somewhat intuitively.
>> Check the unit tests for examples of using it...
>>
>> http://svn.opensymphony.com/fisheye/browse/~raw,r=1833/xwork/trunk/src/test/com/opensymphony/xwork2/util/WildcardHelperTest.java
>
> Thanks a lot Wes, I will check it out this evening, it seems useful.
>
> But I have a couple of questions:
> 1. Is WildcardHelper used to get a list of files and resources that
> match a pattern?
> 2. What about the header that I need to include in the modified
> source? Since I know that there is a sort of "treaty" between XWork
> and Struts 2, I think that no header is necessary... or yes?
>
> Thanks again
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Semi-OT] Loading resources/files with wildcards
Posted by Antonio Petrelli <an...@gmail.com>.
2008/7/7 Wes Wannemacher <we...@wantii.com>:
> I added some wildcard support to XMLConfigurationProvider a while ago.
> It's not particularly feature-rich, but it works somewhat intuitively.
> Check the unit tests for examples of using it...
>
> http://svn.opensymphony.com/fisheye/browse/~raw,r=1833/xwork/trunk/src/test/com/opensymphony/xwork2/util/WildcardHelperTest.java
Thanks a lot Wes, I will check it out this evening, it seems useful.
But I have a couple of questions:
1. Is WildcardHelper used to get a list of files and resources that
match a pattern?
2. What about the header that I need to include in the modified
source? Since I know that there is a sort of "treaty" between XWork
and Struts 2, I think that no header is necessary... or yes?
Thanks again
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Semi-OT] Loading resources/files with wildcards
Posted by Wes Wannemacher <we...@wantii.com>.
Antonio,
I added some wildcard support to XMLConfigurationProvider a while ago.
It's not particularly feature-rich, but it works somewhat intuitively.
Check the unit tests for examples of using it...
http://svn.opensymphony.com/fisheye/browse/~raw,r=1833/xwork/trunk/src/test/com/opensymphony/xwork2/util/WildcardHelperTest.java
On Sun, Jul 6, 2008 at 6:00 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> Hi all,
> I would like to know if in S1 or in S2 there is a mechanism to load
> resources (from classpath) and/or files using wildcards. I really
> would like to use it inside Tiles.
> I noticed that there such a mechanism in Spring:
> http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/core/io/support/PathMatchingResourcePatternResolver.html
> but I wish to remain in the Apache world to avoid licensing and
> dependencies implications.
>
> TIA
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org