Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Christian Grobmeier
Hello Maurizio,

> I do some change on the S2 Junit4 plugin, now it should be simpler run a
> test with or without spring.
> Could you test the latest version of the aforementioned plugin [1]?
> Christian, is this [2] your use case?
> WDYT? is more intuitive?

not tested it yet, but yes, that is what I want to have, it looks
great! Thank you very much for the work!

One question roused in me when I see this one and even the old Junit3
testcase. I was always wondering were
the struts.xml is drawn. In most cases of course I want to test the
struts.xml as it is used in my webapp. But sometimes i might want to
test something else, a special error case or maybe a result type. For
these cases I might want to test with a variation of my struts.xml,
and therefore this might be useful:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"your-application-context.xml"})
@StrutsContextConfiguration(locations = {"struts-test.xml"})
public class YourActionIntegrationTest extends
StrutsSpringJUnit4TestCase {

not sure if my idea makes sense, but wanted to bring it to discussion.

Cheers!
Christian

>
> [1]
> https://builds.apache.org/job/Struts2/334/org.apache.struts$struts2-junit-plugin/
> [2]
> https://issues.apache.org/jira/browse/WW-3667?focusedCommentId=13079421&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13079421
> On 3 August 2011 20:16, Christian Grobmeier  wrote:
>
>> Hi,
>>
>> at the moment I found out to test without that class. Not really a
>> full test, but it works for my needs at the moment. Therefore I can
>> wait until you have pushed your code to google. Please ping this list
>> once it is done - guess some others ahve an interest in it too :-)
>>
>> Cheers
>> Christian
>>
>> On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres
>>  wrote:
>> > Hi,
>> >
>> > StrutsJUnit4TestCase is really tricky. I found few pointers in the web.
>> > I'm currently using it successfully for my modest testing
>> > requirements, but you don't need to provide a web.xml file.
>> >
>> > When I say integration testing utility, I mean testing a full blown
>> > interceptor stack with your actions and interceptors. If you want to
>> > test either your actions or interceptors in isolation, you may not
>> > need this.
>> >
>> > Funny enough, I'm currently in the process of open sourcing our Struts
>> > 2 integration testing utility, which is based on StrutsJUnit4TestCase
>> > (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a
>> > few minutes, you may download it from google code.
>> >
>> > Regards,
>> > Gabriel
>> >
>> > 2011/8/3 Christian Grobmeier :
>> >> Hello all,
>> >>
>> >> today I tried to figure out how one can use StrutsJUnit4TestCase. I am
>> >> currently puzzled. I found docs for the older implementation for
>> >> Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any
>> >> pointers?
>> >>
>> >> With the old stuff i simply did: this.executeAction() and all was
>> >> well. Now it seems I have to give the class a web.xml - how?
>> >>
>> >> Thanks in advance
>> >>
>> >> Christian
>> >>
>> >> -
>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >>
>> >>
>> >
>> > -
>> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> > For additional commands, e-mail: user-h...@struts.apache.org
>> >
>> >
>>
>>
>>
>> --
>> http://www.grobmeier.de
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
> --
> Maurizio Cucchiara
>



-- 
http://www.grobmeier.de

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Christian Grobmeier
Hello Gabriel,

thanks for the work, it looks really good!

What I not like so much is the fact that the test methods name must
match the Actions name. I didn't find this very intuitive. I could use
the @Config option, which I like much more, but then i face the
problem that "one test method = one action". In some cases I might
need the flexibility to call multiple actions in one test method.

What I like is the support of another struts.xml file. I have
mentioned this on the other mail to Maurizio.

At the moment I must say I tend to Maurizios solution. I solves
everything and is part of the struts 2 project. But I will watch your
project from now on.

Cheers!
Christian

On Wed, Aug 3, 2011 at 9:12 PM, Gabriel Belingueres
 wrote:
> There you go:
>
> http://code.google.com/p/struts2-junit/
>
> Regards,
> Gabriel
>
> 2011/8/3 Christian Grobmeier :
>> Hi,
>>
>> at the moment I found out to test without that class. Not really a
>> full test, but it works for my needs at the moment. Therefore I can
>> wait until you have pushed your code to google. Please ping this list
>> once it is done - guess some others ahve an interest in it too :-)
>>
>> Cheers
>> Christian
>>
>> On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres
>>  wrote:
>>> Hi,
>>>
>>> StrutsJUnit4TestCase is really tricky. I found few pointers in the web.
>>> I'm currently using it successfully for my modest testing
>>> requirements, but you don't need to provide a web.xml file.
>>>
>>> When I say integration testing utility, I mean testing a full blown
>>> interceptor stack with your actions and interceptors. If you want to
>>> test either your actions or interceptors in isolation, you may not
>>> need this.
>>>
>>> Funny enough, I'm currently in the process of open sourcing our Struts
>>> 2 integration testing utility, which is based on StrutsJUnit4TestCase
>>> (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a
>>> few minutes, you may download it from google code.
>>>
>>> Regards,
>>> Gabriel
>>>
>>> 2011/8/3 Christian Grobmeier :
 Hello all,

 today I tried to figure out how one can use StrutsJUnit4TestCase. I am
 currently puzzled. I found docs for the older implementation for
 Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any
 pointers?

 With the old stuff i simply did: this.executeAction() and all was
 well. Now it seems I have to give the class a web.xml - how?

 Thanks in advance

 Christian

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>>
>>
>> --
>> http://www.grobmeier.de
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
http://www.grobmeier.de

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Maurizio Cucchiara
Hi Christian,
thanks for your precious feedback.
your idea makes a lot of sense indeed!
Unfortunately the struts.xml file name is one of the strong convention of S2
(the file name appears inside the code) and after a very quick look it would
not seem simple to replace.
Anyway, I'll take a deep look at this ASAP.

Maurizio Cucchiara


On 8 August 2011 10:35, Christian Grobmeier  wrote:

> Hello Maurizio,
>
> > I do some change on the S2 Junit4 plugin, now it should be simpler run a
> > test with or without spring.
> > Could you test the latest version of the aforementioned plugin [1]?
> > Christian, is this [2] your use case?
> > WDYT? is more intuitive?
>
> not tested it yet, but yes, that is what I want to have, it looks
> great! Thank you very much for the work!
>
> One question roused in me when I see this one and even the old Junit3
> testcase. I was always wondering were
> the struts.xml is drawn. In most cases of course I want to test the
> struts.xml as it is used in my webapp. But sometimes i might want to
> test something else, a special error case or maybe a result type. For
> these cases I might want to test with a variation of my struts.xml,
> and therefore this might be useful:
>
> @RunWith(SpringJUnit4ClassRunner.class)
> @ContextConfiguration(locations = {"your-application-context.xml"})
> @StrutsContextConfiguration(locations = {"struts-test.xml"})
> public class YourActionIntegrationTest extends
> StrutsSpringJUnit4TestCase {
>
> not sure if my idea makes sense, but wanted to bring it to discussion.
>
> Cheers!
> Christian
>
> >
> > [1]
> >
> https://builds.apache.org/job/Struts2/334/org.apache.struts$struts2-junit-plugin/
> > [2]
> >
> https://issues.apache.org/jira/browse/WW-3667?focusedCommentId=13079421&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13079421
> > On 3 August 2011 20:16, Christian Grobmeier  wrote:
> >
> >> Hi,
> >>
> >> at the moment I found out to test without that class. Not really a
> >> full test, but it works for my needs at the moment. Therefore I can
> >> wait until you have pushed your code to google. Please ping this list
> >> once it is done - guess some others ahve an interest in it too :-)
> >>
> >> Cheers
> >> Christian
> >>
> >> On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres
> >>  wrote:
> >> > Hi,
> >> >
> >> > StrutsJUnit4TestCase is really tricky. I found few pointers in the
> web.
> >> > I'm currently using it successfully for my modest testing
> >> > requirements, but you don't need to provide a web.xml file.
> >> >
> >> > When I say integration testing utility, I mean testing a full blown
> >> > interceptor stack with your actions and interceptors. If you want to
> >> > test either your actions or interceptors in isolation, you may not
> >> > need this.
> >> >
> >> > Funny enough, I'm currently in the process of open sourcing our Struts
> >> > 2 integration testing utility, which is based on StrutsJUnit4TestCase
> >> > (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a
> >> > few minutes, you may download it from google code.
> >> >
> >> > Regards,
> >> > Gabriel
> >> >
> >> > 2011/8/3 Christian Grobmeier :
> >> >> Hello all,
> >> >>
> >> >> today I tried to figure out how one can use StrutsJUnit4TestCase. I
> am
> >> >> currently puzzled. I found docs for the older implementation for
> >> >> Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any
> >> >> pointers?
> >> >>
> >> >> With the old stuff i simply did: this.executeAction() and all was
> >> >> well. Now it seems I have to give the class a web.xml - how?
> >> >>
> >> >> Thanks in advance
> >> >>
> >> >> Christian
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> >> For additional commands, e-mail: user-h...@struts.apache.org
> >> >>
> >> >>
> >> >
> >> > -
> >> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> > For additional commands, e-mail: user-h...@struts.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> http://www.grobmeier.de
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >>
> >
> >
> > --
> >
> Maurizio Cucchiara
> >
>
>
>
> --
> http://www.grobmeier.de
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Maurizio Cucchiara
Maurizio Cucchiara
Ignore the last rows of my email: I did not read Christian's email about the
Config annotation and I did not take a look at Gabriel's code.
A good reason to take a deep look at this too.
@Gabriel: In the meanwhile, considering your experience, if you have any
suggestion, it will be very appreciated.

On 8 August 2011 11:49, Maurizio Cucchiara  wrote:

> Hi Christian,
> thanks for your precious feedback.
> your idea makes a lot of sense indeed!
> Unfortunately the struts.xml file name is one of the strong convention of
> S2 (the file name appears inside the code) and after a very quick look it
> would not seem simple to replace.
> Anyway, I'll take a deep look at this ASAP.
>
> Maurizio Cucchiara
>
>
>
> On 8 August 2011 10:35, Christian Grobmeier  wrote:
>
>> Hello Maurizio,
>>
>> > I do some change on the S2 Junit4 plugin, now it should be simpler run a
>> > test with or without spring.
>> > Could you test the latest version of the aforementioned plugin [1]?
>> > Christian, is this [2] your use case?
>> > WDYT? is more intuitive?
>>
>> not tested it yet, but yes, that is what I want to have, it looks
>> great! Thank you very much for the work!
>>
>> One question roused in me when I see this one and even the old Junit3
>> testcase. I was always wondering were
>> the struts.xml is drawn. In most cases of course I want to test the
>> struts.xml as it is used in my webapp. But sometimes i might want to
>> test something else, a special error case or maybe a result type. For
>> these cases I might want to test with a variation of my struts.xml,
>> and therefore this might be useful:
>>
>> @RunWith(SpringJUnit4ClassRunner.class)
>> @ContextConfiguration(locations = {"your-application-context.xml"})
>> @StrutsContextConfiguration(locations = {"struts-test.xml"})
>> public class YourActionIntegrationTest extends
>> StrutsSpringJUnit4TestCase {
>>
>> not sure if my idea makes sense, but wanted to bring it to discussion.
>>
>> Cheers!
>> Christian
>>
>> >
>> > [1]
>> >
>> https://builds.apache.org/job/Struts2/334/org.apache.struts$struts2-junit-plugin/
>> > [2]
>> >
>> https://issues.apache.org/jira/browse/WW-3667?focusedCommentId=13079421&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13079421
>> > On 3 August 2011 20:16, Christian Grobmeier 
>> wrote:
>> >
>> >> Hi,
>> >>
>> >> at the moment I found out to test without that class. Not really a
>> >> full test, but it works for my needs at the moment. Therefore I can
>> >> wait until you have pushed your code to google. Please ping this list
>> >> once it is done - guess some others ahve an interest in it too :-)
>> >>
>> >> Cheers
>> >> Christian
>> >>
>> >> On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres
>> >>  wrote:
>> >> > Hi,
>> >> >
>> >> > StrutsJUnit4TestCase is really tricky. I found few pointers in the
>> web.
>> >> > I'm currently using it successfully for my modest testing
>> >> > requirements, but you don't need to provide a web.xml file.
>> >> >
>> >> > When I say integration testing utility, I mean testing a full blown
>> >> > interceptor stack with your actions and interceptors. If you want to
>> >> > test either your actions or interceptors in isolation, you may not
>> >> > need this.
>> >> >
>> >> > Funny enough, I'm currently in the process of open sourcing our
>> Struts
>> >> > 2 integration testing utility, which is based on StrutsJUnit4TestCase
>> >> > (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a
>> >> > few minutes, you may download it from google code.
>> >> >
>> >> > Regards,
>> >> > Gabriel
>> >> >
>> >> > 2011/8/3 Christian Grobmeier :
>> >> >> Hello all,
>> >> >>
>> >> >> today I tried to figure out how one can use StrutsJUnit4TestCase. I
>> am
>> >> >> currently puzzled. I found docs for the older implementation for
>> >> >> Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any
>> >> >> pointers?
>> >> >>
>> >> >> With the old stuff i simply did: this.executeAction() and all was
>> >> >> well. Now it seems I have to give the class a web.xml - how?
>> >> >>
>> >> >> Thanks in advance
>> >> >>
>> >> >> Christian
>> >> >>
>> >> >>
>> -
>> >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> > -
>> >> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> > For additional commands, e-mail: user-h...@struts.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> http://www.grobmeier.de
>> >>
>> >> -
>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> >
>> Maurizio Cucchiara
>> >
>>
>>
>>
>> --
>> http://www.gr

OGNL context lookup

2011-08-08 Thread CRANFORD, CHRIS
I have a JSP page where I need to iterate over a list of strings and for
each string, I need to query the OGNL stack and get the value that
string name represents followed by adding the name/value pair to a URL.
I thought something like the following would work but it doesn't.  Can
anyone help?


  

  





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Gabriel Belingueres
Hi,

You can execute more than one action in the same test method, as long
as you create a new request and actionProxy, something like this:

@Test @Config(actionName="foo")
public void someTest() {
  ...some test code...

  // second request:
  request = new MockHttpServletRequest(); // and then add your params
  response = new MockHttpServletResponse();
  createActionProxy(null, "testAnotherAction", null);
  actionProxy.execute(); // executes the testAnotherAction action
  assertTrue();
}

If you are using maven, then you can add your test struts.xml files in
'src/test/resources' folder.

Regards,
Gabriel

2011/8/8 Christian Grobmeier :
> Hello Gabriel,
>
> thanks for the work, it looks really good!
>
> What I not like so much is the fact that the test methods name must
> match the Actions name. I didn't find this very intuitive. I could use
> the @Config option, which I like much more, but then i face the
> problem that "one test method = one action". In some cases I might
> need the flexibility to call multiple actions in one test method.
>
> What I like is the support of another struts.xml file. I have
> mentioned this on the other mail to Maurizio.
>
> At the moment I must say I tend to Maurizios solution. I solves
> everything and is part of the struts 2 project. But I will watch your
> project from now on.
>
> Cheers!
> Christian
>
> On Wed, Aug 3, 2011 at 9:12 PM, Gabriel Belingueres
>  wrote:
>> There you go:
>>
>> http://code.google.com/p/struts2-junit/
>>
>> Regards,
>> Gabriel
>>
>> 2011/8/3 Christian Grobmeier :
>>> Hi,
>>>
>>> at the moment I found out to test without that class. Not really a
>>> full test, but it works for my needs at the moment. Therefore I can
>>> wait until you have pushed your code to google. Please ping this list
>>> once it is done - guess some others ahve an interest in it too :-)
>>>
>>> Cheers
>>> Christian
>>>
>>> On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres
>>>  wrote:
 Hi,

 StrutsJUnit4TestCase is really tricky. I found few pointers in the web.
 I'm currently using it successfully for my modest testing
 requirements, but you don't need to provide a web.xml file.

 When I say integration testing utility, I mean testing a full blown
 interceptor stack with your actions and interceptors. If you want to
 test either your actions or interceptors in isolation, you may not
 need this.

 Funny enough, I'm currently in the process of open sourcing our Struts
 2 integration testing utility, which is based on StrutsJUnit4TestCase
 (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a
 few minutes, you may download it from google code.

 Regards,
 Gabriel

 2011/8/3 Christian Grobmeier :
> Hello all,
>
> today I tried to figure out how one can use StrutsJUnit4TestCase. I am
> currently puzzled. I found docs for the older implementation for
> Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any
> pointers?
>
> With the old stuff i simply did: this.executeAction() and all was
> well. Now it seems I have to give the class a web.xml - how?
>
> Thanks in advance
>
> Christian
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org


>>>
>>>
>>>
>>> --
>>> http://www.grobmeier.de
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> http://www.grobmeier.de
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [S1] Validator configuration error [bump]

2011-08-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

On 8/3/2011 12:57 PM, Christopher Schultz wrote:
> I can always just patch my local struts-config.dtd file to get rid
> of the error. I'm happy to supply a (nearly trivial) patch to the
> 1.x branch just in case there is another release.

This is what I chose to do.

Unfortunately, DTDs are not very rich in their ability to specify
complex constraints (like arbitrary list of X, Y, Z, etc.) so I had to
change the "reset" attribute from "%Boolean #IMPLIED" to "CDATA IMPLIED".

Fixes the error on startup but does not appear to change the behavior.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5AGqkACgkQ9CaO5/Lv0PAb7ACfforNJAmlXPBfieoOMTNqOgct
s5UAoLRecDujUt3JPUCGaicvg0Tjr5pb
=y+1W
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Gabriel Belingueres
Hi Maurizio:

I'm yet about to look at your code.

My experience was pretty much the same as Christian, in that I wanted
to use Junit 4 and the supporting classes were not very easy to work
on.

I think that you get more value when you can be productive in no time.
One you can achieve this with convention over configuration rules for
example adding sensitive defaults like assuming the config file name
is 'struts.xml' and the action name is the test method's name are good
starting points, and adding annotations to configure the behavior or
your test when you have something that fall outside of the conventions
are a definite plus (taking care of DRY rules).

Regards,
Gabriel

2011/8/8 Maurizio Cucchiara :
> Maurizio Cucchiara
> Ignore the last rows of my email: I did not read Christian's email about the
> Config annotation and I did not take a look at Gabriel's code.
> A good reason to take a deep look at this too.
> @Gabriel: In the meanwhile, considering your experience, if you have any
> suggestion, it will be very appreciated.
>
> On 8 August 2011 11:49, Maurizio Cucchiara  wrote:
>
>> Hi Christian,
>> thanks for your precious feedback.
>> your idea makes a lot of sense indeed!
>> Unfortunately the struts.xml file name is one of the strong convention of
>> S2 (the file name appears inside the code) and after a very quick look it
>> would not seem simple to replace.
>> Anyway, I'll take a deep look at this ASAP.
>>
>> Maurizio Cucchiara
>>
>>
>>
>> On 8 August 2011 10:35, Christian Grobmeier  wrote:
>>
>>> Hello Maurizio,
>>>
>>> > I do some change on the S2 Junit4 plugin, now it should be simpler run a
>>> > test with or without spring.
>>> > Could you test the latest version of the aforementioned plugin [1]?
>>> > Christian, is this [2] your use case?
>>> > WDYT? is more intuitive?
>>>
>>> not tested it yet, but yes, that is what I want to have, it looks
>>> great! Thank you very much for the work!
>>>
>>> One question roused in me when I see this one and even the old Junit3
>>> testcase. I was always wondering were
>>> the struts.xml is drawn. In most cases of course I want to test the
>>> struts.xml as it is used in my webapp. But sometimes i might want to
>>> test something else, a special error case or maybe a result type. For
>>> these cases I might want to test with a variation of my struts.xml,
>>> and therefore this might be useful:
>>>
>>> @RunWith(SpringJUnit4ClassRunner.class)
>>> @ContextConfiguration(locations = {"your-application-context.xml"})
>>> @StrutsContextConfiguration(locations = {"struts-test.xml"})
>>> public class YourActionIntegrationTest extends
>>> StrutsSpringJUnit4TestCase {
>>>
>>> not sure if my idea makes sense, but wanted to bring it to discussion.
>>>
>>> Cheers!
>>> Christian
>>>
>>> >
>>> > [1]
>>> >
>>> https://builds.apache.org/job/Struts2/334/org.apache.struts$struts2-junit-plugin/
>>> > [2]
>>> >
>>> https://issues.apache.org/jira/browse/WW-3667?focusedCommentId=13079421&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13079421
>>> > On 3 August 2011 20:16, Christian Grobmeier 
>>> wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >> at the moment I found out to test without that class. Not really a
>>> >> full test, but it works for my needs at the moment. Therefore I can
>>> >> wait until you have pushed your code to google. Please ping this list
>>> >> once it is done - guess some others ahve an interest in it too :-)
>>> >>
>>> >> Cheers
>>> >> Christian
>>> >>
>>> >> On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres
>>> >>  wrote:
>>> >> > Hi,
>>> >> >
>>> >> > StrutsJUnit4TestCase is really tricky. I found few pointers in the
>>> web.
>>> >> > I'm currently using it successfully for my modest testing
>>> >> > requirements, but you don't need to provide a web.xml file.
>>> >> >
>>> >> > When I say integration testing utility, I mean testing a full blown
>>> >> > interceptor stack with your actions and interceptors. If you want to
>>> >> > test either your actions or interceptors in isolation, you may not
>>> >> > need this.
>>> >> >
>>> >> > Funny enough, I'm currently in the process of open sourcing our
>>> Struts
>>> >> > 2 integration testing utility, which is based on StrutsJUnit4TestCase
>>> >> > (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a
>>> >> > few minutes, you may download it from google code.
>>> >> >
>>> >> > Regards,
>>> >> > Gabriel
>>> >> >
>>> >> > 2011/8/3 Christian Grobmeier :
>>> >> >> Hello all,
>>> >> >>
>>> >> >> today I tried to figure out how one can use StrutsJUnit4TestCase. I
>>> am
>>> >> >> currently puzzled. I found docs for the older implementation for
>>> >> >> Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any
>>> >> >> pointers?
>>> >> >>
>>> >> >> With the old stuff i simply did: this.executeAction() and all was
>>> >> >> well. Now it seems I have to give the class a web.xml - how?
>>> >> >>
>>> >> >> Thanks in advance
>>> >> >>
>>> >> >> Christian
>>> >> >>
>>> >> >

Re: How to StrutsJUnit4TestCase?

2011-08-08 Thread Christian Grobmeier
Hello Maurizio,

today i have tested with your code and everything works well so far.

There is only one thing I cannot understand, but that is maybe not
related to your code. When I run it junit in eclipse, everything fine.
Do I do it with mvn test, it suddenly stops. I do not see any
exception, just the assert fails. I was wondering what the difference
is. Maybe you have an idea on that, but I think it is off topic for
your plugin.

Cheers
Christian

On Mon, Aug 8, 2011 at 11:49 AM, Maurizio Cucchiara
 wrote:
> Hi Christian,
> thanks for your precious feedback.
> your idea makes a lot of sense indeed!
> Unfortunately the struts.xml file name is one of the strong convention of S2
> (the file name appears inside the code) and after a very quick look it would
> not seem simple to replace.
> Anyway, I'll take a deep look at this ASAP.
>
> Maurizio Cucchiara
>
>
> On 8 August 2011 10:35, Christian Grobmeier  wrote:
>
>> Hello Maurizio,
>>
>> > I do some change on the S2 Junit4 plugin, now it should be simpler run a
>> > test with or without spring.
>> > Could you test the latest version of the aforementioned plugin [1]?
>> > Christian, is this [2] your use case?
>> > WDYT? is more intuitive?
>>
>> not tested it yet, but yes, that is what I want to have, it looks
>> great! Thank you very much for the work!
>>
>> One question roused in me when I see this one and even the old Junit3
>> testcase. I was always wondering were
>> the struts.xml is drawn. In most cases of course I want to test the
>> struts.xml as it is used in my webapp. But sometimes i might want to
>> test something else, a special error case or maybe a result type. For
>> these cases I might want to test with a variation of my struts.xml,
>> and therefore this might be useful:
>>
>> @RunWith(SpringJUnit4ClassRunner.class)
>> @ContextConfiguration(locations = {"your-application-context.xml"})
>> @StrutsContextConfiguration(locations = {"struts-test.xml"})
>> public class YourActionIntegrationTest extends
>> StrutsSpringJUnit4TestCase {
>>
>> not sure if my idea makes sense, but wanted to bring it to discussion.
>>
>> Cheers!
>> Christian
>>
>> >
>> > [1]
>> >
>> https://builds.apache.org/job/Struts2/334/org.apache.struts$struts2-junit-plugin/
>> > [2]
>> >
>> https://issues.apache.org/jira/browse/WW-3667?focusedCommentId=13079421&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13079421
>> > On 3 August 2011 20:16, Christian Grobmeier  wrote:
>> >
>> >> Hi,
>> >>
>> >> at the moment I found out to test without that class. Not really a
>> >> full test, but it works for my needs at the moment. Therefore I can
>> >> wait until you have pushed your code to google. Please ping this list
>> >> once it is done - guess some others ahve an interest in it too :-)
>> >>
>> >> Cheers
>> >> Christian
>> >>
>> >> On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres
>> >>  wrote:
>> >> > Hi,
>> >> >
>> >> > StrutsJUnit4TestCase is really tricky. I found few pointers in the
>> web.
>> >> > I'm currently using it successfully for my modest testing
>> >> > requirements, but you don't need to provide a web.xml file.
>> >> >
>> >> > When I say integration testing utility, I mean testing a full blown
>> >> > interceptor stack with your actions and interceptors. If you want to
>> >> > test either your actions or interceptors in isolation, you may not
>> >> > need this.
>> >> >
>> >> > Funny enough, I'm currently in the process of open sourcing our Struts
>> >> > 2 integration testing utility, which is based on StrutsJUnit4TestCase
>> >> > (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a
>> >> > few minutes, you may download it from google code.
>> >> >
>> >> > Regards,
>> >> > Gabriel
>> >> >
>> >> > 2011/8/3 Christian Grobmeier :
>> >> >> Hello all,
>> >> >>
>> >> >> today I tried to figure out how one can use StrutsJUnit4TestCase. I
>> am
>> >> >> currently puzzled. I found docs for the older implementation for
>> >> >> Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any
>> >> >> pointers?
>> >> >>
>> >> >> With the old stuff i simply did: this.executeAction() and all was
>> >> >> well. Now it seems I have to give the class a web.xml - how?
>> >> >>
>> >> >> Thanks in advance
>> >> >>
>> >> >> Christian
>> >> >>
>> >> >> -
>> >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> > -
>> >> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> > For additional commands, e-mail: user-h...@struts.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> http://www.grobmeier.de
>> >>
>> >> -
>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> For additional comman

Validators issue

2011-08-08 Thread Mano Pájaro
Hello list! I'm trying to use AJAX validators in my form, I have a component
in my JSP like:

where %{zones} is a list of objects Sge2Param, which detail attibute returns
the name of each object.
When I'm using Validators in all textfield fields, when it does the
validation return an "Invalid field value for field
"alumno.sge2ParamByZone"" message for my select component even when I'm not
validating it! I think that maybe has relation the fact that the select is
returning an object different than a string or another common type of
objects. Any help? Any suggestions? Thank you!
-- 
Manolo Pájaro Santander
Ingeniero de Sistemas VIII Semestre (Actual)
<>
CUSOL-UAC
Linux Registered User # 522026


Any Cross Site Scripting(XSS) Vulnerabilities with Tiles 2.0.6

2011-08-08 Thread srvanukuri

Hello,

We are using struts2 and tiles 2.0.6 and we want to verify and see if we
need to update the tiles version if there are any cross site scripting(xss)
or remotes code execution issues identified with tiles 2.0.6. Early response
is appreciated.



Thanks,
Sridhar

--
View this message in context: 
http://struts.1045723.n5.nabble.com/Any-Cross-Site-Scripting-XSS-Vulnerabilities-with-Tiles-2-0-6-tp4680158p4680158.html
Sent from the Struts - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Any Cross Site Scripting(XSS) Vulnerabilities with Tiles 2.0.6

2011-08-08 Thread Antonio Petrelli
2011/8/9 srvanukuri 

> We are using struts2 and tiles 2.0.6 and we want to verify and see if we
> need to update the tiles version if there are any cross site scripting(xss)
> or remotes code execution issues identified with tiles 2.0.6. Early
> response
> is appreciated.
>

Please ask the Tiles users mailing list:
http://tiles.apache.org/mail.html

Antonio