[jira] [Comment Edited] (WW-4930) SMI cannot be diasabled for action-packages found via the convention-plugin

2018-04-09 Thread Lukasz Lenart (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16428079#comment-16428079
 ] 

Lukasz Lenart edited comment on WW-4930 at 4/9/18 6:49 AM:
---

Just out of curiosity, why do you use a custom method instead of the default 
one? Are there more action methods in the action class?

And to resolve this issue I think we can introduce a global constant that will 
on/off the inheritance.


was (Author: lukaszlenart):
Just out of curiosity, why do you a custom method instead of the default one? 
Are there more action methods in the action class?

And to resolve this issue I think we can introduce a global constant that will 
on/off the inheritance.

> SMI cannot be diasabled for action-packages found via the convention-plugin
> ---
>
> Key: WW-4930
> URL: https://issues.apache.org/jira/browse/WW-4930
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Convention
>Affects Versions: 2.5.16
> Environment: Windows 10
> Java 1.8
>Reporter: Philipp Heidelbach
>Priority: Major
> Fix For: 2.6
>
>
> I'm trying to update Struts 2.3.34 to 2.5.16 and disabling SMI doesn't seem 
> to work.
> I debuged XmlConfigurationProvider but in the packageConfig of our package 
> (named default see below) SMI is correctly set to false. Debugging 
> PackageBaseActionConfigBuilder shows that our default-package is used as 
> parent package and in the parentPkg SMI is set to false. The pkgConfig 
> however is alwasy null (line: 1043) and so a new package config is created in 
> which SMI is set to true.
> Thus for all these actions methods i get the error that these methods aren't 
> allowed.
> If I use @AllowedMethod-annotations it works fine.
> Below the beginning of our struts.xml
> {code:xml}
> 
>  "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
> "http://struts.apache.org/dtds/struts-2.5.dtd;>
> 
> 
>  value="jar,zip,vfsfile,vfszip" />
>  value=".*/newd[-.\w]*\.jar(!/)?" />
>  value="org.apache.struts.*,org.apache.struts2.*,org.springframework.web.struts.*,org.springframework.web.struts2.*,org.hibernate.*"
>  />
> 
>  value="applicationResources" />
> 
> 
> 
> 
> 
> 
> 
> 
>  strict-method-invocation="false">
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (WW-4930) SMI cannot be diasabled for action-packages found via the convention-plugin

2018-04-09 Thread Lukasz Lenart (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16426855#comment-16426855
 ] 

Lukasz Lenart edited comment on WW-4930 at 4/9/18 6:48 AM:
---

This was done on purpose as far I remember. Can you share a code of the example 
action?


was (Author: lukaszlenart):
This we done on purpose as far I remember. Can you share a code of the example 
action?

> SMI cannot be diasabled for action-packages found via the convention-plugin
> ---
>
> Key: WW-4930
> URL: https://issues.apache.org/jira/browse/WW-4930
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Convention
>Affects Versions: 2.5.16
> Environment: Windows 10
> Java 1.8
>Reporter: Philipp Heidelbach
>Priority: Major
> Fix For: 2.6
>
>
> I'm trying to update Struts 2.3.34 to 2.5.16 and disabling SMI doesn't seem 
> to work.
> I debuged XmlConfigurationProvider but in the packageConfig of our package 
> (named default see below) SMI is correctly set to false. Debugging 
> PackageBaseActionConfigBuilder shows that our default-package is used as 
> parent package and in the parentPkg SMI is set to false. The pkgConfig 
> however is alwasy null (line: 1043) and so a new package config is created in 
> which SMI is set to true.
> Thus for all these actions methods i get the error that these methods aren't 
> allowed.
> If I use @AllowedMethod-annotations it works fine.
> Below the beginning of our struts.xml
> {code:xml}
> 
>  "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
> "http://struts.apache.org/dtds/struts-2.5.dtd;>
> 
> 
>  value="jar,zip,vfsfile,vfszip" />
>  value=".*/newd[-.\w]*\.jar(!/)?" />
>  value="org.apache.struts.*,org.apache.struts2.*,org.springframework.web.struts.*,org.springframework.web.struts2.*,org.hibernate.*"
>  />
> 
>  value="applicationResources" />
> 
> 
> 
> 
> 
> 
> 
> 
>  strict-method-invocation="false">
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (WW-4930) SMI cannot be diasabled for action-packages found via the convention-plugin

2018-04-06 Thread Philipp Heidelbach (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16428089#comment-16428089
 ] 

Philipp Heidelbach edited comment on WW-4930 at 4/6/18 11:14 AM:
-

Well this is just an example so no. In our real classes we often use custom 
ones in addition to the default ones but some classe are using only the default 
methods. This global constant would be great and thanks for your time and help.


was (Author: heidelbach):
Well this is just an example so no. In our real classes we often use custom 
ones in addition to the default ones but some classe are using only the default 
one. This global constant would be great and thanks for your time and help.

> SMI cannot be diasabled for action-packages found via the convention-plugin
> ---
>
> Key: WW-4930
> URL: https://issues.apache.org/jira/browse/WW-4930
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Convention
>Affects Versions: 2.5.16
> Environment: Windows 10
> Java 1.8
>Reporter: Philipp Heidelbach
>Priority: Major
> Fix For: 2.6
>
>
> I'm trying to update Struts 2.3.34 to 2.5.16 and disabling SMI doesn't seem 
> to work.
> I debuged XmlConfigurationProvider but in the packageConfig of our package 
> (named default see below) SMI is correctly set to false. Debugging 
> PackageBaseActionConfigBuilder shows that our default-package is used as 
> parent package and in the parentPkg SMI is set to false. The pkgConfig 
> however is alwasy null (line: 1043) and so a new package config is created in 
> which SMI is set to true.
> Thus for all these actions methods i get the error that these methods aren't 
> allowed.
> If I use @AllowedMethod-annotations it works fine.
> Below the beginning of our struts.xml
> {code:xml}
> 
>  "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
> "http://struts.apache.org/dtds/struts-2.5.dtd;>
> 
> 
>  value="jar,zip,vfsfile,vfszip" />
>  value=".*/newd[-.\w]*\.jar(!/)?" />
>  value="org.apache.struts.*,org.apache.struts2.*,org.springframework.web.struts.*,org.springframework.web.struts2.*,org.hibernate.*"
>  />
> 
>  value="applicationResources" />
> 
> 
> 
> 
> 
> 
> 
> 
>  strict-method-invocation="false">
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (WW-4930) SMI cannot be diasabled for action-packages found via the convention-plugin

2018-04-06 Thread Philipp Heidelbach (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16428089#comment-16428089
 ] 

Philipp Heidelbach edited comment on WW-4930 at 4/6/18 11:14 AM:
-

Well this is just an example so no. In our real classes we often use custom 
ones in addition to the default ones but some classe are using only the default 
methods.

This global constant would be great and thanks for your time and help.


was (Author: heidelbach):
Well this is just an example so no. In our real classes we often use custom 
ones in addition to the default ones but some classe are using only the default 
methods. This global constant would be great and thanks for your time and help.

> SMI cannot be diasabled for action-packages found via the convention-plugin
> ---
>
> Key: WW-4930
> URL: https://issues.apache.org/jira/browse/WW-4930
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Convention
>Affects Versions: 2.5.16
> Environment: Windows 10
> Java 1.8
>Reporter: Philipp Heidelbach
>Priority: Major
> Fix For: 2.6
>
>
> I'm trying to update Struts 2.3.34 to 2.5.16 and disabling SMI doesn't seem 
> to work.
> I debuged XmlConfigurationProvider but in the packageConfig of our package 
> (named default see below) SMI is correctly set to false. Debugging 
> PackageBaseActionConfigBuilder shows that our default-package is used as 
> parent package and in the parentPkg SMI is set to false. The pkgConfig 
> however is alwasy null (line: 1043) and so a new package config is created in 
> which SMI is set to true.
> Thus for all these actions methods i get the error that these methods aren't 
> allowed.
> If I use @AllowedMethod-annotations it works fine.
> Below the beginning of our struts.xml
> {code:xml}
> 
>  "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
> "http://struts.apache.org/dtds/struts-2.5.dtd;>
> 
> 
>  value="jar,zip,vfsfile,vfszip" />
>  value=".*/newd[-.\w]*\.jar(!/)?" />
>  value="org.apache.struts.*,org.apache.struts2.*,org.springframework.web.struts.*,org.springframework.web.struts2.*,org.hibernate.*"
>  />
> 
>  value="applicationResources" />
> 
> 
> 
> 
> 
> 
> 
> 
>  strict-method-invocation="false">
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (WW-4930) SMI cannot be diasabled for action-packages found via the convention-plugin

2018-04-05 Thread Philipp Heidelbach (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16426780#comment-16426780
 ] 

Philipp Heidelbach edited comment on WW-4930 at 4/5/18 12:17 PM:
-

We actually don't use @Action at all. I tired it and it didn't sovle the issue. 
So to guarantee that in the pkgConfig SMI is set to the SMI value of the parent 
package i change the line 1095  in the PackageBasedActionConfigBuilder
{code:java}
    pkgConfig = new 
PackageConfig.Builder(name).namespace(actionNamespace).addParent(parentPkg);
{code}
to

 

 
{code:java}
    pkgConfig = new 
PackageConfig.Builder(name).namespace(actionNamespace).addParent(parentPkg)
    
.strictMethodInvocation(parentPkg.isStrictMethodInvocation());
{code}
which seems to solve my issue.

 

My question is therefore: Is it intended that the created pkgConfig doesn't 
inherit the SMI value of it's parent or is it a bug?

 


was (Author: heidelbach):
We actual don't use @Action at all. I tired it and it didn't sovle the issue. 
So to guarantee that in the pkgConfig SMI is set to the SMI value of the parent 
package i change the line 1095  in the PackageBasedActionConfigBuilder
{code:java}
    pkgConfig = new 
PackageConfig.Builder(name).namespace(actionNamespace).addParent(parentPkg);
{code}
to

 

 
{code:java}
    pkgConfig = new 
PackageConfig.Builder(name).namespace(actionNamespace).addParent(parentPkg)
    
.strictMethodInvocation(parentPkg.isStrictMethodInvocation());
{code}
which seems to solve my issue.

 

My question is therefore: Is it intended that the created pkgConfig doesn't 
inherit the SMI value of it's parent or is it a bug?

 

> SMI cannot be diasabled for action-packages found via the convention-plugin
> ---
>
> Key: WW-4930
> URL: https://issues.apache.org/jira/browse/WW-4930
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Convention
>Affects Versions: 2.5.16
> Environment: Windows 10
> Java 1.8
>Reporter: Philipp Heidelbach
>Priority: Major
> Fix For: 2.6
>
>
> I'm trying to update Struts 2.3.34 to 2.5.16 and disabling SMI doesn't seem 
> to work.
> I debuged XmlConfigurationProvider but in the packageConfig of our package 
> (named default see below) SMI is correctly set to false. Debugging 
> PackageBaseActionConfigBuilder shows that our default-package is used as 
> parent package and in the parentPkg SMI is set to false. The pkgConfig 
> however is alwasy null (line: 1043) and so a new package config is created in 
> which SMI is set to true.
> Thus for all these actions methods i get the error that these methods aren't 
> allowed.
> If I use @AllowedMethod-annotations it works fine.
> Below the beginning of our struts.xml
> {code:xml}
> 
>  "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
> "http://struts.apache.org/dtds/struts-2.5.dtd;>
> 
> 
>  value="jar,zip,vfsfile,vfszip" />
>  value=".*/newd[-.\w]*\.jar(!/)?" />
>  value="org.apache.struts.*,org.apache.struts2.*,org.springframework.web.struts.*,org.springframework.web.struts2.*,org.hibernate.*"
>  />
> 
>  value="applicationResources" />
> 
> 
> 
> 
> 
> 
> 
> 
>  strict-method-invocation="false">
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)