You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Greg Huber <gr...@gmail.com> on 2016/02/08 13:44:50 UTC

beta3 testing

I was dong some more testing and noticed that my message store interceptor
messages have stopped working.

There is a check in the
org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
response has been committed, and if it is skip the messages processing.

boolean isCommitted = ServletActionContext.getResponse().isCommitted();

LOG.debug("Response was already committed, cannot store messages!");

I do not think I am committing any struts stuff so was wondering if
anything has changed that would?

Cheers Greg

Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
I have retested this, and although it seems to work, it now messes with my
interceptors, ie they do not get called when I add the STORE to my action.

The RETRIEVE seems to be OK.

I have copied the objects from this patch
https://git-wip-us.apache.org/repos/asf?p=struts.git;h=857195c

com.opensymphony.xwork2.DefaultActionInvocation
org.apache.struts2.interceptor.MessageStoreInterceptor
org.apache.struts2.interceptor.MessageStorePreResultListener

to my source, were there any more changes?

This is my stack, where it does not call MyPrepareInterceptor :

<interceptor-stack name="MyStack">
  ....
  <interceptor-ref name="params" />
  <interceptor-ref name="conversionError" />

  <!-- It does not call this now and anything after it -->
  <interceptor-ref name="MyPrepareInterceptor">
    <param name="excludeMethods">cancel*</param>
  </interceptor-ref>
  ....

</interceptors>

<!-- Save messages -->
<interceptor-ref name="store">
  <param name="operationMode">STORE</param>
</interceptor-ref>

Any ideas?

Cheers Greg



On 11 February 2016 at 07:23, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-02-08 13:50 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
> > 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
> >> I was dong some more testing and noticed that my message store
> interceptor
> >> messages have stopped working.
> >>
> >> There is a check in the
> >> org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
> >> response has been committed, and if it is skip the messages processing.
> >>
> >> boolean isCommitted = ServletActionContext.getResponse().isCommitted();
> >>
> >> LOG.debug("Response was already committed, cannot store messages!");
> >>
> >> I do not think I am committing any struts stuff so was wondering if
> >> anything has changed that would?
> >
> > Yes, it's a side effect of this change [1] but I already refactored
> > the code [2] and now it works even with redirects - is it worth to
> > backport it to 2.3.25?
> >
> > [1] https://issues.apache.org/jira/browse/WW-4600
> > [2] https://issues.apache.org/jira/browse/WW-4605
>
> I have ported the same solution to 2.3.25, I hope it won't break anything
> :)
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
Ok thanks, never really understood the reasons why adding the default was
required as I always did it, so I now know!

Cheers Greg

On 9 March 2016 at 08:28, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-03-09 7:47 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
> >> When I say the default, I mean myStack
> >>
> >> <default-interceptor-ref name="myStack" /> otherwise
> >>
> >> the action I call does not work due to not having gone through any kind
> of
> >> stack, no parameters etc or my ActionPrepareInterceptor not being
> called.
> >>
> >> From the code below, if only store is used, it calls the interceptor and
> >> then invokeActionOnly(); on the class ie execute.
> >>
> >> if (interceptors.hasNext()) {
> >>                 final InterceptorMapping interceptor =
> interceptors.next();
> >>                 String interceptorMsg = "interceptor: " +
> >> interceptor.getName();
> >>                 UtilTimerStack.push(interceptorMsg);
> >>                 try {
> >>                     resultCode =
> >> interceptor.getInterceptor().intercept(DefaultActionInvocation.this);
> >>                 } finally {
> >>                     UtilTimerStack.pop(interceptorMsg);
> >>                 }
> >>             } else {
> >>                 resultCode = invokeActionOnly();
> >>             }
> >
> > Hm.... let me check that
>
> Yes, it's the correct behaviour because you defining an anonymous
> interceptors stack (by setting it up with just one interceptor) so
> there is no "merge" with <default-interceptor-ref/>,
> <default-interceptor-ref/> is used if there is no stack defined for an
> action.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
2016-03-09 7:47 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
>> When I say the default, I mean myStack
>>
>> <default-interceptor-ref name="myStack" /> otherwise
>>
>> the action I call does not work due to not having gone through any kind of
>> stack, no parameters etc or my ActionPrepareInterceptor not being called.
>>
>> From the code below, if only store is used, it calls the interceptor and
>> then invokeActionOnly(); on the class ie execute.
>>
>> if (interceptors.hasNext()) {
>>                 final InterceptorMapping interceptor = interceptors.next();
>>                 String interceptorMsg = "interceptor: " +
>> interceptor.getName();
>>                 UtilTimerStack.push(interceptorMsg);
>>                 try {
>>                     resultCode =
>> interceptor.getInterceptor().intercept(DefaultActionInvocation.this);
>>                 } finally {
>>                     UtilTimerStack.pop(interceptorMsg);
>>                 }
>>             } else {
>>                 resultCode = invokeActionOnly();
>>             }
>
> Hm.... let me check that

Yes, it's the correct behaviour because you defining an anonymous
interceptors stack (by setting it up with just one interceptor) so
there is no "merge" with <default-interceptor-ref/>,
<default-interceptor-ref/> is used if there is no stack defined for an
action.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
2016-03-07 9:43 GMT+01:00 Greg Huber <gr...@gmail.com>:
> I stripped out all the stuff that needed initialization from my action, and
> I can see the message works on the redirect.  So the fix it OK :-)

osm!

>
> ###
>
> When I say the default, I mean myStack
>
> <default-interceptor-ref name="myStack" /> otherwise
>
> the action I call does not work due to not having gone through any kind of
> stack, no parameters etc or my ActionPrepareInterceptor not being called.
>
> From the code below, if only store is used, it calls the interceptor and
> then invokeActionOnly(); on the class ie execute.
>
> if (interceptors.hasNext()) {
>                 final InterceptorMapping interceptor = interceptors.next();
>                 String interceptorMsg = "interceptor: " +
> interceptor.getName();
>                 UtilTimerStack.push(interceptorMsg);
>                 try {
>                     resultCode =
> interceptor.getInterceptor().intercept(DefaultActionInvocation.this);
>                 } finally {
>                     UtilTimerStack.pop(interceptorMsg);
>                 }
>             } else {
>                 resultCode = invokeActionOnly();
>             }

Hm.... let me check that


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
I stripped out all the stuff that needed initialization from my action, and
I can see the message works on the redirect.  So the fix it OK :-)

###

When I say the default, I mean myStack

<default-interceptor-ref name="myStack" /> otherwise

the action I call does not work due to not having gone through any kind of
stack, no parameters etc or my ActionPrepareInterceptor not being called.

>From the code below, if only store is used, it calls the interceptor and
then invokeActionOnly(); on the class ie execute.

if (interceptors.hasNext()) {
                final InterceptorMapping interceptor = interceptors.next();
                String interceptorMsg = "interceptor: " +
interceptor.getName();
                UtilTimerStack.push(interceptorMsg);
                try {
                    resultCode =
interceptor.getInterceptor().intercept(DefaultActionInvocation.this);
                } finally {
                    UtilTimerStack.pop(interceptorMsg);
                }
            } else {
                resultCode = invokeActionOnly();
            }




On 7 March 2016 at 07:47, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-03-06 15:36 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > I think we are OK on this, as I can see from the example that the default
> > stack is included.  So it would work like this.
> >
> > Initially I did not include the default which is why it was not working.
> > Although the docs are a bit vague on how the store should be used,
> > including the default is required.
> >
> >         <action name="HelloWorld1"
> > class="org.apache.struts.example.HelloWorld1">
> >             <interceptor-ref name="default"/>
> >             <interceptor-ref name="store">
> >                 <param name="operationMode">AUTOMATIC</param>
> >             </interceptor-ref>
> >
> >             <result type="redirectAction">HelloWorld2</result>
> >
> >         </action>
>
> Basically you just need to define "store" interceptor (with assumption
> that the session was already created elsewhere), you don't need to
> reference any other stack, there is no such requirement. In most cases
> you don't need all the interceptors defined in a stack, just two or
> three to handle what is needed for action. And in the same way "store"
> interceptor works. In "STORE" mode more things is required ie.
> Validation, Workflow, to perform validation and store messages in the
> session, that's why there is a reference to the "defaultStack" in the
> example. In "RETRIEVE" mode only session is needed (but it was already
> created in "STORE" step) and nothing else to fetch messages from the
> session and put them in scope, that's why only "store" interceptor is
> referenced in the "RETRIEVE" step.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
2016-03-06 15:36 GMT+01:00 Greg Huber <gr...@gmail.com>:
> I think we are OK on this, as I can see from the example that the default
> stack is included.  So it would work like this.
>
> Initially I did not include the default which is why it was not working.
> Although the docs are a bit vague on how the store should be used,
> including the default is required.
>
>         <action name="HelloWorld1"
> class="org.apache.struts.example.HelloWorld1">
>             <interceptor-ref name="default"/>
>             <interceptor-ref name="store">
>                 <param name="operationMode">AUTOMATIC</param>
>             </interceptor-ref>
>
>             <result type="redirectAction">HelloWorld2</result>
>
>         </action>

Basically you just need to define "store" interceptor (with assumption
that the session was already created elsewhere), you don't need to
reference any other stack, there is no such requirement. In most cases
you don't need all the interceptors defined in a stack, just two or
three to handle what is needed for action. And in the same way "store"
interceptor works. In "STORE" mode more things is required ie.
Validation, Workflow, to perform validation and store messages in the
session, that's why there is a reference to the "defaultStack" in the
example. In "RETRIEVE" mode only session is needed (but it was already
created in "STORE" step) and nothing else to fetch messages from the
session and put them in scope, that's why only "store" interceptor is
referenced in the "RETRIEVE" step.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
I think we are OK on this, as I can see from the example that the default
stack is included.  So it would work like this.

Initially I did not include the default which is why it was not working.
Although the docs are a bit vague on how the store should be used,
including the default is required.

        <action name="HelloWorld1"
class="org.apache.struts.example.HelloWorld1">
            <interceptor-ref name="default"/>
            <interceptor-ref name="store">
                <param name="operationMode">AUTOMATIC</param>
            </interceptor-ref>

            <result type="redirectAction">HelloWorld2</result>

        </action>

On 6 March 2016 at 12:23, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-03-06 12:48 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > In DefaultConfiguration.buildFullActionConfig(..) it checks for the
> > interceptors that were added and if it does not find any it adds the
> > getFullDefaultInterceptorRef() which in my case is myStack.
> >
> > I guess the question is whether adding the message store interceptor ever
> > included the default-interceptor-ref?  The code suggests that adding
> > myStack is now required (unless catered for elsewhere).
>
> Nope and it was that way from the very beginning, my refactoring
> didn't change that. I was debugging it early and using just
> MessageStoreInterceptor (with createSession interceptor) shows only
> those two interceptors in scope of the action.
>
> > List<InterceptorMapping> interceptors = new
> > ArrayList<>(baseConfig.getInterceptors());
> > if (interceptors.size() <= 0) {
> >    String defaultInterceptorRefName =
> > packageContext.getFullDefaultInterceptorRef();
> >    if (defaultInterceptorRefName != null) {
> >
> > interceptors.addAll(InterceptorBuilder.constructInterceptorReference(new
> > PackageConfig.Builder(packageContext), defaultInterceptorRefName,
> >                         new LinkedHashMap<String, String>(),
> > packageContext.getLocation(), objectFactory));
> >   }
> > }
>
> Yap, default-interceptor-ref will be used if no other stack was
> defined for an action.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
I am kind of getting a bit confused with this now, can we confirm we are
talking
 about the same thing.

>From the docs

https://struts.apache.org/docs/message-store-interceptor.html

It does suggest that you need to add the defaultStack

<action name="submitApplication" ...>
    <interceptor-ref name="store"/>
        <param name="operationMode">STORE</param>
    </interceptor-ref>
    <interceptor-ref name="defaultStack" />
    ....
</action>

(although the last example for the store does not include the default
stack.)

So you are saying that it should default to my

<default-interceptor-ref name="myStack" />

rather than the struts-default ?


If this is the case this is maybe where it seems to happen :

In  DefaultActionInvocation invoke()

if (interceptors.hasNext()) {
                final InterceptorMapping interceptor = interceptors.next();
                String interceptorMsg = "interceptor: " +
interceptor.getName();
                UtilTimerStack.push(interceptorMsg);
                try {
                    resultCode =
interceptor.getInterceptor().intercept(DefaultActionInvocation.this);
                } finally {
                    UtilTimerStack.pop(interceptorMsg);
                }
            } else {
                resultCode = invokeActionOnly();
            }


interceptor.getInterceptor().intercept(DefaultActionInvocation.this);


This is where it actually where seems it decides on what to call.

If there is ONLY the message store it calls struts-default, but if it has
the default myStack interceptors it calls myStack and it will call the
myPrepare?

Sorry if its not too clear????





On 6 March 2016 at 12:23, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-03-06 12:48 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > In DefaultConfiguration.buildFullActionConfig(..) it checks for the
> > interceptors that were added and if it does not find any it adds the
> > getFullDefaultInterceptorRef() which in my case is myStack.
> >
> > I guess the question is whether adding the message store interceptor ever
> > included the default-interceptor-ref?  The code suggests that adding
> > myStack is now required (unless catered for elsewhere).
>
> Nope and it was that way from the very beginning, my refactoring
> didn't change that. I was debugging it early and using just
> MessageStoreInterceptor (with createSession interceptor) shows only
> those two interceptors in scope of the action.
>
> > List<InterceptorMapping> interceptors = new
> > ArrayList<>(baseConfig.getInterceptors());
> > if (interceptors.size() <= 0) {
> >    String defaultInterceptorRefName =
> > packageContext.getFullDefaultInterceptorRef();
> >    if (defaultInterceptorRefName != null) {
> >
> > interceptors.addAll(InterceptorBuilder.constructInterceptorReference(new
> > PackageConfig.Builder(packageContext), defaultInterceptorRefName,
> >                         new LinkedHashMap<String, String>(),
> > packageContext.getLocation(), objectFactory));
> >   }
> > }
>
> Yap, default-interceptor-ref will be used if no other stack was
> defined for an action.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
2016-03-06 12:48 GMT+01:00 Greg Huber <gr...@gmail.com>:
> In DefaultConfiguration.buildFullActionConfig(..) it checks for the
> interceptors that were added and if it does not find any it adds the
> getFullDefaultInterceptorRef() which in my case is myStack.
>
> I guess the question is whether adding the message store interceptor ever
> included the default-interceptor-ref?  The code suggests that adding
> myStack is now required (unless catered for elsewhere).

Nope and it was that way from the very beginning, my refactoring
didn't change that. I was debugging it early and using just
MessageStoreInterceptor (with createSession interceptor) shows only
those two interceptors in scope of the action.

> List<InterceptorMapping> interceptors = new
> ArrayList<>(baseConfig.getInterceptors());
> if (interceptors.size() <= 0) {
>    String defaultInterceptorRefName =
> packageContext.getFullDefaultInterceptorRef();
>    if (defaultInterceptorRefName != null) {
>
> interceptors.addAll(InterceptorBuilder.constructInterceptorReference(new
> PackageConfig.Builder(packageContext), defaultInterceptorRefName,
>                         new LinkedHashMap<String, String>(),
> packageContext.getLocation(), objectFactory));
>   }
> }

Yap, default-interceptor-ref will be used if no other stack was
defined for an action.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
In DefaultConfiguration.buildFullActionConfig(..) it checks for the
interceptors that were added and if it does not find any it adds the
getFullDefaultInterceptorRef() which in my case is myStack.

I guess the question is whether adding the message store interceptor ever
included the default-interceptor-ref?  The code suggests that adding
myStack is now required (unless catered for elsewhere).

List<InterceptorMapping> interceptors = new
ArrayList<>(baseConfig.getInterceptors());
if (interceptors.size() <= 0) {
   String defaultInterceptorRefName =
packageContext.getFullDefaultInterceptorRef();
   if (defaultInterceptorRefName != null) {

interceptors.addAll(InterceptorBuilder.constructInterceptorReference(new
PackageConfig.Builder(packageContext), defaultInterceptorRefName,
                        new LinkedHashMap<String, String>(),
packageContext.getLocation(), objectFactory));
  }
}

On 6 March 2016 at 10:41, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-03-06 11:37 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > It definitely does not include/call myStack, as I can see it does not
> call
> > an initialise method I use.
> >
> > here is the action:
> >
> >         <action name="mySelect" method="submit"
> >                 class="mypackage.MySelect">
> >             <!-- Save context from redirect success action -->
> >             <interceptor-ref name="store">
> >                 <param name="operationMode">STORE</param>
> >             </interceptor-ref>
> >             <!-- <interceptor-ref name="myStack" /> -->
> >             <result name="success" type="redirectAction">
> >                 <param name="actionName">favourites</param>
> >                 <param name="pgn">${pageNum}</param>
> >                 <param name="searchString">${searchString}</param>
> >                 <param name="suppressEmptyParameters">true</param>
> >             </result>
> >             <result name="error" type="chain">favourites</result>
> >         </action>
>
> Are you sure that the session was created and it's available?
>
> What interceptors do you have in "myStack"? Maybe it's a side effect
> of changes in ActionInvocation and some other interceptor was
> depending on that.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
2016-03-06 11:50 GMT+01:00 Greg Huber <gr...@gmail.com>:
> Here is MyStack:
>
> <interceptor-stack name="MyStack">
>                 <interceptor-ref name="exception" />
>                 <interceptor-ref name="servletConfig" />
>                 <interceptor-ref name="chain" />
>                 <interceptor-ref name="fileUpload" />
>                 <interceptor-ref name="checkbox" />
>                 <interceptor-ref name="multiselect" />
>                 <interceptor-ref name="actionMappingParams" />
>                 <interceptor-ref name="params" />
>                 <interceptor-ref name="conversionError" />
>
>                 <!-- Custom Interceptors -->
>                 <interceptor-ref name="ActionPrepareInterceptor">
>                     <param name="excludeMethods">cancel*</param>
>                 </interceptor-ref>
>                 <interceptor-ref name="DMIAwareValidationInterceptor">
>                     <param name="excludeMethods">execute,cancel*</param>
>                 </interceptor-ref>
>
>                 <interceptor-ref name="workflow">
>                     <param name="excludeMethods">execute,cancel*</param>
>                 </interceptor-ref>
>
>             </interceptor-stack>
>
> It is the ActionPrepareInterceptor & DMIAwareValidationInterceptor that
> does not get called.

Can you share their code? You can send it directly to me if you want.
Or how to reproduce their behaviour?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
Here is MyStack:

<interceptor-stack name="MyStack">
                <interceptor-ref name="exception" />
                <interceptor-ref name="servletConfig" />
                <interceptor-ref name="chain" />
                <interceptor-ref name="fileUpload" />
                <interceptor-ref name="checkbox" />
                <interceptor-ref name="multiselect" />
                <interceptor-ref name="actionMappingParams" />
                <interceptor-ref name="params" />
                <interceptor-ref name="conversionError" />

                <!-- Custom Interceptors -->
                <interceptor-ref name="ActionPrepareInterceptor">
                    <param name="excludeMethods">cancel*</param>
                </interceptor-ref>
                <interceptor-ref name="DMIAwareValidationInterceptor">
                    <param name="excludeMethods">execute,cancel*</param>
                </interceptor-ref>

                <interceptor-ref name="workflow">
                    <param name="excludeMethods">execute,cancel*</param>
                </interceptor-ref>

            </interceptor-stack>

It is the ActionPrepareInterceptor & DMIAwareValidationInterceptor that
does not get called.

On 6 March 2016 at 10:41, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-03-06 11:37 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > It definitely does not include/call myStack, as I can see it does not
> call
> > an initialise method I use.
> >
> > here is the action:
> >
> >         <action name="mySelect" method="submit"
> >                 class="mypackage.MySelect">
> >             <!-- Save context from redirect success action -->
> >             <interceptor-ref name="store">
> >                 <param name="operationMode">STORE</param>
> >             </interceptor-ref>
> >             <!-- <interceptor-ref name="myStack" /> -->
> >             <result name="success" type="redirectAction">
> >                 <param name="actionName">favourites</param>
> >                 <param name="pgn">${pageNum}</param>
> >                 <param name="searchString">${searchString}</param>
> >                 <param name="suppressEmptyParameters">true</param>
> >             </result>
> >             <result name="error" type="chain">favourites</result>
> >         </action>
>
> Are you sure that the session was created and it's available?
>
> What interceptors do you have in "myStack"? Maybe it's a side effect
> of changes in ActionInvocation and some other interceptor was
> depending on that.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
2016-03-06 11:37 GMT+01:00 Greg Huber <gr...@gmail.com>:
> It definitely does not include/call myStack, as I can see it does not call
> an initialise method I use.
>
> here is the action:
>
>         <action name="mySelect" method="submit"
>                 class="mypackage.MySelect">
>             <!-- Save context from redirect success action -->
>             <interceptor-ref name="store">
>                 <param name="operationMode">STORE</param>
>             </interceptor-ref>
>             <!-- <interceptor-ref name="myStack" /> -->
>             <result name="success" type="redirectAction">
>                 <param name="actionName">favourites</param>
>                 <param name="pgn">${pageNum}</param>
>                 <param name="searchString">${searchString}</param>
>                 <param name="suppressEmptyParameters">true</param>
>             </result>
>             <result name="error" type="chain">favourites</result>
>         </action>

Are you sure that the session was created and it's available?

What interceptors do you have in "myStack"? Maybe it's a side effect
of changes in ActionInvocation and some other interceptor was
depending on that.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
It definitely does not include/call myStack, as I can see it does not call
an initialise method I use.

here is the action:

        <action name="mySelect" method="submit"
                class="mypackage.MySelect">
            <!-- Save context from redirect success action -->
            <interceptor-ref name="store">
                <param name="operationMode">STORE</param>
            </interceptor-ref>
            <!-- <interceptor-ref name="myStack" /> -->
            <result name="success" type="redirectAction">
                <param name="actionName">favourites</param>
                <param name="pgn">${pageNum}</param>
                <param name="searchString">${searchString}</param>
                <param name="suppressEmptyParameters">true</param>
            </result>
            <result name="error" type="chain">favourites</result>
        </action>

On 6 March 2016 at 10:21, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-03-06 11:06 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > ....Ahhhhh, sorry, here it is again,
> >
> > <package name="mypackage" namespace="/" extends="struts-default">
> >
> > <interceptor-stack name="myStack">
> > ..
> > </interceptor-stack>
> > ..
> > <default-interceptor-ref name="myStack" />
> > ..
> > <package>
> >
> > <package name="package-member" namespace="/myNamespace"
> extends="mypackage">
> > ....
> > <action..>
> > <interceptor-ref name="store">
> >    <param name="operationMode">STORE</param>
> > </interceptor-ref>
> > <interceptor-ref name="myStack" />
> > </action>
> > ....
> > <package>
>
> It's exactly the same configuration as in the example app and it works
> there properly. Just one remark: defining per action interceptors
> stack overrides per package defined stack but just for the action
>
> > I was looking to see where this gets built, which class does the
> building?
>
> Per action interceptors are loaded here
>
> https://github.com/apache/struts/blob/master/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java#L455
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
2016-03-06 11:06 GMT+01:00 Greg Huber <gr...@gmail.com>:
> ....Ahhhhh, sorry, here it is again,
>
> <package name="mypackage" namespace="/" extends="struts-default">
>
> <interceptor-stack name="myStack">
> ..
> </interceptor-stack>
> ..
> <default-interceptor-ref name="myStack" />
> ..
> <package>
>
> <package name="package-member" namespace="/myNamespace" extends="mypackage">
> ....
> <action..>
> <interceptor-ref name="store">
>    <param name="operationMode">STORE</param>
> </interceptor-ref>
> <interceptor-ref name="myStack" />
> </action>
> ....
> <package>

It's exactly the same configuration as in the example app and it works
there properly. Just one remark: defining per action interceptors
stack overrides per package defined stack but just for the action

> I was looking to see where this gets built, which class does the building?

Per action interceptors are loaded here
https://github.com/apache/struts/blob/master/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java#L455


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
....Ahhhhh, sorry, here it is again,

<package name="mypackage" namespace="/" extends="struts-default">

<interceptor-stack name="myStack">
..
</interceptor-stack>
..
<default-interceptor-ref name="myStack" />
..
<package>

<package name="package-member" namespace="/myNamespace" extends="mypackage">
....
<action..>
<interceptor-ref name="store">
   <param name="operationMode">STORE</param>
</interceptor-ref>
<interceptor-ref name="myStack" />
</action>
....
<package>

I was looking to see where this gets built, which class does the building?


On 6 March 2016 at 09:48, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-03-04 20:17 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > What it seems to be doing is executing the default stack and ignoring the
> > fact I have extended myStack in myPacakge below.
> >
> > layout:
> >
> > <package name="myStack" namespace="/" extends="struts-default">
> > ....
> > <package>
> >
> > <package name="mypackage" namespace="/myNamespace" extends="myStack">
> > ....
> > <action..>
> > <interceptor-ref name="store">
> >    <param name="operationMode">STORE</param>
> > </interceptor-ref>
> > <interceptor-ref name="myStack" />
>
> "myStack" isn't an Interceptors Stack name, it's a name of package
> which isn't the same
>
> > </action>
> > ..
> > <package>
>
> I have extended the Message Store example app and defined custom stack
> which creates session (it's need by MessageStoreInterceptor)
>
>
> https://github.com/apache/struts-examples/blob/master/message-store/src/main/resources/struts.xml#L14-L17
>
> and then I reference it in the next package
>
>
> https://github.com/apache/struts-examples/blob/master/message-store/src/main/resources/example.xml#L15-L18
>
> everything looks ok and works as expected. If you remove
> "createSession" interceptor from the "default" stack, no message will
> be transferred from one action to another - you won't see "Hello from
> HelloWorld1" message.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
Ah, sorry, here it is again,

<package name="mypackage" namespace="/" extends="struts-default">

<interceptor-stack name="myStack">
..
</interceptor-stack>
..
<default-interceptor-ref name="myStack" />
..
<package>

<package name="package-member" namespace="/myNamespace" extends="myStack">
....
<action..>
<interceptor-ref name="store">
   <param name="operationMode">STORE</param>
</interceptor-ref>
<interceptor-ref name="myStack" />
</action>
....
<package>

I was looking to see where this gets built, which class does the building?


On 6 March 2016 at 09:48, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-03-04 20:17 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > What it seems to be doing is executing the default stack and ignoring the
> > fact I have extended myStack in myPacakge below.
> >
> > layout:
> >
> > <package name="myStack" namespace="/" extends="struts-default">
> > ....
> > <package>
> >
> > <package name="mypackage" namespace="/myNamespace" extends="myStack">
> > ....
> > <action..>
> > <interceptor-ref name="store">
> >    <param name="operationMode">STORE</param>
> > </interceptor-ref>
> > <interceptor-ref name="myStack" />
>
> "myStack" isn't an Interceptors Stack name, it's a name of package
> which isn't the same
>
> > </action>
> > ..
> > <package>
>
> I have extended the Message Store example app and defined custom stack
> which creates session (it's need by MessageStoreInterceptor)
>
>
> https://github.com/apache/struts-examples/blob/master/message-store/src/main/resources/struts.xml#L14-L17
>
> and then I reference it in the next package
>
>
> https://github.com/apache/struts-examples/blob/master/message-store/src/main/resources/example.xml#L15-L18
>
> everything looks ok and works as expected. If you remove
> "createSession" interceptor from the "default" stack, no message will
> be transferred from one action to another - you won't see "Hello from
> HelloWorld1" message.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
2016-03-04 20:17 GMT+01:00 Greg Huber <gr...@gmail.com>:
> What it seems to be doing is executing the default stack and ignoring the
> fact I have extended myStack in myPacakge below.
>
> layout:
>
> <package name="myStack" namespace="/" extends="struts-default">
> ....
> <package>
>
> <package name="mypackage" namespace="/myNamespace" extends="myStack">
> ....
> <action..>
> <interceptor-ref name="store">
>    <param name="operationMode">STORE</param>
> </interceptor-ref>
> <interceptor-ref name="myStack" />

"myStack" isn't an Interceptors Stack name, it's a name of package
which isn't the same

> </action>
> ..
> <package>

I have extended the Message Store example app and defined custom stack
which creates session (it's need by MessageStoreInterceptor)

https://github.com/apache/struts-examples/blob/master/message-store/src/main/resources/struts.xml#L14-L17

and then I reference it in the next package

https://github.com/apache/struts-examples/blob/master/message-store/src/main/resources/example.xml#L15-L18

everything looks ok and works as expected. If you remove
"createSession" interceptor from the "default" stack, no message will
be transferred from one action to another - you won't see "Hello from
HelloWorld1" message.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
What it seems to be doing is executing the default stack and ignoring the
fact I have extended myStack in myPacakge below.

layout:

<package name="myStack" namespace="/" extends="struts-default">
....
<package>

<package name="mypackage" namespace="/myNamespace" extends="myStack">
....
<action..>
<interceptor-ref name="store">
   <param name="operationMode">STORE</param>
</interceptor-ref>
<interceptor-ref name="myStack" />
</action>
..
<package>



On 4 March 2016 at 17:22, Lukasz Lenart <lu...@apache.org> wrote:

> Ah.. looks like a regression, I thought it was something else, so I
> will try to figure out what's wrong.
>
> 2016-03-04 18:19 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > Seems to be OK now, don't think it was a problem as I have added the
> > default stack, which seems what you have to do now.
> >
> > Cheers Greg
> >
> > On 4 March 2016 at 16:59, Lukasz Lenart <lu...@apache.org> wrote:
> >
> >> I assume it isn't an issue anymore, right?
> >>
> >>
> >>
> https://issues.apache.org/jira/browse/WW-4605?focusedCommentId=15179528&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15179528
> >>
> >>
> >> Cheers
> >> --
> >> Łukasz
> >> + 48 606 323 122 http://www.lenart.org.pl/
> >>
> >> 2016-02-14 12:16 GMT+01:00 Greg Huber <gr...@gmail.com>:
> >> > .....I seem to now have to add myStack everywhere I use STORE messages
> >> for
> >> > it to work, which is different from the previous implementation.
> >> >
> >> > <interceptor-ref name="store">
> >> >   <param name="operationMode">STORE</param>
> >> > </interceptor-ref>
> >> > <interceptor-ref name="MyStack" />
> >> >
> >> > Cheers Greg
> >> >
> >> >
> >> > On 11 February 2016 at 07:23, Lukasz Lenart <lu...@apache.org>
> >> wrote:
> >> >
> >> >> 2016-02-08 13:50 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
> >> >> > 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
> >> >> >> I was dong some more testing and noticed that my message store
> >> >> interceptor
> >> >> >> messages have stopped working.
> >> >> >>
> >> >> >> There is a check in the
> >> >> >> org.apache.struts2.interceptor.MessageStoreInterceptor to see if
> the
> >> >> >> response has been committed, and if it is skip the messages
> >> processing.
> >> >> >>
> >> >> >> boolean isCommitted =
> >> ServletActionContext.getResponse().isCommitted();
> >> >> >>
> >> >> >> LOG.debug("Response was already committed, cannot store
> messages!");
> >> >> >>
> >> >> >> I do not think I am committing any struts stuff so was wondering
> if
> >> >> >> anything has changed that would?
> >> >> >
> >> >> > Yes, it's a side effect of this change [1] but I already refactored
> >> >> > the code [2] and now it works even with redirects - is it worth to
> >> >> > backport it to 2.3.25?
> >> >> >
> >> >> > [1] https://issues.apache.org/jira/browse/WW-4600
> >> >> > [2] https://issues.apache.org/jira/browse/WW-4605
> >> >>
> >> >> I have ported the same solution to 2.3.25, I hope it won't break
> >> anything
> >> >> :)
> >> >>
> >> >>
> >> >> Regards
> >> >> --
> >> >> Łukasz
> >> >> + 48 606 323 122 http://www.lenart.org.pl/
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> >> For additional commands, e-mail: dev-help@struts.apache.org
> >> >>
> >> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
I re-tested it and it seems to need the stack now.

On 4 March 2016 at 17:22, Lukasz Lenart <lu...@apache.org> wrote:

> Ah.. looks like a regression, I thought it was something else, so I
> will try to figure out what's wrong.
>
> 2016-03-04 18:19 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > Seems to be OK now, don't think it was a problem as I have added the
> > default stack, which seems what you have to do now.
> >
> > Cheers Greg
> >
> > On 4 March 2016 at 16:59, Lukasz Lenart <lu...@apache.org> wrote:
> >
> >> I assume it isn't an issue anymore, right?
> >>
> >>
> >>
> https://issues.apache.org/jira/browse/WW-4605?focusedCommentId=15179528&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15179528
> >>
> >>
> >> Cheers
> >> --
> >> Łukasz
> >> + 48 606 323 122 http://www.lenart.org.pl/
> >>
> >> 2016-02-14 12:16 GMT+01:00 Greg Huber <gr...@gmail.com>:
> >> > .....I seem to now have to add myStack everywhere I use STORE messages
> >> for
> >> > it to work, which is different from the previous implementation.
> >> >
> >> > <interceptor-ref name="store">
> >> >   <param name="operationMode">STORE</param>
> >> > </interceptor-ref>
> >> > <interceptor-ref name="MyStack" />
> >> >
> >> > Cheers Greg
> >> >
> >> >
> >> > On 11 February 2016 at 07:23, Lukasz Lenart <lu...@apache.org>
> >> wrote:
> >> >
> >> >> 2016-02-08 13:50 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
> >> >> > 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
> >> >> >> I was dong some more testing and noticed that my message store
> >> >> interceptor
> >> >> >> messages have stopped working.
> >> >> >>
> >> >> >> There is a check in the
> >> >> >> org.apache.struts2.interceptor.MessageStoreInterceptor to see if
> the
> >> >> >> response has been committed, and if it is skip the messages
> >> processing.
> >> >> >>
> >> >> >> boolean isCommitted =
> >> ServletActionContext.getResponse().isCommitted();
> >> >> >>
> >> >> >> LOG.debug("Response was already committed, cannot store
> messages!");
> >> >> >>
> >> >> >> I do not think I am committing any struts stuff so was wondering
> if
> >> >> >> anything has changed that would?
> >> >> >
> >> >> > Yes, it's a side effect of this change [1] but I already refactored
> >> >> > the code [2] and now it works even with redirects - is it worth to
> >> >> > backport it to 2.3.25?
> >> >> >
> >> >> > [1] https://issues.apache.org/jira/browse/WW-4600
> >> >> > [2] https://issues.apache.org/jira/browse/WW-4605
> >> >>
> >> >> I have ported the same solution to 2.3.25, I hope it won't break
> >> anything
> >> >> :)
> >> >>
> >> >>
> >> >> Regards
> >> >> --
> >> >> Łukasz
> >> >> + 48 606 323 122 http://www.lenart.org.pl/
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> >> For additional commands, e-mail: dev-help@struts.apache.org
> >> >>
> >> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
Ah.. looks like a regression, I thought it was something else, so I
will try to figure out what's wrong.

2016-03-04 18:19 GMT+01:00 Greg Huber <gr...@gmail.com>:
> Seems to be OK now, don't think it was a problem as I have added the
> default stack, which seems what you have to do now.
>
> Cheers Greg
>
> On 4 March 2016 at 16:59, Lukasz Lenart <lu...@apache.org> wrote:
>
>> I assume it isn't an issue anymore, right?
>>
>>
>> https://issues.apache.org/jira/browse/WW-4605?focusedCommentId=15179528&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15179528
>>
>>
>> Cheers
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> 2016-02-14 12:16 GMT+01:00 Greg Huber <gr...@gmail.com>:
>> > .....I seem to now have to add myStack everywhere I use STORE messages
>> for
>> > it to work, which is different from the previous implementation.
>> >
>> > <interceptor-ref name="store">
>> >   <param name="operationMode">STORE</param>
>> > </interceptor-ref>
>> > <interceptor-ref name="MyStack" />
>> >
>> > Cheers Greg
>> >
>> >
>> > On 11 February 2016 at 07:23, Lukasz Lenart <lu...@apache.org>
>> wrote:
>> >
>> >> 2016-02-08 13:50 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
>> >> > 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
>> >> >> I was dong some more testing and noticed that my message store
>> >> interceptor
>> >> >> messages have stopped working.
>> >> >>
>> >> >> There is a check in the
>> >> >> org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
>> >> >> response has been committed, and if it is skip the messages
>> processing.
>> >> >>
>> >> >> boolean isCommitted =
>> ServletActionContext.getResponse().isCommitted();
>> >> >>
>> >> >> LOG.debug("Response was already committed, cannot store messages!");
>> >> >>
>> >> >> I do not think I am committing any struts stuff so was wondering if
>> >> >> anything has changed that would?
>> >> >
>> >> > Yes, it's a side effect of this change [1] but I already refactored
>> >> > the code [2] and now it works even with redirects - is it worth to
>> >> > backport it to 2.3.25?
>> >> >
>> >> > [1] https://issues.apache.org/jira/browse/WW-4600
>> >> > [2] https://issues.apache.org/jira/browse/WW-4605
>> >>
>> >> I have ported the same solution to 2.3.25, I hope it won't break
>> anything
>> >> :)
>> >>
>> >>
>> >> Regards
>> >> --
>> >> Łukasz
>> >> + 48 606 323 122 http://www.lenart.org.pl/
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail: dev-help@struts.apache.org
>> >>
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>

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


Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
Seems to be OK now, don't think it was a problem as I have added the
default stack, which seems what you have to do now.

Cheers Greg

On 4 March 2016 at 16:59, Lukasz Lenart <lu...@apache.org> wrote:

> I assume it isn't an issue anymore, right?
>
>
> https://issues.apache.org/jira/browse/WW-4605?focusedCommentId=15179528&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15179528
>
>
> Cheers
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> 2016-02-14 12:16 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > .....I seem to now have to add myStack everywhere I use STORE messages
> for
> > it to work, which is different from the previous implementation.
> >
> > <interceptor-ref name="store">
> >   <param name="operationMode">STORE</param>
> > </interceptor-ref>
> > <interceptor-ref name="MyStack" />
> >
> > Cheers Greg
> >
> >
> > On 11 February 2016 at 07:23, Lukasz Lenart <lu...@apache.org>
> wrote:
> >
> >> 2016-02-08 13:50 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
> >> > 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
> >> >> I was dong some more testing and noticed that my message store
> >> interceptor
> >> >> messages have stopped working.
> >> >>
> >> >> There is a check in the
> >> >> org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
> >> >> response has been committed, and if it is skip the messages
> processing.
> >> >>
> >> >> boolean isCommitted =
> ServletActionContext.getResponse().isCommitted();
> >> >>
> >> >> LOG.debug("Response was already committed, cannot store messages!");
> >> >>
> >> >> I do not think I am committing any struts stuff so was wondering if
> >> >> anything has changed that would?
> >> >
> >> > Yes, it's a side effect of this change [1] but I already refactored
> >> > the code [2] and now it works even with redirects - is it worth to
> >> > backport it to 2.3.25?
> >> >
> >> > [1] https://issues.apache.org/jira/browse/WW-4600
> >> > [2] https://issues.apache.org/jira/browse/WW-4605
> >>
> >> I have ported the same solution to 2.3.25, I hope it won't break
> anything
> >> :)
> >>
> >>
> >> Regards
> >> --
> >> Łukasz
> >> + 48 606 323 122 http://www.lenart.org.pl/
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
I assume it isn't an issue anymore, right?

https://issues.apache.org/jira/browse/WW-4605?focusedCommentId=15179528&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15179528


Cheers
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2016-02-14 12:16 GMT+01:00 Greg Huber <gr...@gmail.com>:
> .....I seem to now have to add myStack everywhere I use STORE messages for
> it to work, which is different from the previous implementation.
>
> <interceptor-ref name="store">
>   <param name="operationMode">STORE</param>
> </interceptor-ref>
> <interceptor-ref name="MyStack" />
>
> Cheers Greg
>
>
> On 11 February 2016 at 07:23, Lukasz Lenart <lu...@apache.org> wrote:
>
>> 2016-02-08 13:50 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
>> > 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
>> >> I was dong some more testing and noticed that my message store
>> interceptor
>> >> messages have stopped working.
>> >>
>> >> There is a check in the
>> >> org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
>> >> response has been committed, and if it is skip the messages processing.
>> >>
>> >> boolean isCommitted = ServletActionContext.getResponse().isCommitted();
>> >>
>> >> LOG.debug("Response was already committed, cannot store messages!");
>> >>
>> >> I do not think I am committing any struts stuff so was wondering if
>> >> anything has changed that would?
>> >
>> > Yes, it's a side effect of this change [1] but I already refactored
>> > the code [2] and now it works even with redirects - is it worth to
>> > backport it to 2.3.25?
>> >
>> > [1] https://issues.apache.org/jira/browse/WW-4600
>> > [2] https://issues.apache.org/jira/browse/WW-4605
>>
>> I have ported the same solution to 2.3.25, I hope it won't break anything
>> :)
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>

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


Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
.....I seem to now have to add myStack everywhere I use STORE messages for
it to work, which is different from the previous implementation.

<interceptor-ref name="store">
  <param name="operationMode">STORE</param>
</interceptor-ref>
<interceptor-ref name="MyStack" />

Cheers Greg


On 11 February 2016 at 07:23, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-02-08 13:50 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
> > 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
> >> I was dong some more testing and noticed that my message store
> interceptor
> >> messages have stopped working.
> >>
> >> There is a check in the
> >> org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
> >> response has been committed, and if it is skip the messages processing.
> >>
> >> boolean isCommitted = ServletActionContext.getResponse().isCommitted();
> >>
> >> LOG.debug("Response was already committed, cannot store messages!");
> >>
> >> I do not think I am committing any struts stuff so was wondering if
> >> anything has changed that would?
> >
> > Yes, it's a side effect of this change [1] but I already refactored
> > the code [2] and now it works even with redirects - is it worth to
> > backport it to 2.3.25?
> >
> > [1] https://issues.apache.org/jira/browse/WW-4600
> > [2] https://issues.apache.org/jira/browse/WW-4605
>
> I have ported the same solution to 2.3.25, I hope it won't break anything
> :)
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
2016-02-08 13:50 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
> 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
>> I was dong some more testing and noticed that my message store interceptor
>> messages have stopped working.
>>
>> There is a check in the
>> org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
>> response has been committed, and if it is skip the messages processing.
>>
>> boolean isCommitted = ServletActionContext.getResponse().isCommitted();
>>
>> LOG.debug("Response was already committed, cannot store messages!");
>>
>> I do not think I am committing any struts stuff so was wondering if
>> anything has changed that would?
>
> Yes, it's a side effect of this change [1] but I already refactored
> the code [2] and now it works even with redirects - is it worth to
> backport it to 2.3.25?
>
> [1] https://issues.apache.org/jira/browse/WW-4600
> [2] https://issues.apache.org/jira/browse/WW-4605

I have ported the same solution to 2.3.25, I hope it won't break anything :)


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
Ok, tested it from the snapshot and its good!  Thanks.

On 8 February 2016 at 12:50, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > I was dong some more testing and noticed that my message store
> interceptor
> > messages have stopped working.
> >
> > There is a check in the
> > org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
> > response has been committed, and if it is skip the messages processing.
> >
> > boolean isCommitted = ServletActionContext.getResponse().isCommitted();
> >
> > LOG.debug("Response was already committed, cannot store messages!");
> >
> > I do not think I am committing any struts stuff so was wondering if
> > anything has changed that would?
>
> Yes, it's a side effect of this change [1] but I already refactored
> the code [2] and now it works even with redirects - is it worth to
> backport it to 2.3.25?
>
> [1] https://issues.apache.org/jira/browse/WW-4600
> [2] https://issues.apache.org/jira/browse/WW-4605
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
I was doing a redirect, so if you say its working I can wait until the next
beta to test it.

Cheers Greg

On 8 February 2016 at 12:50, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > I was dong some more testing and noticed that my message store
> interceptor
> > messages have stopped working.
> >
> > There is a check in the
> > org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
> > response has been committed, and if it is skip the messages processing.
> >
> > boolean isCommitted = ServletActionContext.getResponse().isCommitted();
> >
> > LOG.debug("Response was already committed, cannot store messages!");
> >
> > I do not think I am committing any struts stuff so was wondering if
> > anything has changed that would?
>
> Yes, it's a side effect of this change [1] but I already refactored
> the code [2] and now it works even with redirects - is it worth to
> backport it to 2.3.25?
>
> [1] https://issues.apache.org/jira/browse/WW-4600
> [2] https://issues.apache.org/jira/browse/WW-4605
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Greg Huber <gr...@gmail.com>.
Ok thanks, I will have a look.

Cheers Greg

On 8 February 2016 at 12:50, Lukasz Lenart <lu...@apache.org> wrote:

> 2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
> > I was dong some more testing and noticed that my message store
> interceptor
> > messages have stopped working.
> >
> > There is a check in the
> > org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
> > response has been committed, and if it is skip the messages processing.
> >
> > boolean isCommitted = ServletActionContext.getResponse().isCommitted();
> >
> > LOG.debug("Response was already committed, cannot store messages!");
> >
> > I do not think I am committing any struts stuff so was wondering if
> > anything has changed that would?
>
> Yes, it's a side effect of this change [1] but I already refactored
> the code [2] and now it works even with redirects - is it worth to
> backport it to 2.3.25?
>
> [1] https://issues.apache.org/jira/browse/WW-4600
> [2] https://issues.apache.org/jira/browse/WW-4605
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: beta3 testing

Posted by Lukasz Lenart <lu...@apache.org>.
2016-02-08 13:44 GMT+01:00 Greg Huber <gr...@gmail.com>:
> I was dong some more testing and noticed that my message store interceptor
> messages have stopped working.
>
> There is a check in the
> org.apache.struts2.interceptor.MessageStoreInterceptor to see if the
> response has been committed, and if it is skip the messages processing.
>
> boolean isCommitted = ServletActionContext.getResponse().isCommitted();
>
> LOG.debug("Response was already committed, cannot store messages!");
>
> I do not think I am committing any struts stuff so was wondering if
> anything has changed that would?

Yes, it's a side effect of this change [1] but I already refactored
the code [2] and now it works even with redirects - is it worth to
backport it to 2.3.25?

[1] https://issues.apache.org/jira/browse/WW-4600
[2] https://issues.apache.org/jira/browse/WW-4605


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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