You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pro1712 <Pr...@yahoo.de> on 2009/06/23 15:34:04 UTC

Update to Struts 2.1.7

Hello!

I try to update from Struts 2.1.6 to 2.1.7.

I've got simple actions like this:
<action name="Test1Action" class="com.test.test1">
    <result name="*">/pages/Test1.jsp</result>
</action>

In Struts 2.1.6 'input' was called when invoking the action.
In Struts 2.1.7 'execute' is called.

Why is ecexute called now?
What is the default action that is called? How can I change it?

Thanks for your help!
-- 
View this message in context: http://www.nabble.com/Update-to-Struts-2.1.7-tp24166101p24166101.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Update to Struts 2.1.7

Posted by Wes Wannemacher <we...@wantii.com>.
On Wed, Jun 24, 2009 at 4:53 AM, Pro1712<Pr...@yahoo.de> wrote:
>
> But that's not my problem!
> What I forgot to mention in my first post is that I use dynamic method
> invocation and pass the param e.g. "method:input" to the action.
> Sorry for this...

No problem, but I was wondering how you knew which method you were calling.

>
> struts.enable.DynamicMethodInvocation = false
> is set in struts.properties but worked for me in Struts 2.1.6.
> In 2.1.7 DefaultActionMapper was changed and a check for
> "allowDynamicMethodCalls" was added in line 187.
> So as a result the behavour changed and the method "input" was not mapped
> and so the default method "execute" is called
>
> setting
> struts.enable.DynamicMethodInvocation = true
> solves the problem.
>
> Is there a reason that this was changed? Or was this a bug in 2.1.6?

Yeah, sort of. We had created a setting a while back,
struts.enable.DynamicMethodInvocation to turn off the various ways of
invoking methods by name in the URL. It is a setting because some
people want it, other people view it as a security concern. To leave
it as a matter of preference, we created the setting. By default we
leave it turned off, but even with it turned off, the
DefaultActionMapper wasn't honoring the setting. I was in there to fix
another bug (making it understand redirectAction instead of
redirect-action) and fixed it up to honor the setting. It is in the
release notes for 2.1.7, in the section called - "Backward
compatibility issues with prior development release"

-Wes

-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

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


Re: Update to Struts 2.1.7

Posted by Pro1712 <Pr...@yahoo.de>.
You are right!
'name="*"' is not necessary but it also does not cause any problems...
I will remove it!


But that's not my problem!
What I forgot to mention in my first post is that I use dynamic method
invocation and pass the param e.g. "method:input" to the action.
Sorry for this...

struts.enable.DynamicMethodInvocation = false
is set in struts.properties but worked for me in Struts 2.1.6.
In 2.1.7 DefaultActionMapper was changed and a check for
"allowDynamicMethodCalls" was added in line 187.
So as a result the behavour changed and the method "input" was not mapped
and so the default method "execute" is called

setting
struts.enable.DynamicMethodInvocation = true
solves the problem.

Is there a reason that this was changed? Or was this a bug in 2.1.6?

-- 
View this message in context: http://www.nabble.com/Update-to-Struts-2.1.7-tp24166101p24180951.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Update to Struts 2.1.7

Posted by Wes Wannemacher <we...@wantii.com>.
Yea, it works for actions, but it doesn't seem to make sense for result names.

-W

On Tue, Jun 23, 2009 at 11:41 AM, Martin Gainty<mg...@hotmail.com> wrote:
>
> possible he is alluding to wildcard mapping?
>
> The "*" in the path attribute allows the mapping to match the request URIs /editSubscription, editRegistration<!-- Generic edit* mapping -->
> <action
>    name="/edit*"
>    class="org.apache.struts.webapp.example.Edit{1}Action">
>    <result
>        name="failure"
>        path="/mainMenu.jsp"/>
>    <result
>        path="/\{1\}.jsp"/>
> </action>
>
> http://struts.apache.org/2.0.6/docs/wildcard-mappings.html
>
> a definite maybe?
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>
>
>
>
>> Date: Tue, 23 Jun 2009 07:52:46 -0700
>> Subject: Re: Update to Struts 2.1.7
>> From: musachy@gmail.com
>> To: user@struts.apache.org
>>
>> If you can use "*" in a result, that's news for me.
>>
>> musachy
>>
>> On Tue, Jun 23, 2009 at 7:28 AM, Pro1712<Pr...@yahoo.de> wrote:
>> >
>> > Thanks for your quick answer!
>> >
>> > There is no test1-validation.xml.
>> > test1 does not have a "validate" method ".
>> >
>> > I have implemented the "execute" method to see if it is called because
>> > "input" does not get called any more...
>> > I also implemented "validateExecute" method for testing. And it get's called
>> > also.
>> >
>> > --
>> > View this message in context: http://www.nabble.com/Update-to-Struts-2.1.7-tp24166101p24167035.html
>> > Sent from the Struts - User mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > 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
>>
>
> _________________________________________________________________
> Bing™  brings you maps, menus, and reviews organized in one place.   Try it now.
> http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TEXT_MLOGEN_Core_tagline_local_1x1



-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

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


RE: Update to Struts 2.1.7

Posted by Martin Gainty <mg...@hotmail.com>.
possible he is alluding to wildcard mapping?

The "*" in the path attribute allows the mapping to match the request URIs /editSubscription, editRegistration<!-- Generic edit* mapping -->
<action
    name="/edit*"
    class="org.apache.struts.webapp.example.Edit{1}Action">
    <result
        name="failure"
        path="/mainMenu.jsp"/>
    <result
        path="/\{1\}.jsp"/>
</action>

http://struts.apache.org/2.0.6/docs/wildcard-mappings.html

a definite maybe?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Tue, 23 Jun 2009 07:52:46 -0700
> Subject: Re: Update to Struts 2.1.7
> From: musachy@gmail.com
> To: user@struts.apache.org
> 
> If you can use "*" in a result, that's news for me.
> 
> musachy
> 
> On Tue, Jun 23, 2009 at 7:28 AM, Pro1712<Pr...@yahoo.de> wrote:
> >
> > Thanks for your quick answer!
> >
> > There is no test1-validation.xml.
> > test1 does not have a "validate" method ".
> >
> > I have implemented the "execute" method to see if it is called because
> > "input" does not get called any more...
> > I also implemented "validateExecute" method for testing. And it get's called
> > also.
> >
> > --
> > View this message in context: http://www.nabble.com/Update-to-Struts-2.1.7-tp24166101p24167035.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > 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
> 

_________________________________________________________________
Bing™  brings you maps, menus, and reviews organized in one place.   Try it now.
http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TEXT_MLOGEN_Core_tagline_local_1x1

Re: Update to Struts 2.1.7

Posted by Musachy Barroso <mu...@gmail.com>.
If you can use "*" in a result, that's news for me.

musachy

On Tue, Jun 23, 2009 at 7:28 AM, Pro1712<Pr...@yahoo.de> wrote:
>
> Thanks for your quick answer!
>
> There is no test1-validation.xml.
> test1 does not have a "validate" method ".
>
> I have implemented the "execute" method to see if it is called because
> "input" does not get called any more...
> I also implemented "validateExecute" method for testing. And it get's called
> also.
>
> --
> View this message in context: http://www.nabble.com/Update-to-Struts-2.1.7-tp24166101p24167035.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: Update to Struts 2.1.7

Posted by Pro1712 <Pr...@yahoo.de>.
Thanks for your quick answer!

There is no test1-validation.xml.
test1 does not have a "validate" method ".

I have implemented the "execute" method to see if it is called because
"input" does not get called any more...
I also implemented "validateExecute" method for testing. And it get's called
also.

-- 
View this message in context: http://www.nabble.com/Update-to-Struts-2.1.7-tp24166101p24167035.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Update to Struts 2.1.7

Posted by Wes Wannemacher <we...@wantii.com>.
Struts 2.1.7 is not officially released yet, it is being staged and voted on...

And, I am not sure if your configuration makes sense, I have never
mapped the * result before. Do you have a test1-validation.xml file
alongside the class file? Does test1 have a 'validate' method? Also,
how do you know which method is called? I'm assuming all results
render the same page...

-Wes

On Tue, Jun 23, 2009 at 9:34 AM, Pro1712<Pr...@yahoo.de> wrote:
>
> Hello!
>
> I try to update from Struts 2.1.6 to 2.1.7.
>
> I've got simple actions like this:
> <action name="Test1Action" class="com.test.test1">
>    <result name="*">/pages/Test1.jsp</result>
> </action>
>
> In Struts 2.1.6 'input' was called when invoking the action.
> In Struts 2.1.7 'execute' is called.
>
> Why is ecexute called now?
> What is the default action that is called? How can I change it?
>
> Thanks for your help!
> --
> View this message in context: http://www.nabble.com/Update-to-Struts-2.1.7-tp24166101p24166101.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

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


Re: Update to Struts 2.1.7

Posted by Pro1712 <Pr...@yahoo.de>.
I've got a method "input" in the action.

settint "struts.enable.DynamicMethodInvocation = true" solevd the problem.
-- 
View this message in context: http://www.nabble.com/Update-to-Struts-2.1.7-tp24166101p24250172.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Update to Struts 2.1.7

Posted by mu...@aol.com.
 Are you saying you have a method called input() in the action or is it that you are
getting a result code "input" which would imply a validation error?


 


 

-----Original Message-----
From: Pro1712 <Pr...@yahoo.de>
To: user@struts.apache.org
Sent: Tue, Jun 23, 2009 9:34 am
Subject: Update to Struts 2.1.7











Hello!

I try to update from Struts 2.1.6 to 2.1.7.

I've got simple actions like this:
<action name="Test1Action" class="com.test.test1">
    <result name="*">/pages/Test1.jsp</result>
</action>

In Struts 2.1.6 'input' was called when invoking the action.
In Struts 2.1.7 'execute' is called.

Why is ecexute called now?
What is the default action that is called? How can I change it?

Thanks for your help!
-- 
View this message in context: http://www.nabble.com/Update-to-Struts-2.1.7-tp24166101p24166101.html
Sent from the Struts - User mailing list archive at Nabble.com.


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