You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by stanlick <st...@gmail.com> on 2009/02/10 18:10:42 UTC

2.1.6 mystery

I just upgraded a website from 2.1.2 to 2.1.6. and something must have
changed with respect to this style of action invocation because my site is
broken!


<div class="main-content">
<h1 class="pagetitle">About</h1>

<div class="column1-unit">
<p>
	<s:action var="cms" name="cms-topstories"/>
	<s:property value="#cms.content" escape="false"/>
</p>
</div>
<hr class="clear-contentunit" />

</div>


My wild card action mapping cms-* expects to get the action name (i.e.
cms-topstories) and now the following code is always returning the "top
level" action name repeatedly and NOT each respective action name as it was
before. IOW, the action name that resulted in this page being rendered!


getContext().getActionInvocation().getInvocationContext().getName()
-- 
View this message in context: http://www.nabble.com/2.1.6-mystery-tp21938203p21938203.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: 2.1.6 mystery

Posted by st...@gmail.com.
Thanks Musachy --

I really appreciate you pointing this out.  I will review the changes to see
if it would be cheaper to roll back to 2.1.2.  This sort of change that
breaks an application is troubling.

Peace,
Scott


On Tue, Feb 10, 2009 at 1:54 PM, Musachy Barroso <mu...@gmail.com> wrote:

> I would say that this change:
>
>
> http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java?r1=651946&r2=668602
>
> broke that for you(you were using something that was actually broken).
> You can grab the value in your action, and make it available to the
> JSP.
>
> musachy
>
> On Tue, Feb 10, 2009 at 2:49 PM,  <st...@gmail.com> wrote:
> > Hey brother --
> >
> > Actually, I believe the problem is with the action call itself
> >
> > <s:action var="cms" name="cms-topstories"/>
> >
> > When this action is invoked, my CmsAction identifies the appropriate
> action
> > name using
> >
> > getContext().getActionInvocation().getInvocationContext().getName();
> >
> > which is now ALWAYS returning the name that was associated with the
> initial
> > request e.g. cms-mainPage
> >
> >
> >
> >
> >
> > On Tue, Feb 10, 2009 at 1:42 PM, Musachy Barroso <mu...@gmail.com>
> wrote:
> >
> >> What does <s:property value="#cms" /> print?
> >>
> >> musachy
> >>
> >> On Tue, Feb 10, 2009 at 2:38 PM,  <st...@gmail.com> wrote:
> >> > Does anyone have a clue why
> >> >
> >> > <s:action var="cms" name="cms-topstories"/>
> >> >
> >> > is working differently between 2.1.2 and 2.1.6?  I have looked many
> >> places
> >> > and cannot see the usage pointed out anywhere.  Is
> >> > this<http://struts.apache.org/2.1.6/docs/version-notes-216.html>the
> >> > only hot sheet for differences?  I'd rather not roll back if it's only
> >> > a
> >> > subtle change.
> >> >
> >> > Peace,
> >> > Scott
> >> >
> >>
> >>
> >>
> >> --
> >> "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
> >>
> >>
> >
>
>
>
> --
> "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: 2.1.6 mystery

Posted by Musachy Barroso <mu...@gmail.com>.
I would say that this change:

http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java?r1=651946&r2=668602

broke that for you(you were using something that was actually broken).
You can grab the value in your action, and make it available to the
JSP.

musachy

On Tue, Feb 10, 2009 at 2:49 PM,  <st...@gmail.com> wrote:
> Hey brother --
>
> Actually, I believe the problem is with the action call itself
>
> <s:action var="cms" name="cms-topstories"/>
>
> When this action is invoked, my CmsAction identifies the appropriate action
> name using
>
> getContext().getActionInvocation().getInvocationContext().getName();
>
> which is now ALWAYS returning the name that was associated with the initial
> request e.g. cms-mainPage
>
>
>
>
>
> On Tue, Feb 10, 2009 at 1:42 PM, Musachy Barroso <mu...@gmail.com> wrote:
>
>> What does <s:property value="#cms" /> print?
>>
>> musachy
>>
>> On Tue, Feb 10, 2009 at 2:38 PM,  <st...@gmail.com> wrote:
>> > Does anyone have a clue why
>> >
>> > <s:action var="cms" name="cms-topstories"/>
>> >
>> > is working differently between 2.1.2 and 2.1.6?  I have looked many
>> places
>> > and cannot see the usage pointed out anywhere.  Is
>> > this<http://struts.apache.org/2.1.6/docs/version-notes-216.html>the
>> > only hot sheet for differences?  I'd rather not roll back if it's only
>> > a
>> > subtle change.
>> >
>> > Peace,
>> > Scott
>> >
>>
>>
>>
>> --
>> "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
>>
>>
>



-- 
"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: 2.1.6 mystery

Posted by st...@gmail.com.
Hey brother --

Actually, I believe the problem is with the action call itself

<s:action var="cms" name="cms-topstories"/>

When this action is invoked, my CmsAction identifies the appropriate action
name using

getContext().getActionInvocation().getInvocationContext().getName();

which is now ALWAYS returning the name that was associated with the initial
request e.g. cms-mainPage





On Tue, Feb 10, 2009 at 1:42 PM, Musachy Barroso <mu...@gmail.com> wrote:

> What does <s:property value="#cms" /> print?
>
> musachy
>
> On Tue, Feb 10, 2009 at 2:38 PM,  <st...@gmail.com> wrote:
> > Does anyone have a clue why
> >
> > <s:action var="cms" name="cms-topstories"/>
> >
> > is working differently between 2.1.2 and 2.1.6?  I have looked many
> places
> > and cannot see the usage pointed out anywhere.  Is
> > this<http://struts.apache.org/2.1.6/docs/version-notes-216.html>the
> > only hot sheet for differences?  I'd rather not roll back if it's only
> > a
> > subtle change.
> >
> > Peace,
> > Scott
> >
>
>
>
> --
> "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: 2.1.6 mystery

Posted by Musachy Barroso <mu...@gmail.com>.
What does <s:property value="#cms" /> print?

musachy

On Tue, Feb 10, 2009 at 2:38 PM,  <st...@gmail.com> wrote:
> Does anyone have a clue why
>
> <s:action var="cms" name="cms-topstories"/>
>
> is working differently between 2.1.2 and 2.1.6?  I have looked many places
> and cannot see the usage pointed out anywhere.  Is
> this<http://struts.apache.org/2.1.6/docs/version-notes-216.html>the
> only hot sheet for differences?  I'd rather not roll back if it's only
> a
> subtle change.
>
> Peace,
> Scott
>



-- 
"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: 2.1.6 mystery

Posted by st...@gmail.com.
Does anyone have a clue why

<s:action var="cms" name="cms-topstories"/>

is working differently between 2.1.2 and 2.1.6?  I have looked many places
and cannot see the usage pointed out anywhere.  Is
this<http://struts.apache.org/2.1.6/docs/version-notes-216.html>the
only hot sheet for differences?  I'd rather not roll back if it's only
a
subtle change.

Peace,
Scott