[jira] [Commented] (WW-3710) com.opensymphony.xwork2.util.ClassPathFinder.getURLClassLoader() return null in jboss-as-web-7.0.2.Final

2016-01-04 Thread victorsosa (JIRA)

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

victorsosa commented on WW-3710:


I just tested this in 2.3.24.1 and unit test the actual code; It is working as 
expected please verify that you file are in the Classpath.

This is not an issue.

> com.opensymphony.xwork2.util.ClassPathFinder.getURLClassLoader() return null 
> in jboss-as-web-7.0.2.Final
> 
>
> Key: WW-3710
> URL: https://issues.apache.org/jira/browse/WW-3710
> Project: Struts 2
>  Issue Type: Bug
>  Components: XML Configuration
>Affects Versions: 2.2.3.1
> Environment: windows7 jdk_1.6.0_29
>Reporter: zhouyanming
>Priority: Critical
> Fix For: 3.0
>
> Attachments: trace.log
>
>
> if struts.xml has wildcard include like  file="resources/struts/struts-*.xml" />
> then webapp cannot started in jboss7



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4506) Upgrade spring version for spring plugin to spring version 4.x

2016-01-04 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4506:


This is already DONE in the code

> Upgrade spring version for spring plugin to spring version 4.x
> --
>
> Key: WW-4506
> URL: https://issues.apache.org/jira/browse/WW-4506
> Project: Struts 2
>  Issue Type: New Feature
>  Components: Plugin - Spring
>Reporter: Johannes Geppert
>Assignee: Johannes Geppert
>
> Upgrade spring version for spring plugin to spring version 4.x



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4564) Postback result is rendered as plain-text rather than html form in Chrome

2016-01-02 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4564:


committed PR #62

> Postback result is rendered as plain-text rather than html form in Chrome
> -
>
> Key: WW-4564
> URL: https://issues.apache.org/jira/browse/WW-4564
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24
> Environment: Chrome
>Reporter: Chris Cranford
>Priority: Critical
> Fix For: 2.3.25
>
>
> When using the Result Type postback, Chrome does not automatically interpret 
> the returned form as text/html and therefore does not perform the postback 
> operation.
> In my tests, the response's content type must be set to {{text/html}} in 
> order for Chrome to properly handle the operation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4546) unclosed instantiation of PrintWriter

2016-01-02 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4546:


Normally you should not close the stream. The servlet container will 
automatically close the stream after the servlet is finished running as part of 
the servlet request life-cycle. 

So none fix it is needed

> unclosed instantiation of PrintWriter 
> --
>
> Key: WW-4546
> URL: https://issues.apache.org/jira/browse/WW-4546
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24
>Reporter: songwanging
>Priority: Minor
> Fix For: 2.5
>
>
> In method execute() of class XSLTResult.java 
> (src\core\src\main\java\org\apache\struts2\views\xslt\XSLTResult.java).
> The instantiation of PrintWriter should be closed after all writing is done.
> {code:java}
>   public void execute(ActionInvocation invocation) throws Exception {
>   …
>   PrintWriter writer = response.getWriter();
> ...
>  writer.flush(); // ...and flush...
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4546) unclosed instantiation of PrintWriter

2016-01-02 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4546 at 1/2/16 5:22 PM:


Normally you should not close the stream. The servlet container will 
automatically close the stream after the servlet is finished running as part of 
the servlet request life-cycle. 

So none fix is needed


was (Author: victorsosa):
Normally you should not close the stream. The servlet container will 
automatically close the stream after the servlet is finished running as part of 
the servlet request life-cycle. 

So none fix it is needed

> unclosed instantiation of PrintWriter 
> --
>
> Key: WW-4546
> URL: https://issues.apache.org/jira/browse/WW-4546
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24
>Reporter: songwanging
>Priority: Minor
> Fix For: 2.5
>
>
> In method execute() of class XSLTResult.java 
> (src\core\src\main\java\org\apache\struts2\views\xslt\XSLTResult.java).
> The instantiation of PrintWriter should be closed after all writing is done.
> {code:java}
>   public void execute(ActionInvocation invocation) throws Exception {
>   …
>   PrintWriter writer = response.getWriter();
> ...
>  writer.flush(); // ...and flush...
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4525) s:select with an inside iterator through option group

2016-01-02 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4525:


Base on stackoverflow you are missing a second iterator; also there is a Map 
involve instead of a List.

> s:select with an inside iterator through option group
> -
>
> Key: WW-4525
> URL: https://issues.apache.org/jira/browse/WW-4525
> Project: Struts 2
>  Issue Type: Bug
>Reporter: Alireza Fattahi
> Fix For: 2.3.x
>
>
> Please look at below code:
> {code:title=Bar.jsp|borderStyle=solid}
>  list="destinationKnownAccounts" listKey="accountNo"
> listValue="%{ farsiFirstName + \" \" + farsiLastName }" >
> 
>   
>   
> ${accountNo}  
>
>
>  
> {code}
> The optiongroup will be displayed outside select as
> {code:title=Bar.jsp|borderStyle=solid}  
>   01946005  
>   
>   0333783051000 
>  
>   
>   015087000 
>  
>   
>  
>
> 01946005 محمد رادان
> 0333783051000 حامد پیروزفر
> 015087000 سارا حاتمی
> 
> {code}
> I tried other ways, even copy a static option group but same result, only 
> s:optgroup workes fine and generates the option group inside option



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4582) adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

2016-01-05 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa updated WW-4582:
---
Description: 
Hi, 

This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

This is base on the information in the S2-020

This close also the CVE-2014-0112, 


  was:
Hi, 

This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

This is base on the information in the S2-020



> adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader 
> manipulation)
> 
>
> Key: WW-4582
> URL: https://issues.apache.org/jira/browse/WW-4582
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: victorsosa
>Priority: Critical
>  Labels: security
> Fix For: 2.3.25, 2.5
>
>
> Hi, 
> This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
> to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)
> This is base on the information in the S2-020
> This close also the CVE-2014-0112, 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4582) adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

2016-01-05 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa updated WW-4582:
---
Description: 
Hi, 

This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

This is base on the information in the S2-020

This close also the CVE-2014-0112, CVE-2014-0113 and CVE-2014-0116


  was:
Hi, 

This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

This is base on the information in the S2-020

This close also the CVE-2014-0112, 



> adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader 
> manipulation)
> 
>
> Key: WW-4582
> URL: https://issues.apache.org/jira/browse/WW-4582
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: victorsosa
>Priority: Critical
>  Labels: security
> Fix For: 2.3.25, 2.5
>
>
> Hi, 
> This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
> to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)
> This is base on the information in the S2-020
> This close also the CVE-2014-0112, CVE-2014-0113 and CVE-2014-0116



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-3945) Set default encoding for JSONResult to UTF-8

2016-01-04 Thread victorsosa (JIRA)

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

victorsosa commented on WW-3945:


check PR# 66

> Set default encoding for JSONResult to UTF-8
> 
>
> Key: WW-3945
> URL: https://issues.apache.org/jira/browse/WW-3945
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.7
>Reporter: Lukasz Lenart
>Priority: Minor
> Fix For: 3.0
>
>
> Check WW-3863 for more details, but encoding param must be set to UTF-8 by 
> default



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-2157) Update Struts1 plugin to support using Struts 1 tag libraries in JSP pages

2016-01-07 Thread victorsosa (JIRA)

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

victorsosa commented on WW-2157:


Struts1 plugin is deprecated for struts 2.5, we can close this.

> Update Struts1 plugin to support using Struts 1 tag libraries in JSP pages
> --
>
> Key: WW-2157
> URL: https://issues.apache.org/jira/browse/WW-2157
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - Mechanism
>Reporter: James Holmes
> Fix For: Future
>
>
> Currently the Struts1 plugin only provides the ability to run Struts 1 
> actions in a Struts 2 application. It would be much easier for existing 
> applications to migrate to Struts 2 if they did not have to convert all of 
> their JSPs to use the Struts 2 tag library tags instead of Struts 1 tag 
> library tags.
> The main issue is that the Struts 1 tags are expecting some of the Struts 1 
> infrastructure to be in place - mainly the ModuleConfig info I believe.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (WW-4582) adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

2016-01-07 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa resolved WW-4582.

Resolution: Fixed

> adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader 
> manipulation)
> 
>
> Key: WW-4582
> URL: https://issues.apache.org/jira/browse/WW-4582
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: victorsosa
>Priority: Critical
>  Labels: security
> Fix For: 2.3.25, 2.5
>
>
> Hi, 
> This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
> to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)
> This is base on the information in the S2-020
> This close also the CVE-2014-0112, CVE-2014-0113 and CVE-2014-0116



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-3262) improve wildcard to support regular expressions

2016-01-07 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-3262 at 1/7/16 5:27 PM:


Base on the JSR-339

Template parameters can optionally specify the regular expression used to match 
their values.  The default value matches any text and terminates at the end of 
a path segment but other values can be used to alter this behavior, e.g.:

@Path("widgets/{path:.+}")

public class Widget {

...

}

In the above example the Widgetresource class will be matched for any request 
whose path starts with widgets and contains at least one more path segment; the 
value of the path parameter will be the request path following widgets.   E.g.  
 given the request path widgets/small/a the value of path would be small/a.


Shouldn't this be implemented as part of the REST plugin???




was (Author: victorsosa):
Base on the JSR-339

Template parameters can optionally specify the regular expression used to match 
their values.  The default value matches any text and terminates at the end of 
a path segment but other values can be used to alter this behavior, e.g.:

@Path("widgets/{path:.+}")

public class Widget {

...

}

In the above example the Widgetresource class will be matched for any request 
whose path starts with
widgets and contains at least one more path segment; the value of the path 
parameter will be the request
path following widgets.   E.g.   given the request path widgets/small/a the 
value of path would be small/a.


Shouldn't this be implemented as part of the REST plugin???



> improve wildcard to support regular expressions
> ---
>
> Key: WW-3262
> URL: https://issues.apache.org/jira/browse/WW-3262
> Project: Struts 2
>  Issue Type: Improvement
>Affects Versions: 2.1.8
>Reporter: musachy
> Fix For: 3.0
>
>
> The regular expressions will follow the syntax of JAX-RS. They can be like 
> {PARAM_NAME} or {PARAM_NAME:REGEX}. For example:
>
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/example.jsp
>   
>   
>   
>   
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/example.jsp
>   
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/{1}.jsp
>   
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-3262) improve wildcard to support regular expressions

2016-01-07 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-3262 at 1/7/16 5:27 PM:


Base on the JSR-339

Template parameters can optionally specify the regular expression used to match 
their values.  The default value matches any text and terminates at the end of 
a path segment but other values can be used to alter this behavior, e.g.:

@Path("widgets/{path:.+}")

public class Widget {

...

}

In the above example the Widgetresource class will be matched for any request 
whose path starts with
widgets and contains at least one more path segment; the value of the path 
parameter will be the request
path following widgets.   E.g.   given the request path widgets/small/a the 
value of path would be small/a.


Shouldn't this be implemented as part of the REST plugin???




was (Author: victorsosa):
Base on the JSR-339

Template parameters can optionally specify the regular expression used to match 
their values.  The default value matches any text and terminates at the end of 
a path segment but other values can be used to alter this behavior, e.g.:

@Path("widgets/{path:.+}")

public class Widget {

...

}

In the above example the Widgetresource class will be matched for any request 
whose path starts with
widgets and contains at least one more path segment; the value of the path 
parameter will be the request
path following widgets.   E.g.   given the request path widgets/small/a the 
value of path would be small/a.


Shouldn't this b implemented as part of the REST plugin???



> improve wildcard to support regular expressions
> ---
>
> Key: WW-3262
> URL: https://issues.apache.org/jira/browse/WW-3262
> Project: Struts 2
>  Issue Type: Improvement
>Affects Versions: 2.1.8
>Reporter: musachy
> Fix For: 3.0
>
>
> The regular expressions will follow the syntax of JAX-RS. They can be like 
> {PARAM_NAME} or {PARAM_NAME:REGEX}. For example:
>
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/example.jsp
>   
>   
>   
>   
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/example.jsp
>   
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/{1}.jsp
>   
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-3262) improve wildcard to support regular expressions

2016-01-07 Thread victorsosa (JIRA)

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

victorsosa commented on WW-3262:


Base on the JSR-339

Template parameters can optionally specify the regular expression used to match 
their values.  The default value matches any text and terminates at the end of 
a path segment but other values can be used to alter this behavior, e.g.:

@Path("widgets/{path:.+}")

public class Widget {

...

}

In the above example the Widgetresource class will be matched for any request 
whose path starts with
widgets and contains at least one more path segment; the value of the path 
parameter will be the request
path following widgets.   E.g.   given the request path widgets/small/a the 
value of path would be small/a.


Shouldn't this b implemented as part of the REST plugin???



> improve wildcard to support regular expressions
> ---
>
> Key: WW-3262
> URL: https://issues.apache.org/jira/browse/WW-3262
> Project: Struts 2
>  Issue Type: Improvement
>Affects Versions: 2.1.8
>Reporter: musachy
> Fix For: 3.0
>
>
> The regular expressions will follow the syntax of JAX-RS. They can be like 
> {PARAM_NAME} or {PARAM_NAME:REGEX}. For example:
>
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/example.jsp
>   
>   
>   
>   
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/example.jsp
>   
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/{1}.jsp
>   
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4269) blank double results in NumberFormatException being thrown on sending JSON in request body

2015-12-31 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4269:


Ok Then I will commit using the PR on Github

> blank double results in NumberFormatException being thrown on sending JSON in 
> request body
> --
>
> Key: WW-4269
> URL: https://issues.apache.org/jira/browse/WW-4269
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.15
> Environment: windows 7 64-bit, jdk 7 & struts2.3.15
>Reporter: Nitin Surana
>Priority: Blocker
>  Labels: easyfix
> Fix For: 2.5
>
> Attachments: ww-4269.patch
>
>
> If the http request contains JSON in the body, which has any problem in 
> getting converted to an object, then it throws Exception calling the 
> global-exception-handler. Instead it should return INPUT as by the validate 
> interceptor, mentioning the field having the error in fieldErrors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4269) blank double results in NumberFormatException being thrown on sending JSON in request body

2015-12-31 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4269 at 12/31/15 12:18 PM:
---

Ok Then I will commit using the PR on Github

PR #61


was (Author: victorsosa):
Ok Then I will commit using the PR on Github

> blank double results in NumberFormatException being thrown on sending JSON in 
> request body
> --
>
> Key: WW-4269
> URL: https://issues.apache.org/jira/browse/WW-4269
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.15
> Environment: windows 7 64-bit, jdk 7 & struts2.3.15
>Reporter: Nitin Surana
>Priority: Blocker
>  Labels: easyfix
> Fix For: 2.5
>
> Attachments: ww-4269.patch
>
>
> If the http request contains JSON in the body, which has any problem in 
> getting converted to an object, then it throws Exception calling the 
> global-exception-handler. Instead it should return INPUT as by the validate 
> interceptor, mentioning the field having the error in fieldErrors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4358) Bad properties file not detected

2015-12-31 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4358:


I check this out on this class 
/struts/core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java

Everything seems to be like Juan said.

LOG.error("Could not reload resource bundles", e);

The message should appears in the logs for any missing message file or even 
message key.

Can you please double check this? My best guess is that you need to setup you 
log4j2 with the correct classpath: com.opensymphony.xwork2; because everything 
seems to be OK.



> Bad properties file not detected
> 
>
> Key: WW-4358
> URL: https://issues.apache.org/jira/browse/WW-4358
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Other, Value Stack
>Affects Versions: 2.3.14, 2.3.16.2
> Environment: Tomcat7, Ubuntu Server 14.04 LTS
>Reporter: Juan-Francisco Diez
>Priority: Minor
>  Labels: easyfix
> Fix For: 2.5
>
>
> I had a problem in a properties file but the framework never warned me.
> The properties file was the default configured in struts.xml for i18n but the 
> strings never appear and the log said that there were no key defined.
> The problem was just a mismatch between a slash and a backslash in the 
> properties file but I spent lot of time to track the problem (about 8 hours 
> probing lot of stuffs).
> I just see that the properties file was not in the ValueStack. Perhaps if 
> struts can't push the content of the properties file in the ValueStack, it  
> can put an advise in the log of the container.
> I think that a framework like Struts must help developpers to find quicker 
> the problems and in this case it's not helping.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4269) blank double results in NumberFormatException being thrown on sending JSON in request body

2015-12-30 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4269 at 12/30/15 5:16 PM:
--

Here is some patch; Now then it throws a JSONException


was (Author: victorsosa):
Here is some patch; 

> blank double results in NumberFormatException being thrown on sending JSON in 
> request body
> --
>
> Key: WW-4269
> URL: https://issues.apache.org/jira/browse/WW-4269
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.15
> Environment: windows 7 64-bit, jdk 7 & struts2.3.15
>Reporter: Nitin Surana
>Priority: Blocker
>  Labels: easyfix
> Fix For: 2.5
>
> Attachments: ww-4269.patch
>
>
> If the http request contains JSON in the body, which has any problem in 
> getting converted to an object, then it throws Exception calling the 
> global-exception-handler. Instead it should return INPUT as by the validate 
> interceptor, mentioning the field having the error in fieldErrors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Issue Comment Deleted] (WW-4269) blank double results in NumberFormatException being thrown on sending JSON in request body

2015-12-30 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa updated WW-4269:
---
Comment: was deleted

(was: If this patch is ok, do you want me to commit it using a pull request  in 
Github?)

> blank double results in NumberFormatException being thrown on sending JSON in 
> request body
> --
>
> Key: WW-4269
> URL: https://issues.apache.org/jira/browse/WW-4269
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.15
> Environment: windows 7 64-bit, jdk 7 & struts2.3.15
>Reporter: Nitin Surana
>Priority: Blocker
>  Labels: easyfix
> Fix For: 2.5
>
> Attachments: ww-4269.patch
>
>
> If the http request contains JSON in the body, which has any problem in 
> getting converted to an object, then it throws Exception calling the 
> global-exception-handler. Instead it should return INPUT as by the validate 
> interceptor, mentioning the field having the error in fieldErrors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4269) blank double results in NumberFormatException being thrown on sending JSON in request body

2015-12-30 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4269 at 12/30/15 5:22 PM:
--

Here is some patch; Now then it throws a JSONException.

If this patch is ok, do you want me to commit it using a pull request  in 
Github?




was (Author: victorsosa):
Here is some patch; Now then it throws a JSONException

> blank double results in NumberFormatException being thrown on sending JSON in 
> request body
> --
>
> Key: WW-4269
> URL: https://issues.apache.org/jira/browse/WW-4269
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.15
> Environment: windows 7 64-bit, jdk 7 & struts2.3.15
>Reporter: Nitin Surana
>Priority: Blocker
>  Labels: easyfix
> Fix For: 2.5
>
> Attachments: ww-4269.patch
>
>
> If the http request contains JSON in the body, which has any problem in 
> getting converted to an object, then it throws Exception calling the 
> global-exception-handler. Instead it should return INPUT as by the validate 
> interceptor, mentioning the field having the error in fieldErrors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4269) blank double results in NumberFormatException being thrown on sending JSON in request body

2015-12-30 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4269:


If this patch is ok, do you want me to commit it using a pull request  in 
Github?

> blank double results in NumberFormatException being thrown on sending JSON in 
> request body
> --
>
> Key: WW-4269
> URL: https://issues.apache.org/jira/browse/WW-4269
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.15
> Environment: windows 7 64-bit, jdk 7 & struts2.3.15
>Reporter: Nitin Surana
>Priority: Blocker
>  Labels: easyfix
> Fix For: 2.5
>
> Attachments: ww-4269.patch
>
>
> If the http request contains JSON in the body, which has any problem in 
> getting converted to an object, then it throws Exception calling the 
> global-exception-handler. Instead it should return INPUT as by the validate 
> interceptor, mentioning the field having the error in fieldErrors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4269) blank double results in NumberFormatException being thrown on sending JSON in request body

2015-12-30 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa updated WW-4269:
---
Attachment: ww-4269.patch

Here is some patch; 

> blank double results in NumberFormatException being thrown on sending JSON in 
> request body
> --
>
> Key: WW-4269
> URL: https://issues.apache.org/jira/browse/WW-4269
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.15
> Environment: windows 7 64-bit, jdk 7 & struts2.3.15
>Reporter: Nitin Surana
>Priority: Blocker
>  Labels: easyfix
> Fix For: 2.5
>
> Attachments: ww-4269.patch
>
>
> If the http request contains JSON in the body, which has any problem in 
> getting converted to an object, then it throws Exception calling the 
> global-exception-handler. Instead it should return INPUT as by the validate 
> interceptor, mentioning the field having the error in fieldErrors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4573) NPE/ concurrent modification exception

2015-12-31 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4573:


I was looking into this and we can fix this using a CopyOnWriteArrayList. This 
is to keep Memory consistency.

> NPE/ concurrent modification exception
> --
>
> Key: WW-4573
> URL: https://issues.apache.org/jira/browse/WW-4573
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24
>Reporter: adam brin
>Priority: Minor
> Fix For: 2.3.25
>
>
> Apologies for the lack of contextual information, it appears that there were 
> no other errors logged that add context. But, we're seeing a few of these 
> each day in our production exception logs.  It looks like something may have 
> changed in how the ValueStack has been referenced /called and thus is causing 
> a concurrent modification exception.
> {code}
> ERROR 2015-11-29 09:21:43,987 389933021 [ajp-bio-8009-exec-6841 []] 
> (CommonsLogger.java:42) 
> com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor - null
> org.apache.struts2.StrutsException
> at org.apache.struts2.components.UIBean.end(UIBean.java:540) 
> ~[struts2-core-2.3.24.1.jar:2.3.24.1]
> at 
> org.apache.struts2.views.freemarker.tags.CallbackWriter.afterBody(CallbackWriter.java:84)
>  ~[struts2-core-2.3.24.1.jar:2.3.24.1]
> at 
> freemarker.core.Environment.visitAndTransform(Environment.java:427) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.UnifiedCall.accept(UnifiedCall.java:107) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.Environment.visit(Environment.java:324) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.MixedContent.accept(MixedContent.java:54) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at 
> freemarker.core.Environment.visitByHiddingParent(Environment.java:345) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.IfBlock.accept(IfBlock.java:48) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at 
> freemarker.core.Environment.visitByHiddingParent(Environment.java:345) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.Environment.visit(Environment.java:324) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.MixedContent.accept(MixedContent.java:54) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.Environment.visit(Environment.java:324) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.Macro$Context.runMacro(Macro.java:184) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.Environment.invoke(Environment.java:701) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.UnifiedCall.accept(UnifiedCall.java:84) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at 
> freemarker.core.Environment.visitByHiddingParent(Environment.java:345) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at 
> freemarker.core.IteratorBlock$IterationContext.executeNestedBlockInner(IteratorBlock.java:240)
>  ~[freemarker-2.3.23.jar:2.3.23]
> at 
> freemarker.core.IteratorBlock$IterationContext.executeNestedBlock(IteratorBlock.java:220)
>  ~[freemarker-2.3.23.jar:2.3.23]
> at 
> freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:194) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at 
> freemarker.core.Environment.visitIteratorBlock(Environment.java:572) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at 
> freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:78) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.IteratorBlock.accept(IteratorBlock.java:64) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.Environment.visit(Environment.java:324) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.MixedContent.accept(MixedContent.java:54) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.Environment.visit(Environment.java:324) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.EscapeBlock.accept(EscapeBlock.java:48) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.Environment.visit(Environment.java:324) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.MixedContent.accept(MixedContent.java:54) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.Environment.visit(Environment.java:324) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.core.Environment.process(Environment.java:302) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at freemarker.template.Template.process(Template.java:325) 
> ~[freemarker-2.3.23.jar:2.3.23]
> at 
> org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:223)
>  

[jira] [Commented] (WW-4568) Upgrade Tiles 2 to latest available Tiles 2 version

2016-01-05 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4568:


Hi Lukasz Lenart,

you commit this code already :+1:

> Upgrade Tiles 2 to latest available Tiles 2 version
> ---
>
> Key: WW-4568
> URL: https://issues.apache.org/jira/browse/WW-4568
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - Tiles
>Affects Versions: 2.3.24
>Reporter: Lukasz Lenart
> Fix For: 2.3.25
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4568) Upgrade Tiles 2 to latest available Tiles 2 version

2016-01-05 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4568 at 1/5/16 12:01 PM:
-

Hi Lukasz Lenart,

you commited this code already :+1:


was (Author: victorsosa):
Hi Lukasz Lenart,

you commit this code already :+1:

> Upgrade Tiles 2 to latest available Tiles 2 version
> ---
>
> Key: WW-4568
> URL: https://issues.apache.org/jira/browse/WW-4568
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - Tiles
>Affects Versions: 2.3.24
>Reporter: Lukasz Lenart
> Fix For: 2.3.25
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (WW-4582) adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

2016-01-05 Thread victorsosa (JIRA)
victorsosa created WW-4582:
--

 Summary: adds 'class' to exclude params in ParametersInterceptor 
(avoid ClassLoader manipulation)
 Key: WW-4582
 URL: https://issues.apache.org/jira/browse/WW-4582
 Project: Struts 2
  Issue Type: Bug
  Components: Core Interceptors
Affects Versions: 2.3.24
Reporter: victorsosa
Priority: Critical
 Fix For: 2.3.25, 2.5


Hi, 

This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4582) adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

2016-01-05 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa updated WW-4582:
---
Description: 
Hi, 

This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

This is base on the information in the S2-020


  was:
Hi, 

This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)




> adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader 
> manipulation)
> 
>
> Key: WW-4582
> URL: https://issues.apache.org/jira/browse/WW-4582
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: victorsosa
>Priority: Critical
>  Labels: security
> Fix For: 2.3.25, 2.5
>
>
> Hi, 
> This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
> to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)
> This is base on the information in the S2-020



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4582) adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

2016-01-07 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4582:


Oh it is after merge; Ups sorry

> adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader 
> manipulation)
> 
>
> Key: WW-4582
> URL: https://issues.apache.org/jira/browse/WW-4582
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: victorsosa
>Assignee: Lukasz Lenart
>Priority: Critical
>  Labels: security
> Fix For: 2.3.25, 2.5
>
>
> Hi, 
> This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
> to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)
> This is base on the information in the S2-020
> This close also the CVE-2014-0112, CVE-2014-0113 and CVE-2014-0116



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-3262) improve wildcard to support regular expressions

2016-01-07 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-3262 at 1/7/16 5:21 PM:


Base on the JSR-339

Template parameters can optionally specify the regular expression used to match 
their values.  The default value matches any text and terminates at the end of 
a path segment but other values can be used to alter this behavior, e.g.:

@Path("widgets/{path:.+}")

public class Widget {

...

}

In the above example the Widgetresource class will be matched for any request 
whose path starts with
widgets and contains at least one more path segment; the value of the path 
parameter will be the request
path following widgets.   E.g.   given the request path widgets/small/a the 
value of path would be small/a.


Shouldn't this b implemented as part of the REST plugin???




was (Author: victorsosa):
Base on the JSR-339

Template parameters can optionally specify the regular expression used to match 
their values.  The default value matches any text and terminates at the end of 
a path segment but other values can be used to alter this behavior, e.g.:

@Path("widgets/{path:.+}")

public class Widget {

...

}

In the above example the Widgetresource class will be matched for any request 
whose path starts with
widgets and contains at least one more path segment; the value of the path 
parameter will be the request
path following widgets.   E.g.   given the request path widgets/small/a the 
value of path would be small/a.


Shouldn't this b implemented as part of the REST plugin???



> improve wildcard to support regular expressions
> ---
>
> Key: WW-3262
> URL: https://issues.apache.org/jira/browse/WW-3262
> Project: Struts 2
>  Issue Type: Improvement
>Affects Versions: 2.1.8
>Reporter: musachy
> Fix For: 3.0
>
>
> The regular expressions will follow the syntax of JAX-RS. They can be like 
> {PARAM_NAME} or {PARAM_NAME:REGEX}. For example:
>
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/example.jsp
>   
>   
>   
>   
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/example.jsp
>   
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/{1}.jsp
>   
>   



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4638) TestNG 6.9.10 dependency error

2016-05-25 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4638 at 5/25/16 1:55 PM:
-

Struts 2.5 is updated to 1.7 jdk

pom.xml has the bug


org.testng
testng
5.1
**jdk15**



was (Author: victorsosa):
Struts 2.5 is updated to 1.7 jdk

> TestNG 6.9.10 dependency error
> --
>
> Key: WW-4638
> URL: https://issues.apache.org/jira/browse/WW-4638
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - TestNG
>Affects Versions: 2.3.28, 2.5
>Reporter: Jon Juaristi
> Fix For: 2.3.29, 2.5.1
>
>
> When trying to add the TestNG plugin as a dependency with TestNG 6.9.10 in 
> Gradle, the test compilation fails.
> The output for these dependencies
> {code}
> testCompile 'org.assertj:assertj-core:2.4.1'
> testCompile 'org.testng:testng:6.9.10'
> testCompile 'org.apache.struts:struts2-testng-plugin:2.3.28.1'
> //or testCompile 'org.apache.struts:struts2-testng-plugin:2.5'
> {code}
> Is the next one
> {code}
> FAILURE: Build failed with an exception.
> * What went wrong:
> Could not resolve all dependencies for configuration ':testCompileClasspath'.
> > Could not find testng-jdk15.jar (org.testng:testng:6.9.10).
>   Searched in the following locations:
>   
> https://repo1.maven.org/maven2/org/testng/testng/6.9.10/testng-6.9.10-jdk15.jar
> {code}
> The same happens for JCenter.
> It searches a file that doesn't exist, from what I've read the last version 
> with jdk15.jar is something like 4.4.7, if I'm not mistaken.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4649) SMI do not work with JSON plugin

2016-06-24 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4649:


Maybe it's releated to issue WW-4650

> SMI do not work with JSON plugin
> 
>
> Key: WW-4649
> URL: https://issues.apache.org/jira/browse/WW-4649
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.5.1
> Environment: struts 2.5.1 with jspn plugin
>Reporter: Arty Marty
> Fix For: 2.5.2
>
>
> SMI do not work with json plugin



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4650) Json deserialization does not work in 2.5.1

2016-06-24 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4650:


[~lukaszlenart] As you said the that logic need to be change as accept can be a 
list the check need to be done in the list itself.

{code}
Accept:application/json, text/plain, */*
{code}

> Json deserialization does not work in 2.5.1
> ---
>
> Key: WW-4650
> URL: https://issues.apache.org/jira/browse/WW-4650
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.5.1
>Reporter: Fred Ge
> Fix For: 2.5.2
>
>
> A json posted from Angular request is not deserialized anymore. It worked in 
> 2.5.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4650) Json deserialization does not work in 2.5.1

2016-06-24 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4650:


[~fredgero]  can you please post the json reponse that get from the server, 
just to be clear about the struts error response?

> Json deserialization does not work in 2.5.1
> ---
>
> Key: WW-4650
> URL: https://issues.apache.org/jira/browse/WW-4650
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.5.1
>Reporter: Fred Ge
> Fix For: 2.5.2
>
>
> A json posted from Angular request is not deserialized anymore. It worked in 
> 2.5.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4650) Json deserialization does not work in 2.5.1

2016-06-24 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4650 at 6/24/16 12:59 PM:
--

[~fredgero]  can you please post the json reponse that you get from the server, 
just to be clear about the struts error response?


was (Author: victorsosa):
[~fredgero]  can you please post the json reponse that get from the server, 
just to be clear about the struts error response?

> Json deserialization does not work in 2.5.1
> ---
>
> Key: WW-4650
> URL: https://issues.apache.org/jira/browse/WW-4650
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.5.1
>Reporter: Fred Ge
> Fix For: 2.5.2
>
>
> A json posted from Angular request is not deserialized anymore. It worked in 
> 2.5.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4650) Json deserialization does not work in 2.5.1

2016-06-24 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4650 at 6/24/16 12:42 PM:
--

[~lukaszlenart] As you said the that logic need to be changed as accept can be 
a list the check need to be done in the list itself.

{code}
Accept:application/json, text/plain, */*
{code}


was (Author: victorsosa):
[~lukaszlenart] As you said the that logic need to be change as accept can be a 
list the check need to be done in the list itself.

{code}
Accept:application/json, text/plain, */*
{code}

> Json deserialization does not work in 2.5.1
> ---
>
> Key: WW-4650
> URL: https://issues.apache.org/jira/browse/WW-4650
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.5.1
>Reporter: Fred Ge
> Fix For: 2.5.2
>
>
> A json posted from Angular request is not deserialized anymore. It worked in 
> 2.5.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4650) Json deserialization does not work in 2.5.1

2016-06-24 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4650:


you should also see something like this in you logs:

{code}
ERROR RPCError Request with content type of 'application/json-rpc' was received 
but SMD is not enabled for this interceptor. Set 'enableSMD' to true to enable 
it
ERROR RPCError 'method' is required for JSON RPC
ERROR RPCError Method methodWithoutAnnotation could not be found in action 
class.
ERROR RPCError Method doSomething could not be found in action class.
{code}


> Json deserialization does not work in 2.5.1
> ---
>
> Key: WW-4650
> URL: https://issues.apache.org/jira/browse/WW-4650
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.5.1
>Reporter: Fred Ge
> Fix For: 2.5.2
>
>
> A json posted from Angular request is not deserialized anymore. It worked in 
> 2.5.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Issue Comment Deleted] (WW-4650) Json deserialization does not work in 2.5.1

2016-06-24 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa updated WW-4650:
---
Comment: was deleted

(was: you should also see something like this in you logs:

{code}
ERROR RPCError Request with content type of 'application/json-rpc' was received 
but SMD is not enabled for this interceptor. Set 'enableSMD' to true to enable 
it
ERROR RPCError 'method' is required for JSON RPC
ERROR RPCError Method methodWithoutAnnotation could not be found in action 
class.
ERROR RPCError Method doSomething could not be found in action class.
{code}
)

> Json deserialization does not work in 2.5.1
> ---
>
> Key: WW-4650
> URL: https://issues.apache.org/jira/browse/WW-4650
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.5.1
>Reporter: Fred Ge
> Fix For: 2.5.2
>
>
> A json posted from Angular request is not deserialized anymore. It worked in 
> 2.5.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Reopened] (WW-4582) adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

2016-01-10 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa reopened WW-4582:


> adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader 
> manipulation)
> 
>
> Key: WW-4582
> URL: https://issues.apache.org/jira/browse/WW-4582
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: victorsosa
>Assignee: Lukasz Lenart
>Priority: Critical
>  Labels: security
> Fix For: 2.3.25, 2.5
>
>
> Hi, 
> This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
> to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)
> This is base on the information in the S2-020
> This close also the CVE-2014-0112, CVE-2014-0113 and CVE-2014-0116



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (WW-4582) adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

2016-01-10 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa resolved WW-4582.

Resolution: Won't Fix

> adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader 
> manipulation)
> 
>
> Key: WW-4582
> URL: https://issues.apache.org/jira/browse/WW-4582
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: victorsosa
>Assignee: Lukasz Lenart
>Priority: Critical
>  Labels: security
> Fix For: 2.3.25, 2.5
>
>
> Hi, 
> This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
> to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)
> This is base on the information in the S2-020
> This close also the CVE-2014-0112, CVE-2014-0113 and CVE-2014-0116



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4348) Remove access to static methods

2016-01-10 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4348:


So can I just add 



Into the config file so it start running the check??

> Remove access to static methods
> ---
>
> Key: WW-4348
> URL: https://issues.apache.org/jira/browse/WW-4348
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions
>Affects Versions: 2.3.16.3
>Reporter: Lukasz Lenart
>Priority: Critical
> Fix For: 2.5
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (WW-4582) adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)

2016-01-10 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa resolved WW-4582.

Resolution: Fixed

NO patch really needed

> adds 'class' to exclude params in ParametersInterceptor (avoid ClassLoader 
> manipulation)
> 
>
> Key: WW-4582
> URL: https://issues.apache.org/jira/browse/WW-4582
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: victorsosa
>Assignee: Lukasz Lenart
>Priority: Critical
>  Labels: security
> Fix For: 2.3.25, 2.5
>
>
> Hi, 
> This is a permanent patch for security issue CVE-2014-0094; this adds 'class' 
> to exclude params in ParametersInterceptor (avoid ClassLoader manipulation)
> This is base on the information in the S2-020
> This close also the CVE-2014-0112, CVE-2014-0113 and CVE-2014-0116



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4348) Remove access to static methods

2016-01-10 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4348:


This is already implemented, please check 
com.opensymphony.xwork2.ognl.OgnlUtil.setAllowStaticMethodAccess(String)

you only need to set "struts.ognl.allowStaticMethodAccess" true

> Remove access to static methods
> ---
>
> Key: WW-4348
> URL: https://issues.apache.org/jira/browse/WW-4348
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions
>Affects Versions: 2.3.16.3
>Reporter: Lukasz Lenart
>Priority: Critical
> Fix For: 2.5
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4348) Remove access to static methods

2016-01-10 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4348 at 1/10/16 12:45 PM:
--

This is already implemented, please check 
com.opensymphony.xwork2.ognl.OgnlUtil.setAllowStaticMethodAccess(String)

you only need to set "struts.ognl.allowStaticMethodAccess" true




was (Author: victorsosa):
This is already implemented, please check 
com.opensymphony.xwork2.ognl.OgnlUtil.setAllowStaticMethodAccess(String)

you only need to set "struts.ognl.allowStaticMethodAccess" true

> Remove access to static methods
> ---
>
> Key: WW-4348
> URL: https://issues.apache.org/jira/browse/WW-4348
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions
>Affects Versions: 2.3.16.3
>Reporter: Lukasz Lenart
>Priority: Critical
> Fix For: 2.5
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4348) Remove access to static methods

2016-01-10 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4348:


OK so it need to be false

> Remove access to static methods
> ---
>
> Key: WW-4348
> URL: https://issues.apache.org/jira/browse/WW-4348
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions
>Affects Versions: 2.3.16.3
>Reporter: Lukasz Lenart
>Priority: Critical
> Fix For: 2.5
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-3364) Using convertors in JSON serialization

2016-01-10 Thread victorsosa (JIRA)

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

victorsosa commented on WW-3364:


Yep, you are right

> Using convertors in JSON serialization
> --
>
> Key: WW-3364
> URL: https://issues.apache.org/jira/browse/WW-3364
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - JSON
>Affects Versions: 2.1.8
>Reporter: Rahul Mohan
> Fix For: 2.5.x
>
>
> The bundled JSON plugin does not use registered convertors for data 
> conversion. This seriously affects the implementation of gracefully degrading 
> ajax apps.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-3731) Rename ArrayUtils to CollectionUtils

2016-01-10 Thread victorsosa (JIRA)

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

victorsosa commented on WW-3731:


Where???

> Rename ArrayUtils to CollectionUtils
> 
>
> Key: WW-3731
> URL: https://issues.apache.org/jira/browse/WW-3731
> Project: Struts 2
>  Issue Type: Improvement
>Affects Versions: 2.3.1
>Reporter: Lukasz Lenart
> Fix For: 3.0
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-3653) Struts2 should base on JDK5 and all tests must passing

2016-01-18 Thread victorsosa (JIRA)

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

victorsosa commented on WW-3653:


Aren't we already on 1.8JDK??

> Struts2 should base on JDK5 and all tests must passing
> --
>
> Key: WW-3653
> URL: https://issues.apache.org/jira/browse/WW-3653
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Actions
>Affects Versions: 2.2.3
>Reporter: Lukasz Lenart
>Assignee: Lukasz Lenart
>Priority: Blocker
> Fix For: 3.0
>
>
> testFailsOnMethodThatThrowsException(com.opensymphony.xwork2.ognl.OgnlValueStack
> Test)
> Tests run: 657, Failures: 1, Errors: 0, Skipped: 0
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time: 38.547s
> [INFO] Finished at: Tue Jun 07 10:05:56 EDT 2011
> [INFO] Final Memory: 10M/37M
> [INFO] 
> 
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.6:test (default-test) on
> project xwork-core: There are test failures.
> [ERROR]
> [ERROR] Please refer to C:\Documents and Settings\All
> Users\Desktop\projects\struts\struts2\trunk\xwork-core\target\surefire-reports
> for the individual test results.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> jpyeron@reclaimed /projects/struts/struts2/trunk/xwork-core
> $
> public void testFailsOnMethodThatThrowsException() {
>SimpleAction action = new SimpleAction();
>OgnlValueStack stack = createValueStack();
>stack.push(action);
>action.setThrowException(true);
>try {
>stack.findValue("exceptionMethod1()", true);
>fail("Failed to throw exception on EL method exception");
>} catch (Exception ex) {
>//ok
>}
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-3653) Struts2 should base on JDK5 and all tests must passing

2016-01-18 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-3653 at 1/18/16 6:43 PM:
-

Aren't we already on 1.7JDK??


was (Author: victorsosa):
Aren't we already on 1.8JDK??

> Struts2 should base on JDK5 and all tests must passing
> --
>
> Key: WW-3653
> URL: https://issues.apache.org/jira/browse/WW-3653
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Actions
>Affects Versions: 2.2.3
>Reporter: Lukasz Lenart
>Assignee: Lukasz Lenart
>Priority: Blocker
> Fix For: 3.0
>
>
> testFailsOnMethodThatThrowsException(com.opensymphony.xwork2.ognl.OgnlValueStack
> Test)
> Tests run: 657, Failures: 1, Errors: 0, Skipped: 0
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time: 38.547s
> [INFO] Finished at: Tue Jun 07 10:05:56 EDT 2011
> [INFO] Final Memory: 10M/37M
> [INFO] 
> 
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.6:test (default-test) on
> project xwork-core: There are test failures.
> [ERROR]
> [ERROR] Please refer to C:\Documents and Settings\All
> Users\Desktop\projects\struts\struts2\trunk\xwork-core\target\surefire-reports
> for the individual test results.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> jpyeron@reclaimed /projects/struts/struts2/trunk/xwork-core
> $
> public void testFailsOnMethodThatThrowsException() {
>SimpleAction action = new SimpleAction();
>OgnlValueStack stack = createValueStack();
>stack.push(action);
>action.setThrowException(true);
>try {
>stack.findValue("exceptionMethod1()", true);
>fail("Failed to throw exception on EL method exception");
>} catch (Exception ex) {
>//ok
>}
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4620) ParametersInterceptor should check collection index to against DOS

2016-06-27 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4620:


[~lukaszlenart] is the valueStack some how loading the collection 
{code}collection=1=2{code} from the Parameter list?

> ParametersInterceptor should check collection index to against DOS
> --
>
> Key: WW-4620
> URL: https://issues.apache.org/jira/browse/WW-4620
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Reporter: zhouyanming
>Priority: Critical
> Fix For: 2.3.30, 2.5.2
>
>
> https://dzone.com/articles/spring-initbinder-for-handling-large-list-of-java
> This is my workaround:
> {code:java}
> import org.apache.commons.lang3.StringUtils;
> import com.opensymphony.xwork2.interceptor.ParametersInterceptor;
> import com.opensymphony.xwork2.util.logging.Logger;
> import com.opensymphony.xwork2.util.logging.LoggerFactory;
> public class ParamsInterceptor extends ParametersInterceptor {
>   private static final Logger LOG = 
> LoggerFactory.getLogger(ParametersInterceptor.class);
>   protected int autoGrowCollectionLimit = 255;
>   public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit) {
>   this.autoGrowCollectionLimit = autoGrowCollectionLimit;
>   }
>   @Override
>   protected boolean acceptableName(String name) {
>   boolean b = super.acceptableName(name);
>   if (b) {
>   int start = name.indexOf('[');
>   while (start > 0) {
>   int end = name.indexOf(']', start);
>   if (end < 0)
>   break;
>   String s = name.substring(start + 1, end);
>   if (StringUtils.isNumeric(s)) {
>   int index = Integer.valueOf(s);
>   if (index > autoGrowCollectionLimit) {
>   LOG.warn("Parameter \"#0\" 
> exceed max index: [#1]", name, autoGrowCollectionLimit);
>   return false;
>   }
>   }
>   start = name.indexOf('[', end);
>   }
>   }
>   return b;
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4620) ParametersInterceptor should check collection index to against DOS

2016-06-27 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4620:


[~quaff]  My code will never execute a list over 255 elements.

> ParametersInterceptor should check collection index to against DOS
> --
>
> Key: WW-4620
> URL: https://issues.apache.org/jira/browse/WW-4620
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Reporter: zhouyanming
>Priority: Critical
> Fix For: 2.3.30, 2.5.2
>
>
> https://dzone.com/articles/spring-initbinder-for-handling-large-list-of-java
> This is my workaround:
> {code:java}
> import org.apache.commons.lang3.StringUtils;
> import com.opensymphony.xwork2.interceptor.ParametersInterceptor;
> import com.opensymphony.xwork2.util.logging.Logger;
> import com.opensymphony.xwork2.util.logging.LoggerFactory;
> public class ParamsInterceptor extends ParametersInterceptor {
>   private static final Logger LOG = 
> LoggerFactory.getLogger(ParametersInterceptor.class);
>   protected int autoGrowCollectionLimit = 255;
>   public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit) {
>   this.autoGrowCollectionLimit = autoGrowCollectionLimit;
>   }
>   @Override
>   protected boolean acceptableName(String name) {
>   boolean b = super.acceptableName(name);
>   if (b) {
>   int start = name.indexOf('[');
>   while (start > 0) {
>   int end = name.indexOf(']', start);
>   if (end < 0)
>   break;
>   String s = name.substring(start + 1, end);
>   if (StringUtils.isNumeric(s)) {
>   int index = Integer.valueOf(s);
>   if (index > autoGrowCollectionLimit) {
>   LOG.warn("Parameter \"#0\" 
> exceed max index: [#1]", name, autoGrowCollectionLimit);
>   return false;
>   }
>   }
>   start = name.indexOf('[', end);
>   }
>   }
>   return b;
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4620) ParametersInterceptor should check collection index to against DOS

2016-06-27 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4620:


Ok, I will close the PR

> ParametersInterceptor should check collection index to against DOS
> --
>
> Key: WW-4620
> URL: https://issues.apache.org/jira/browse/WW-4620
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Reporter: zhouyanming
>Priority: Critical
> Fix For: 2.3.30, 2.5.2
>
>
> https://dzone.com/articles/spring-initbinder-for-handling-large-list-of-java
> This is my workaround:
> {code:java}
> import org.apache.commons.lang3.StringUtils;
> import com.opensymphony.xwork2.interceptor.ParametersInterceptor;
> import com.opensymphony.xwork2.util.logging.Logger;
> import com.opensymphony.xwork2.util.logging.LoggerFactory;
> public class ParamsInterceptor extends ParametersInterceptor {
>   private static final Logger LOG = 
> LoggerFactory.getLogger(ParametersInterceptor.class);
>   protected int autoGrowCollectionLimit = 255;
>   public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit) {
>   this.autoGrowCollectionLimit = autoGrowCollectionLimit;
>   }
>   @Override
>   protected boolean acceptableName(String name) {
>   boolean b = super.acceptableName(name);
>   if (b) {
>   int start = name.indexOf('[');
>   while (start > 0) {
>   int end = name.indexOf(']', start);
>   if (end < 0)
>   break;
>   String s = name.substring(start + 1, end);
>   if (StringUtils.isNumeric(s)) {
>   int index = Integer.valueOf(s);
>   if (index > autoGrowCollectionLimit) {
>   LOG.warn("Parameter \"#0\" 
> exceed max index: [#1]", name, autoGrowCollectionLimit);
>   return false;
>   }
>   }
>   start = name.indexOf('[', end);
>   }
>   }
>   return b;
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4620) ParametersInterceptor should check collection index to against DOS

2016-06-26 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4620 at 6/26/16 11:08 PM:
--

[~lukaszlenart] I think that's not possible because we are using a TreeMap to 
represent the parameters, so duplicate key aren't allow. It is in the spec of 
Struts support params collections in that way? because something like 
{code}Map{code} is the way to go.


was (Author: victorsosa):
[~lukaszlenart]I think that's not possible because we are using a TreeMap to 
represent the parameters, so duplicate key aren't allow. It is in the spec of 
Struts support params collections in that way? because something like 
{code}Map{code} is the way to go.

> ParametersInterceptor should check collection index to against DOS
> --
>
> Key: WW-4620
> URL: https://issues.apache.org/jira/browse/WW-4620
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Reporter: zhouyanming
>Priority: Critical
> Fix For: 2.3.30, 2.5.2
>
>
> https://dzone.com/articles/spring-initbinder-for-handling-large-list-of-java
> This is my workaround:
> {code:java}
> import org.apache.commons.lang3.StringUtils;
> import com.opensymphony.xwork2.interceptor.ParametersInterceptor;
> import com.opensymphony.xwork2.util.logging.Logger;
> import com.opensymphony.xwork2.util.logging.LoggerFactory;
> public class ParamsInterceptor extends ParametersInterceptor {
>   private static final Logger LOG = 
> LoggerFactory.getLogger(ParametersInterceptor.class);
>   protected int autoGrowCollectionLimit = 255;
>   public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit) {
>   this.autoGrowCollectionLimit = autoGrowCollectionLimit;
>   }
>   @Override
>   protected boolean acceptableName(String name) {
>   boolean b = super.acceptableName(name);
>   if (b) {
>   int start = name.indexOf('[');
>   while (start > 0) {
>   int end = name.indexOf(']', start);
>   if (end < 0)
>   break;
>   String s = name.substring(start + 1, end);
>   if (StringUtils.isNumeric(s)) {
>   int index = Integer.valueOf(s);
>   if (index > autoGrowCollectionLimit) {
>   LOG.warn("Parameter \"#0\" 
> exceed max index: [#1]", name, autoGrowCollectionLimit);
>   return false;
>   }
>   }
>   start = name.indexOf('[', end);
>   }
>   }
>   return b;
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4620) ParametersInterceptor should check collection index to against DOS

2016-06-26 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4620:


[~lukaszlenart]I think that's not possible because we are using a TreeMap to 
represent the parameters, so duplicate key aren't allow. It is in the spec of 
Struts support params collections in that way? because something like 
{code}Map{code} is the way to go.

> ParametersInterceptor should check collection index to against DOS
> --
>
> Key: WW-4620
> URL: https://issues.apache.org/jira/browse/WW-4620
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Reporter: zhouyanming
>Priority: Critical
> Fix For: 2.3.30, 2.5.2
>
>
> https://dzone.com/articles/spring-initbinder-for-handling-large-list-of-java
> This is my workaround:
> {code:java}
> import org.apache.commons.lang3.StringUtils;
> import com.opensymphony.xwork2.interceptor.ParametersInterceptor;
> import com.opensymphony.xwork2.util.logging.Logger;
> import com.opensymphony.xwork2.util.logging.LoggerFactory;
> public class ParamsInterceptor extends ParametersInterceptor {
>   private static final Logger LOG = 
> LoggerFactory.getLogger(ParametersInterceptor.class);
>   protected int autoGrowCollectionLimit = 255;
>   public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit) {
>   this.autoGrowCollectionLimit = autoGrowCollectionLimit;
>   }
>   @Override
>   protected boolean acceptableName(String name) {
>   boolean b = super.acceptableName(name);
>   if (b) {
>   int start = name.indexOf('[');
>   while (start > 0) {
>   int end = name.indexOf(']', start);
>   if (end < 0)
>   break;
>   String s = name.substring(start + 1, end);
>   if (StringUtils.isNumeric(s)) {
>   int index = Integer.valueOf(s);
>   if (index > autoGrowCollectionLimit) {
>   LOG.warn("Parameter \"#0\" 
> exceed max index: [#1]", name, autoGrowCollectionLimit);
>   return false;
>   }
>   }
>   start = name.indexOf('[', end);
>   }
>   }
>   return b;
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4600) MessageStoreInterceptor throws Session already invalidated

2016-02-01 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4600 at 2/2/16 2:18 AM:


There is something wrong with that implementation; Do you invalidated the 
session in you action???

can you create a sample app to duplicate the issue?


was (Author: victorsosa):
There is something wrong with that implementation; Do you invalidated the 
session in you action???

can you create a sample app for duplicate the issue?

> MessageStoreInterceptor  throws Session already invalidated
> ---
>
> Key: WW-4600
> URL: https://issues.apache.org/jira/browse/WW-4600
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: Alireza Fattahi
>Assignee: Lukasz Lenart
> Fix For: 2.3.25, 2.5
>
>
> The MessageStoreInterceptor may throw the java.lang.IllegalStateException: 
> getAttribute: Session already invalidated at line 289, if the action 
> invalidte the session.
> Can this be solved ?!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4600) MessageStoreInterceptor throws Session already invalidated

2016-02-01 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4600:


There is something wrong with that implementation; Do you invalidated the 
session in you action???

> MessageStoreInterceptor  throws Session already invalidated
> ---
>
> Key: WW-4600
> URL: https://issues.apache.org/jira/browse/WW-4600
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: Alireza Fattahi
>Assignee: Lukasz Lenart
> Fix For: 2.3.25, 2.5
>
>
> The MessageStoreInterceptor may throw the java.lang.IllegalStateException: 
> getAttribute: Session already invalidated at line 289, if the action 
> invalidte the session.
> Can this be solved ?!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4600) MessageStoreInterceptor throws Session already invalidated

2016-02-01 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4600 at 2/2/16 2:16 AM:


There is something wrong with that implementation; Do you invalidated the 
session in you action???

can you create a sample app for duplicate the issue?


was (Author: victorsosa):
There is something wrong with that implementation; Do you invalidated the 
session in you action???

> MessageStoreInterceptor  throws Session already invalidated
> ---
>
> Key: WW-4600
> URL: https://issues.apache.org/jira/browse/WW-4600
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: Alireza Fattahi
>Assignee: Lukasz Lenart
> Fix For: 2.3.25, 2.5
>
>
> The MessageStoreInterceptor may throw the java.lang.IllegalStateException: 
> getAttribute: Session already invalidated at line 289, if the action 
> invalidte the session.
> Can this be solved ?!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4600) MessageStoreInterceptor throws Session already invalidated

2016-01-31 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4600:


Affects Version please

> MessageStoreInterceptor  throws Session already invalidated
> ---
>
> Key: WW-4600
> URL: https://issues.apache.org/jira/browse/WW-4600
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Reporter: Alireza Fattahi
> Fix For: 2.5.x
>
>
> The MessageStoreInterceptor may throw the java.lang.IllegalStateException: 
> getAttribute: Session already invalidated at line 289, if the action 
> invalidte the session.
> Can this be solved ?!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4600) MessageStoreInterceptor throws Session already invalidated

2016-02-02 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4600:


Alireza, so we can consider this resolved?

> MessageStoreInterceptor  throws Session already invalidated
> ---
>
> Key: WW-4600
> URL: https://issues.apache.org/jira/browse/WW-4600
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: Alireza Fattahi
>Assignee: Lukasz Lenart
> Fix For: 2.3.25, 2.5
>
>
> The MessageStoreInterceptor may throw the java.lang.IllegalStateException: 
> getAttribute: Session already invalidated at line 289, if the action 
> invalidte the session.
> Can this be solved ?!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4608) Json result type breaks

2016-02-22 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4608:


Sorry, I don't think this is a bug to be fixed, because the serialization of 
any Object call every method on it  so the properties can be serializable and 
in the case of a URL it call the getContent which throw a java.io.IOException 
in that case. So there isn't anything wrong with the code, it is working as 
expected.

I recommend you to change that variable to a String so it can be serializable.

> Json result type breaks 
> 
>
> Key: WW-4608
> URL: https://issues.apache.org/jira/browse/WW-4608
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.24
>Reporter: lefebvre
> Fix For: 2.3.x
>
>
> If the object to serialize contains an URL and the url not exist or cannot be 
> accessed, 403 (https//wadvisor-r7.com) we get an ioexception



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4391) FreemarkerResult should respect response.getCharacterEncoding()

2016-01-20 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4391:


We still want to do this?? it seems like this is a WON'T FIX

> FreemarkerResult should respect response.getCharacterEncoding()
> ---
>
> Key: WW-4391
> URL: https://issues.apache.org/jira/browse/WW-4391
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions
>Reporter: zhouyanming
>Assignee: Lukasz Lenart
> Fix For: 2.3.x
>
> Attachments: WW-4391.patch
>
>
> response.getCharacterEncoding() should override template.getEncoding() if 
> exists.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (WW-4597) ww-4593

2016-01-25 Thread victorsosa (JIRA)
victorsosa created WW-4597:
--

 Summary: ww-4593
 Key: WW-4597
 URL: https://issues.apache.org/jira/browse/WW-4597
 Project: Struts 2
  Issue Type: Bug
Reporter: victorsosa
Priority: Blocker






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Closed] (WW-4597) ww-4593

2016-01-25 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa closed WW-4597.
--
Resolution: Invalid

> ww-4593
> ---
>
> Key: WW-4597
> URL: https://issues.apache.org/jira/browse/WW-4597
> Project: Struts 2
>  Issue Type: Bug
>Reporter: victorsosa
>Priority: Blocker
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (WW-4593) Easymock upgrade to 3.4

2016-01-20 Thread victorsosa (JIRA)
victorsosa created WW-4593:
--

 Summary: Easymock upgrade to 3.4
 Key: WW-4593
 URL: https://issues.apache.org/jira/browse/WW-4593
 Project: Struts 2
  Issue Type: Improvement
  Components: Core Actions, Core Interceptors, Dispatch Filter
Affects Versions: 2.3.24
Reporter: victorsosa
 Fix For: 2.3.x


This is the upgrade of the Easymock library for the unit tests

Every unit test is changed to keep the same result but using the new API.





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4593) Easymock upgrade to 3.4

2016-01-20 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4593:


check PR 83

> Easymock upgrade to 3.4
> ---
>
> Key: WW-4593
> URL: https://issues.apache.org/jira/browse/WW-4593
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions, Core Interceptors, Dispatch Filter
>Affects Versions: 2.3.24
>Reporter: victorsosa
> Fix For: 2.3.x
>
>
> This is the upgrade of the Easymock library for the unit tests
> Every unit test is changed to keep the same result but using the new API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4412) Context started without being closed

2016-01-19 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4412:


the context should start and end
+ container.startContext(request);
container.render(location, request);
+ container.endContext(request);



> Context started without being closed
> 
>
> Key: WW-4412
> URL: https://issues.apache.org/jira/browse/WW-4412
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.16.3
>Reporter: Hazem Taji
> Fix For: 2.5
>
> Attachments: tiles-test.zip
>
>
> In the TilesResult class, in doExecute, a context is started but not ended. 
> This causes the context stack later to have extra irrelevant contexts.
> The problem prevents the use of  tags where actions have tile 
> results and results in the tile attributes being unrecognized.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-3940) Upgrade to Velocity Tools 2.0

2016-01-22 Thread victorsosa (JIRA)

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

victorsosa commented on WW-3940:


JWebUnit upgrade to 3.3 too

> Upgrade to Velocity Tools 2.0
> -
>
> Key: WW-3940
> URL: https://issues.apache.org/jira/browse/WW-3940
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions, Plugin - Portlet, Plugin - SiteMesh
>Affects Versions: 2.3.7
>Reporter: Lukasz Lenart
>Priority: Minor
> Fix For: 2.5
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4558) contentType override ignored for JSONInterceptor

2016-02-14 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4558:


Guys, one clarification.

we should use 'Accept' in the request and 'Content-Type' in the response. So is 
right to use the content-type only in the response.

https://en.wikipedia.org/wiki/List_of_HTTP_header_fields

> contentType override ignored for JSONInterceptor
> 
>
> Key: WW-4558
> URL: https://issues.apache.org/jira/browse/WW-4558
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.24
>Reporter: Jasper Rosenberg
>Priority: Minor
> Fix For: 2.3.25
>
>
> JSONInterceptor takes a contentType parameter, but as far as I can tell does 
> nothing with it.  I would think a reasonable way to use it would be to have 
> it used if available, rather than the content type from the request so that 
> the interceptor can be used when receiving a JSON post from a third party 
> that does not set the correct content type.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4558) contentType override ignored for JSONInterceptor

2016-02-14 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4558:


I am also proposing to change the defaultEncoding to UTF-8 in the 
JSONInterceptor

> contentType override ignored for JSONInterceptor
> 
>
> Key: WW-4558
> URL: https://issues.apache.org/jira/browse/WW-4558
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.24
>Reporter: Jasper Rosenberg
>Priority: Minor
> Fix For: 2.3.25
>
>
> JSONInterceptor takes a contentType parameter, but as far as I can tell does 
> nothing with it.  I would think a reasonable way to use it would be to have 
> it used if available, rather than the content type from the request so that 
> the interceptor can be used when receiving a JSON post from a third party 
> that does not set the correct content type.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4558) contentType override ignored for JSONInterceptor

2016-02-15 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4558:


>From now on:

The "accept" request header parameter must be "application/json" or 
"application/json-rpc"

Also the default encoding is "UTF-8"

Documentation will be updated too.
https://cwiki.apache.org/confluence/display/WW/JSON+Plugin


> contentType override ignored for JSONInterceptor
> 
>
> Key: WW-4558
> URL: https://issues.apache.org/jira/browse/WW-4558
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.24
>Reporter: Jasper Rosenberg
>Priority: Minor
> Fix For: 2.3.25
>
>
> JSONInterceptor takes a contentType parameter, but as far as I can tell does 
> nothing with it.  I would think a reasonable way to use it would be to have 
> it used if available, rather than the content type from the request so that 
> the interceptor can be used when receiving a JSON post from a third party 
> that does not set the correct content type.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4608) Json result type breaks

2016-02-21 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4608:


Any log on this??

> Json result type breaks 
> 
>
> Key: WW-4608
> URL: https://issues.apache.org/jira/browse/WW-4608
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.24
>Reporter: lefebvre
> Fix For: 2.3.x
>
>
> If the object to serialize contains an URL and the url not exist or cannot be 
> accessed, 403 (https//wadvisor-r7.com) we get an ioexception



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4608) Json result type breaks

2016-02-21 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4608:


I think you are trying to serialize an URL object instead of a url String, 
right? In you case also https//wadvisor-r7.com is no a well formatted url 
because is missing the ":"

> Json result type breaks 
> 
>
> Key: WW-4608
> URL: https://issues.apache.org/jira/browse/WW-4608
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.24
>Reporter: lefebvre
> Fix For: 2.3.x
>
>
> If the object to serialize contains an URL and the url not exist or cannot be 
> accessed, 403 (https//wadvisor-r7.com) we get an ioexception



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4188) In struts tag lib, required attribute removed in latest version ie 2.3.15.1

2016-03-19 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4188:


keep it as requiredLabel 1+

> In struts tag lib, required attribute removed in latest version ie 2.3.15.1
> ---
>
> Key: WW-4188
> URL: https://issues.apache.org/jira/browse/WW-4188
> Project: Struts 2
>  Issue Type: Bug
>  Components: Other
>Affects Versions: 2.3.15.1
> Environment: All
>Reporter: mahendran
>Assignee: Lukasz Lenart
>  Labels: struts-tags-required-attribute
> Fix For: 2.5
>
>
> we are using struts 2.0.5 and 2.3.4.1 in our applications. And we decided to 
> migrate to 2.3.15.1 to get the security fixes.
> we use struts tags to render UI components and using 'required' attribute to 
> get the '*' along with the components.
> In the version 2.3.15.1, the attribute required is dropped, and we need to 
> change to requiredLabel to get the same effect, this increases 
> migration effort for a application which has 1000+pages
> Hence we require a backward compatibility for 'required' attribute in struts 
> tags.
> Also nowhere in the migration document this information is specified. This 
> makes the struts migration as block-box. Hence we require a proper migration 
> document which should specify what are all the changes required in the 
> application to migrate the struts.
> But we managed to get the '*' in UI by replacing 
> UIBean.class,AbsctactUITag.class and struts.tld from 2.3.4.1 version.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4610) ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper (or StrutsRequestWrapper) when using StrutsPrepareFilter

2016-03-02 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4610:


HI Filippo,

Because ServletActionContext.getRequest() returns a HttpServletRequest.

Check the implementation:

return (HttpServletRequest) ActionContext.getContext().get(HTTP_REQUEST);

You could try to cast to MultiPartRequestWrapper. But this is not a bug really.

> ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper 
> (or StrutsRequestWrapper) when using StrutsPrepareFilter
> -
>
> Key: WW-4610
> URL: https://issues.apache.org/jira/browse/WW-4610
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24, 2.5
>Reporter: Filippo Munafò
> Fix For: 2.3.25, 2.5
>
>
> MultiPartRequestWrapper (or StrutsRequestWrapper) is created in 
> Dispatcher.wrapRequest but, there, it's not updated in ServletActionContext. 
> Probably the update is done later because FileUploadInterceptor.intercept has 
> access to the correct object; but using only StrutsPrepareFilter (instead of 
> an execute one) the method ServletActionContext.getRequest() never return the 
> MultiPartRequestWrapper (or StrutsRequestWrapper).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-3957) Multiple concurrent AJAX requests can collide

2016-03-02 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-3957 at 3/2/16 7:06 PM:


This was fixed on issue WW-4573 using a CopyOnWriteArrayList. This is to keep 
Memory consistency on the ValueStack.

Location: RENDER_DIRECT_LOCATION is no managed but it is enough with the value 
stack and beside add more locking can affect performance.


was (Author: victorsosa):
This was fixed on issue WW-4573 using a CopyOnWriteArrayList. This is to keep 
Memory consistency on the ValueStack.

> Multiple concurrent AJAX requests can collide
> -
>
> Key: WW-3957
> URL: https://issues.apache.org/jira/browse/WW-3957
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Portlet
>Affects Versions: 2.3.8
> Environment: Liferay/Tomcat
>Reporter: Donat Iszak
> Fix For: 2.5
>
>
> If there are multiple AJAX request in the same time (and same HTTP Session) 
> they can somehow overwrite the concurrent thread's data (for example the 
> result location).
> Update:
> There is no conflict when we use resource URL, but when we use the action URL 
> the struts2 portlet plugin executes the interceptor stack twice:
> - First in Action phase: This runs normally the action, and saves the full 
> stack and response location to the http session. The PortletStateInterceptor 
> saves the stack, the PortletResult saves the location.
> - Second in Render phase: This phase restores the value stack and runs a 
> dummy action (DirectRenderFromEventAction) which does noting but returns the 
> previously saved response location from the session.
> The problem is that key for the http session objects is a constant (Location: 
> RENDER_DIRECT_LOCATION, Valuestack: STACK_FROM_EVENT_PHASE).
> Let's see an example, when there are two concurrent thread A,B:
> 1. A action phase  (saves locationA to session(RENDER_DIRECT_LOCATION), saves 
> stackA to session(STACK_FROM_EVENT_PHASE))
> 2. B action phase (saves locationB to session(RENDER_DIRECT_LOCATION), saves 
> stackB to session(STACK_FROM_EVENT_PHASE), so it overwrites locationA, 
> stackA!)
> 3. A render phase (loads stackB, locationB from session. Returns/forwards to 
> locationB) So it returns the response of the B thread too!
> 4. B render phase (loads stackB, locationB from session. Returns/forwards to 
> locationB)
> Possible solution is to add the threadId to the session key 
> (RENDER_DIRECT_LOCATION + ThreadId). This could cause a massive load to the 
> session so some clever clean up needed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4176) Struts2 JSON Plugin: Send Map with Strings as Key to JSON Action is ignored, Numeric Keys will work and mapped

2016-03-02 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4176 at 3/2/16 6:24 PM:


This issue could be fixed by this issue 4560


was (Author: victorsosa):
This issue could be fixed by this issue

> Struts2 JSON Plugin: Send Map with Strings as Key to JSON Action is ignored, 
> Numeric Keys will work and mapped
> --
>
> Key: WW-4176
> URL: https://issues.apache.org/jira/browse/WW-4176
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.14.3
> Environment: Tomcat6, Struts 2.3.14.3,JSON Plugin 2.3.14.3,jquery
>Reporter: Stefan Abendroth
>Assignee: Lukasz Lenart
> Fix For: 2.5
>
> Attachments: WW-4176-proposal.patch
>
>
> Sending Map from javascript/jsp to JSON Action, when the Keys are numeric 
> everything works, when the keys are Strings then these entries are thrown 
> away while the mapping process in the JSON Action takes place.
> Important note: If i create a map in the JSON Action and send it to the 
> client everything is ok.
> alert which shows the Server generated JSON:
> {noformat}
> ServerJSON{"1":"1","2":"ANOTHERVALUE","ANOTHERKEY":"1","KEY":"VALUE"}
> {noformat}
> If i look into the sended data from javascript side in Eclipse i see in debug 
> mode:
> {noformat}
> this=>myJSONMap:{2=[Ljava.lang.String;@3caf7a1f, 
> 23=[Ljava.lang.String;@247aa859}
> {noformat}
> Alert shows on client side:
> {noformat}
> ClientJSON{"2":["ANOTHERVALUE"],"23":["1"]}
> {noformat}
> Hope it's clear where the problem is. Bug or misunderstood anything?
> Would like to have a List of keys,values where the keys can be 
> String/Long/Int and the values can be String/Long/int.
> The direction Server generated Map=>JSON is ok, sending the same from client 
> side will lose the entries with a String key.
> Further i tried also to specify my Map like
> {code:java}
> private Map propertyValueMap = new LinkedHashMap String>(); 
> {code}
> and set the getters/setters but don't work either.
> Here is a part of my code:
> JSP PAGE:
> {code:html}
> 
> testForm1
> 
> 

[jira] [Comment Edited] (WW-4176) Struts2 JSON Plugin: Send Map with Strings as Key to JSON Action is ignored, Numeric Keys will work and mapped

2016-03-02 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4176 at 3/2/16 6:24 PM:


This issue could be fixed by this issue


was (Author: victorsosa):
This issue could be fixed by this.

> Struts2 JSON Plugin: Send Map with Strings as Key to JSON Action is ignored, 
> Numeric Keys will work and mapped
> --
>
> Key: WW-4176
> URL: https://issues.apache.org/jira/browse/WW-4176
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.14.3
> Environment: Tomcat6, Struts 2.3.14.3,JSON Plugin 2.3.14.3,jquery
>Reporter: Stefan Abendroth
>Assignee: Lukasz Lenart
> Fix For: 2.5
>
> Attachments: WW-4176-proposal.patch
>
>
> Sending Map from javascript/jsp to JSON Action, when the Keys are numeric 
> everything works, when the keys are Strings then these entries are thrown 
> away while the mapping process in the JSON Action takes place.
> Important note: If i create a map in the JSON Action and send it to the 
> client everything is ok.
> alert which shows the Server generated JSON:
> {noformat}
> ServerJSON{"1":"1","2":"ANOTHERVALUE","ANOTHERKEY":"1","KEY":"VALUE"}
> {noformat}
> If i look into the sended data from javascript side in Eclipse i see in debug 
> mode:
> {noformat}
> this=>myJSONMap:{2=[Ljava.lang.String;@3caf7a1f, 
> 23=[Ljava.lang.String;@247aa859}
> {noformat}
> Alert shows on client side:
> {noformat}
> ClientJSON{"2":["ANOTHERVALUE"],"23":["1"]}
> {noformat}
> Hope it's clear where the problem is. Bug or misunderstood anything?
> Would like to have a List of keys,values where the keys can be 
> String/Long/Int and the values can be String/Long/int.
> The direction Server generated Map=>JSON is ok, sending the same from client 
> side will lose the entries with a String key.
> Further i tried also to specify my Map like
> {code:java}
> private Map propertyValueMap = new LinkedHashMap String>(); 
> {code}
> and set the getters/setters but don't work either.
> Here is a part of my code:
> JSP PAGE:
> {code:html}
> 
> testForm1
> 
> 

[jira] [Commented] (WW-3957) Multiple concurrent AJAX requests can collide

2016-03-02 Thread victorsosa (JIRA)

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

victorsosa commented on WW-3957:


This was fixed on issue WW-4573 using a CopyOnWriteArrayList. This is to keep 
Memory consistency on the ValueStack.

> Multiple concurrent AJAX requests can collide
> -
>
> Key: WW-3957
> URL: https://issues.apache.org/jira/browse/WW-3957
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Portlet
>Affects Versions: 2.3.8
> Environment: Liferay/Tomcat
>Reporter: Donat Iszak
> Fix For: 2.5
>
>
> If there are multiple AJAX request in the same time (and same HTTP Session) 
> they can somehow overwrite the concurrent thread's data (for example the 
> result location).
> Update:
> There is no conflict when we use resource URL, but when we use the action URL 
> the struts2 portlet plugin executes the interceptor stack twice:
> - First in Action phase: This runs normally the action, and saves the full 
> stack and response location to the http session. The PortletStateInterceptor 
> saves the stack, the PortletResult saves the location.
> - Second in Render phase: This phase restores the value stack and runs a 
> dummy action (DirectRenderFromEventAction) which does noting but returns the 
> previously saved response location from the session.
> The problem is that key for the http session objects is a constant (Location: 
> RENDER_DIRECT_LOCATION, Valuestack: STACK_FROM_EVENT_PHASE).
> Let's see an example, when there are two concurrent thread A,B:
> 1. A action phase  (saves locationA to session(RENDER_DIRECT_LOCATION), saves 
> stackA to session(STACK_FROM_EVENT_PHASE))
> 2. B action phase (saves locationB to session(RENDER_DIRECT_LOCATION), saves 
> stackB to session(STACK_FROM_EVENT_PHASE), so it overwrites locationA, 
> stackA!)
> 3. A render phase (loads stackB, locationB from session. Returns/forwards to 
> locationB) So it returns the response of the B thread too!
> 4. B render phase (loads stackB, locationB from session. Returns/forwards to 
> locationB)
> Possible solution is to add the threadId to the session key 
> (RENDER_DIRECT_LOCATION + ThreadId). This could cause a massive load to the 
> session so some clever clean up needed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-3957) Multiple concurrent AJAX requests can collide

2016-03-02 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-3957 at 3/2/16 7:14 PM:


I think this was fixed on issue WW-4573 using a CopyOnWriteArrayList. This is 
to keep Memory consistency on the ValueStack.

Location: RENDER_DIRECT_LOCATION is no managed but it is enough with the value 
stack and beside add more locking can affect performance.

Do you think this could be the fix?


was (Author: victorsosa):
This was fixed on issue WW-4573 using a CopyOnWriteArrayList. This is to keep 
Memory consistency on the ValueStack.

Location: RENDER_DIRECT_LOCATION is no managed but it is enough with the value 
stack and beside add more locking can affect performance.

> Multiple concurrent AJAX requests can collide
> -
>
> Key: WW-3957
> URL: https://issues.apache.org/jira/browse/WW-3957
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Portlet
>Affects Versions: 2.3.8
> Environment: Liferay/Tomcat
>Reporter: Donat Iszak
> Fix For: 2.5
>
>
> If there are multiple AJAX request in the same time (and same HTTP Session) 
> they can somehow overwrite the concurrent thread's data (for example the 
> result location).
> Update:
> There is no conflict when we use resource URL, but when we use the action URL 
> the struts2 portlet plugin executes the interceptor stack twice:
> - First in Action phase: This runs normally the action, and saves the full 
> stack and response location to the http session. The PortletStateInterceptor 
> saves the stack, the PortletResult saves the location.
> - Second in Render phase: This phase restores the value stack and runs a 
> dummy action (DirectRenderFromEventAction) which does noting but returns the 
> previously saved response location from the session.
> The problem is that key for the http session objects is a constant (Location: 
> RENDER_DIRECT_LOCATION, Valuestack: STACK_FROM_EVENT_PHASE).
> Let's see an example, when there are two concurrent thread A,B:
> 1. A action phase  (saves locationA to session(RENDER_DIRECT_LOCATION), saves 
> stackA to session(STACK_FROM_EVENT_PHASE))
> 2. B action phase (saves locationB to session(RENDER_DIRECT_LOCATION), saves 
> stackB to session(STACK_FROM_EVENT_PHASE), so it overwrites locationA, 
> stackA!)
> 3. A render phase (loads stackB, locationB from session. Returns/forwards to 
> locationB) So it returns the response of the B thread too!
> 4. B render phase (loads stackB, locationB from session. Returns/forwards to 
> locationB)
> Possible solution is to add the threadId to the session key 
> (RENDER_DIRECT_LOCATION + ThreadId). This could cause a massive load to the 
> session so some clever clean up needed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4176) Struts2 JSON Plugin: Send Map with Strings as Key to JSON Action is ignored, Numeric Keys will work and mapped

2016-03-02 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4176:


This issue could be fixed by this.

> Struts2 JSON Plugin: Send Map with Strings as Key to JSON Action is ignored, 
> Numeric Keys will work and mapped
> --
>
> Key: WW-4176
> URL: https://issues.apache.org/jira/browse/WW-4176
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.14.3
> Environment: Tomcat6, Struts 2.3.14.3,JSON Plugin 2.3.14.3,jquery
>Reporter: Stefan Abendroth
>Assignee: Lukasz Lenart
> Fix For: 2.5
>
> Attachments: WW-4176-proposal.patch
>
>
> Sending Map from javascript/jsp to JSON Action, when the Keys are numeric 
> everything works, when the keys are Strings then these entries are thrown 
> away while the mapping process in the JSON Action takes place.
> Important note: If i create a map in the JSON Action and send it to the 
> client everything is ok.
> alert which shows the Server generated JSON:
> {noformat}
> ServerJSON{"1":"1","2":"ANOTHERVALUE","ANOTHERKEY":"1","KEY":"VALUE"}
> {noformat}
> If i look into the sended data from javascript side in Eclipse i see in debug 
> mode:
> {noformat}
> this=>myJSONMap:{2=[Ljava.lang.String;@3caf7a1f, 
> 23=[Ljava.lang.String;@247aa859}
> {noformat}
> Alert shows on client side:
> {noformat}
> ClientJSON{"2":["ANOTHERVALUE"],"23":["1"]}
> {noformat}
> Hope it's clear where the problem is. Bug or misunderstood anything?
> Would like to have a List of keys,values where the keys can be 
> String/Long/Int and the values can be String/Long/int.
> The direction Server generated Map=>JSON is ok, sending the same from client 
> side will lose the entries with a String key.
> Further i tried also to specify my Map like
> {code:java}
> private Map propertyValueMap = new LinkedHashMap String>(); 
> {code}
> and set the getters/setters but don't work either.
> Here is a part of my code:
> JSP PAGE:
> {code:html}
> 
> testForm1
> 
> 

[jira] [Updated] (WW-4593) Easymock upgrade to 3.4

2016-03-03 Thread victorsosa (JIRA)

 [ 
https://issues.apache.org/jira/browse/WW-4593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

victorsosa updated WW-4593:
---
Labels: test  (was: )

> Easymock upgrade to 3.4
> ---
>
> Key: WW-4593
> URL: https://issues.apache.org/jira/browse/WW-4593
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions, Core Interceptors, Dispatch Filter
>Affects Versions: 2.3.24
>Reporter: victorsosa
>  Labels: test
> Fix For: 2.5
>
>
> This is the upgrade of the Easymock library for the unit tests
> Every unit test is changed to keep the same result but using the new API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4609) Getting access to fileitem objects through MultiPartRequestWrapper

2016-03-02 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4609:


I think we can't return a FileItem because this create a strong dependency on 
the FileUpload lib.  FileItem is a class from FileUpload commons.

Also you have 

public File[] getFile(String fieldName)

which return the file on  JakartaMultiPartRequest through the 
MultiPartRequestWrapper.

In this case the implementation shouldn't go out in the interface because you 
shouldn't be using a FileItem from FileUpload commons lib when you are using 
Struts2, it's that make sense.



> Getting access to fileitem objects through MultiPartRequestWrapper
> --
>
> Key: WW-4609
> URL: https://issues.apache.org/jira/browse/WW-4609
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Filippo Munafò
> Fix For: 2.3.25, 2.5
>
>
> Can you please change the MultiPartRequestWrapper, and the
> JakartaMultiPartRequest, adding a new method? The signature should be:
> public List getFileItems(String)
> Our action ancestor class needs to get access to the "files" properties of 
> JakartaMultiPartRequest through the MultiPartRequestWrapper. Otherwise we 
> need to code something similar to what is done by the 
> FileUploadInterceptor.intercept and create again the fileitem needed by our 
> application code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4610) ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper (or StrutsRequestWrapper) when using StrutsPrepareFilter

2016-03-03 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4610:


Fillipo,

You should check again FileUploadInterceptor.intercept implementation. Because 
the cast is the exact method used.
And the next filter should get a request instance of MultiPartRequestWrapper.

> ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper 
> (or StrutsRequestWrapper) when using StrutsPrepareFilter
> -
>
> Key: WW-4610
> URL: https://issues.apache.org/jira/browse/WW-4610
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24, 2.5
>Reporter: Filippo Munafò
> Fix For: 2.3.25, 2.5
>
>
> MultiPartRequestWrapper (or StrutsRequestWrapper) is created in 
> Dispatcher.wrapRequest but, there, it's not updated in ServletActionContext. 
> Probably the update is done later because FileUploadInterceptor.intercept has 
> access to the correct object; but using only StrutsPrepareFilter (instead of 
> an execute one) the method ServletActionContext.getRequest() never return the 
> MultiPartRequestWrapper (or StrutsRequestWrapper).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4610) ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper (or StrutsRequestWrapper) when using StrutsPrepareFilter

2016-03-03 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4610:


Yep, same place

> ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper 
> (or StrutsRequestWrapper) when using StrutsPrepareFilter
> -
>
> Key: WW-4610
> URL: https://issues.apache.org/jira/browse/WW-4610
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24, 2.5
>Reporter: Filippo Munafò
> Fix For: 2.3.25, 2.5
>
>
> MultiPartRequestWrapper (or StrutsRequestWrapper) is created in 
> Dispatcher.wrapRequest but, there, it's not updated in ServletActionContext. 
> Probably the update is done later because FileUploadInterceptor.intercept has 
> access to the correct object; but using only StrutsPrepareFilter (instead of 
> an execute one) the method ServletActionContext.getRequest() never return the 
> MultiPartRequestWrapper (or StrutsRequestWrapper).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4610) ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper (or StrutsRequestWrapper) when using StrutsPrepareFilter

2016-03-03 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4610 at 3/3/16 3:32 PM:


Yep, same place


was (Author: victorsosa):
Yep, same place

> ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper 
> (or StrutsRequestWrapper) when using StrutsPrepareFilter
> -
>
> Key: WW-4610
> URL: https://issues.apache.org/jira/browse/WW-4610
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24, 2.5
>Reporter: Filippo Munafò
> Fix For: 2.3.25, 2.5
>
>
> MultiPartRequestWrapper (or StrutsRequestWrapper) is created in 
> Dispatcher.wrapRequest but, there, it's not updated in ServletActionContext. 
> Probably the update is done later because FileUploadInterceptor.intercept has 
> access to the correct object; but using only StrutsPrepareFilter (instead of 
> an execute one) the method ServletActionContext.getRequest() never return the 
> MultiPartRequestWrapper (or StrutsRequestWrapper).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4558) contentType override ignored for JSONInterceptor

2016-03-03 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4558:


Ok

> contentType override ignored for JSONInterceptor
> 
>
> Key: WW-4558
> URL: https://issues.apache.org/jira/browse/WW-4558
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.24
>Reporter: Jasper Rosenberg
>Priority: Minor
> Fix For: 2.3.25
>
>
> JSONInterceptor takes a contentType parameter, but as far as I can tell does 
> nothing with it.  I would think a reasonable way to use it would be to have 
> it used if available, rather than the content type from the request so that 
> the interceptor can be used when receiving a JSON post from a third party 
> that does not set the correct content type.
> PR https://github.com/apache/struts/pull/87



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4593) Easymock upgrade to 3.4

2016-03-03 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4593:


OK, I will check this again soon

> Easymock upgrade to 3.4
> ---
>
> Key: WW-4593
> URL: https://issues.apache.org/jira/browse/WW-4593
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions, Core Interceptors, Dispatch Filter
>Affects Versions: 2.3.24
>Reporter: victorsosa
> Fix For: 2.5
>
>
> This is the upgrade of the Easymock library for the unit tests
> Every unit test is changed to keep the same result but using the new API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4610) ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper (or StrutsRequestWrapper) when using StrutsPrepareFilter

2016-03-03 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4610 at 3/3/16 2:10 PM:


You are right. I commit the code change please check that out.


was (Author: victorsosa):
You are right. 

> ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper 
> (or StrutsRequestWrapper) when using StrutsPrepareFilter
> -
>
> Key: WW-4610
> URL: https://issues.apache.org/jira/browse/WW-4610
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24, 2.5
>Reporter: Filippo Munafò
> Fix For: 2.3.25, 2.5
>
>
> MultiPartRequestWrapper (or StrutsRequestWrapper) is created in 
> Dispatcher.wrapRequest but, there, it's not updated in ServletActionContext. 
> Probably the update is done later because FileUploadInterceptor.intercept has 
> access to the correct object; but using only StrutsPrepareFilter (instead of 
> an execute one) the method ServletActionContext.getRequest() never return the 
> MultiPartRequestWrapper (or StrutsRequestWrapper).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4610) ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper (or StrutsRequestWrapper) when using StrutsPrepareFilter

2016-03-03 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4610:


You are right. 

> ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper 
> (or StrutsRequestWrapper) when using StrutsPrepareFilter
> -
>
> Key: WW-4610
> URL: https://issues.apache.org/jira/browse/WW-4610
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24, 2.5
>Reporter: Filippo Munafò
> Fix For: 2.3.25, 2.5
>
>
> MultiPartRequestWrapper (or StrutsRequestWrapper) is created in 
> Dispatcher.wrapRequest but, there, it's not updated in ServletActionContext. 
> Probably the update is done later because FileUploadInterceptor.intercept has 
> access to the correct object; but using only StrutsPrepareFilter (instead of 
> an execute one) the method ServletActionContext.getRequest() never return the 
> MultiPartRequestWrapper (or StrutsRequestWrapper).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4610) ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper (or StrutsRequestWrapper) when using StrutsPrepareFilter

2016-03-03 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4610 at 3/3/16 3:19 PM:


You are right. I commited the code change please check that out.


was (Author: victorsosa):
You are right. I commit the code change please check that out.

> ServletActionContext.getRequest() doesn't return the MultiPartRequestWrapper 
> (or StrutsRequestWrapper) when using StrutsPrepareFilter
> -
>
> Key: WW-4610
> URL: https://issues.apache.org/jira/browse/WW-4610
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24, 2.5
>Reporter: Filippo Munafò
> Fix For: 2.3.25, 2.5
>
>
> MultiPartRequestWrapper (or StrutsRequestWrapper) is created in 
> Dispatcher.wrapRequest but, there, it's not updated in ServletActionContext. 
> Probably the update is done later because FileUploadInterceptor.intercept has 
> access to the correct object; but using only StrutsPrepareFilter (instead of 
> an execute one) the method ServletActionContext.getRequest() never return the 
> MultiPartRequestWrapper (or StrutsRequestWrapper).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4622) [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

2016-04-01 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4622 at 4/1/16 2:03 PM:


Had you try another version? can you try tomcat 8?

also you can try  version 7.0.68 


was (Author: victorsosa):
Had you try another version? can you try tomcat 8?

> [struts2-tiles-plugin] [2.3.28] 
> [StrutsWildcardServletTilesApplicationContext] getRealPath
> --
>
> Key: WW-4622
> URL: https://issues.apache.org/jira/browse/WW-4622
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: Sebastien Leboucher
>Priority: Blocker
>
> Hi,
> Since version 2.3.28, the "struts2-tiles-plugin" API introduce a new listener 
> (StrutsWildcardServletTilesApplicationContext).
> This listener make a call to ServletContext.getRealPath method. 
> However this method can't be used with a tomcat "unpackWARs=false" deployment 
> scheme (https://wiki.apache.org/tomcat/RemoveUnpackWARs).
> Cause when war file is not exploded, this method return always "null".
> So i get a NullPointerException during context loading !
> Could you restore a classpath context loading ? As in the previous version ?
> thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4622) [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

2016-04-01 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4622:


Had you try another version? can you try tomcat 8?

> [struts2-tiles-plugin] [2.3.28] 
> [StrutsWildcardServletTilesApplicationContext] getRealPath
> --
>
> Key: WW-4622
> URL: https://issues.apache.org/jira/browse/WW-4622
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: Sebastien Leboucher
>Priority: Blocker
>
> Hi,
> Since version 2.3.28, the "struts2-tiles-plugin" API introduce a new listener 
> (StrutsWildcardServletTilesApplicationContext).
> This listener make a call to ServletContext.getRealPath method. 
> However this method can't be used with a tomcat "unpackWARs=false" deployment 
> scheme (https://wiki.apache.org/tomcat/RemoveUnpackWARs).
> Cause when war file is not exploded, this method return always "null".
> So i get a NullPointerException during context loading !
> Could you restore a classpath context loading ? As in the previous version ?
> thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4622) [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

2016-04-01 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4622:


Thanks guys, for the clarification the patch is on way.

> [struts2-tiles-plugin] [2.3.28] 
> [StrutsWildcardServletTilesApplicationContext] getRealPath
> --
>
> Key: WW-4622
> URL: https://issues.apache.org/jira/browse/WW-4622
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: Sebastien Leboucher
>Priority: Blocker
>
> Hi,
> Since version 2.3.28, the "struts2-tiles-plugin" API introduce a new listener 
> (StrutsWildcardServletTilesApplicationContext).
> This listener make a call to ServletContext.getRealPath method. 
> However this method can't be used with a tomcat "unpackWARs=false" deployment 
> scheme (https://wiki.apache.org/tomcat/RemoveUnpackWARs).
> Cause when war file is not exploded, this method return always "null".
> So i get a NullPointerException during context loading !
> Could you restore a classpath context loading ? As in the previous version ?
> thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4622) [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

2016-04-01 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4622:


[~aleksandr-m] I afraid so; We can't load the resource if the 
ServletContext.getRealPath() return Null. That was my initial reaction to this 
problem. But anyway we need to protect the API against NPE.

That part of loading the resource, right now is due to the container(tomcat, 
etc) and we depend on it.

> [struts2-tiles-plugin] [2.3.28] 
> [StrutsWildcardServletTilesApplicationContext] getRealPath
> --
>
> Key: WW-4622
> URL: https://issues.apache.org/jira/browse/WW-4622
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: Sebastien Leboucher
>Priority: Blocker
>
> Hi,
> Since version 2.3.28, the "struts2-tiles-plugin" API introduce a new listener 
> (StrutsWildcardServletTilesApplicationContext).
> This listener make a call to ServletContext.getRealPath method. 
> However this method can't be used with a tomcat "unpackWARs=false" deployment 
> scheme (https://wiki.apache.org/tomcat/RemoveUnpackWARs).
> Cause when war file is not exploded, this method return always "null".
> So i get a NullPointerException during context loading !
> Could you restore a classpath context loading ? As in the previous version ?
> thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4622) [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

2016-04-01 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4622 at 4/1/16 6:41 PM:


[~aleksandr-m] I afraid so; We can't load the resource if the 
ServletContext.getRealPath() return Null. That was my initial reaction to this 
problem. But anyway we need to protect the API against NPE.

That part of loading the resources, right now is due to the container(tomcat, 
etc) and we depend on it.


was (Author: victorsosa):
[~aleksandr-m] I afraid so; We can't load the resource if the 
ServletContext.getRealPath() return Null. That was my initial reaction to this 
problem. But anyway we need to protect the API against NPE.

That part of loading the resource, right now is due to the container(tomcat, 
etc) and we depend on it.

> [struts2-tiles-plugin] [2.3.28] 
> [StrutsWildcardServletTilesApplicationContext] getRealPath
> --
>
> Key: WW-4622
> URL: https://issues.apache.org/jira/browse/WW-4622
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: Sebastien Leboucher
>Priority: Blocker
>
> Hi,
> Since version 2.3.28, the "struts2-tiles-plugin" API introduce a new listener 
> (StrutsWildcardServletTilesApplicationContext).
> This listener make a call to ServletContext.getRealPath method. 
> However this method can't be used with a tomcat "unpackWARs=false" deployment 
> scheme (https://wiki.apache.org/tomcat/RemoveUnpackWARs).
> Cause when war file is not exploded, this method return always "null".
> So i get a NullPointerException during context loading !
> Could you restore a classpath context loading ? As in the previous version ?
> thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4622) [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

2016-04-01 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4622:


OK, what we can do is protect the struts API by avoiding the NPE.

This is the code right now:
URL url = new File(context.getRealPath(String.valueOf(path))).toURI().toURL();

it need to change to:
String filename = context.getRealPath(String.valueOf(path));
// check if filename is null
if(filename != null)
URL url = new File(filename).toURI().toURL();

Do you agree? Guys
This will avoid the NPE





> [struts2-tiles-plugin] [2.3.28] 
> [StrutsWildcardServletTilesApplicationContext] getRealPath
> --
>
> Key: WW-4622
> URL: https://issues.apache.org/jira/browse/WW-4622
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: Sebastien Leboucher
>Priority: Blocker
>
> Hi,
> Since version 2.3.28, the "struts2-tiles-plugin" API introduce a new listener 
> (StrutsWildcardServletTilesApplicationContext).
> This listener make a call to ServletContext.getRealPath method. 
> However this method can't be used with a tomcat "unpackWARs=false" deployment 
> scheme (https://wiki.apache.org/tomcat/RemoveUnpackWARs).
> Cause when war file is not exploded, this method return always "null".
> So i get a NullPointerException during context loading !
> Could you restore a classpath context loading ? As in the previous version ?
> thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4622) [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

2016-04-01 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4622:


I will submit a patch by the end of the day

> [struts2-tiles-plugin] [2.3.28] 
> [StrutsWildcardServletTilesApplicationContext] getRealPath
> --
>
> Key: WW-4622
> URL: https://issues.apache.org/jira/browse/WW-4622
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: Sebastien Leboucher
>Priority: Blocker
>
> Hi,
> Since version 2.3.28, the "struts2-tiles-plugin" API introduce a new listener 
> (StrutsWildcardServletTilesApplicationContext).
> This listener make a call to ServletContext.getRealPath method. 
> However this method can't be used with a tomcat "unpackWARs=false" deployment 
> scheme (https://wiki.apache.org/tomcat/RemoveUnpackWARs).
> Cause when war file is not exploded, this method return always "null".
> So i get a NullPointerException during context loading !
> Could you restore a classpath context loading ? As in the previous version ?
> thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4622) [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath

2016-04-01 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4622:


I don't see context.getResourceAsStream as a fix; it doesn't works, we need the 
path.

> [struts2-tiles-plugin] [2.3.28] 
> [StrutsWildcardServletTilesApplicationContext] getRealPath
> --
>
> Key: WW-4622
> URL: https://issues.apache.org/jira/browse/WW-4622
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: Sebastien Leboucher
>Priority: Blocker
>
> Hi,
> Since version 2.3.28, the "struts2-tiles-plugin" API introduce a new listener 
> (StrutsWildcardServletTilesApplicationContext).
> This listener make a call to ServletContext.getRealPath method. 
> However this method can't be used with a tomcat "unpackWARs=false" deployment 
> scheme (https://wiki.apache.org/tomcat/RemoveUnpackWARs).
> Cause when war file is not exploded, this method return always "null".
> So i get a NullPointerException during context loading !
> Could you restore a classpath context loading ? As in the previous version ?
> thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4623) Multiple tiles.xml in web.xml

2016-04-03 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4623 at 4/3/16 3:27 PM:


Guys, I found the issue.
Using the default loading

First the default var should be {code}"**/tiles*.xml"{code}

and right now is
{code}
public static final String TILES_DEFAULT_PATTERN = "tiles*.xml";
{code}

In this way can load all the tiles below /WEB-INF directory and even the nested 
files.

Also loading multiple file using  the code is not splitting 
using the commas for the differents files and loading them.


was (Author: victorsosa):
Guys, I found the issue.
Using the default loading

First the default var should be {code}"**/tiles*.xml"{code}

and right now is
{code}
public static final String TILES_DEFAULT_PATTERN = "tiles*.xml";
{code}

In this way can load all the tiles below /WEB-INF directory and even the nested 
files.

Also loading multiple file using  the code is not splitting 
using the commas for the differrents files and loading them.

>  Multiple tiles.xml in web.xml
> --
>
> Key: WW-4623
> URL: https://issues.apache.org/jira/browse/WW-4623
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: D Qiu
>Priority: Minor
>
> Using struts2.3.24.1, the application can find the definition in a.xml and 
> b.xml
> (web.xml)
> 
>   
> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
>   /WEB-INF/a.xml,/WEB-INF/b.xml
> 
> With struts2.3.28, the application generates 
> "org.apache.tiles.definition.NoSuchDefinitionException" xxx at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:625)
> (web.xml)
> 
>   
> org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
> /WEB-INF/a.xml,/WEB-INF/b.xml
> 
> --
> It works fine with a single file
> (web.xml)
> 
>   
> org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
> /WEB-INF/a.xml
> 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4623) Multiple tiles.xml in web.xml

2016-04-03 Thread victorsosa (JIRA)

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

victorsosa edited comment on WW-4623 at 4/3/16 3:25 PM:


Guys, I found the issue.
Using the default loading

First the default var should be {code}"**/tiles*.xml"{code}

and right now is
{code}
public static final String TILES_DEFAULT_PATTERN = "tiles*.xml";
{code}

In this way can load all the tiles below /WEB-INF directory and even the nested 
files.

Also loading multiple file using  the code is not splitting 
using the commas for the differrents files and loading them.


was (Author: victorsosa):
Guys, I found the issue.
Using the default loading

First the default var should be "**/tiles*.xml"

and right now is
{code}
public static final String TILES_DEFAULT_PATTERN = "tiles*.xml";
{code}

In this way can load all the tiles below /WEB-INF directory and even the nested 
files.

Also loading multiple file using  the code is not splitting 
using the commas for the differrents files and loading them.

>  Multiple tiles.xml in web.xml
> --
>
> Key: WW-4623
> URL: https://issues.apache.org/jira/browse/WW-4623
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: D Qiu
>Priority: Minor
>
> Using struts2.3.24.1, the application can find the definition in a.xml and 
> b.xml
> (web.xml)
> 
>   
> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
>   /WEB-INF/a.xml,/WEB-INF/b.xml
> 
> With struts2.3.28, the application generates 
> "org.apache.tiles.definition.NoSuchDefinitionException" xxx at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:625)
> (web.xml)
> 
>   
> org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
> /WEB-INF/a.xml,/WEB-INF/b.xml
> 
> --
> It works fine with a single file
> (web.xml)
> 
>   
> org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
> /WEB-INF/a.xml
> 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4623) Multiple tiles.xml in web.xml

2016-04-03 Thread victorsosa (JIRA)

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

victorsosa commented on WW-4623:


Guys, I found the issue.
Using the default loading

First the default var should be "**/tiles*.xml"

and right now is
{code}
public static final String TILES_DEFAULT_PATTERN = "tiles*.xml";
{code}

In this way can load all the tiles below /WEB-INF directory and even the nested 
files.

Also loading multiple file using  the code is not splitting 
using the commas for the differrents files and loading them.

>  Multiple tiles.xml in web.xml
> --
>
> Key: WW-4623
> URL: https://issues.apache.org/jira/browse/WW-4623
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.3.28
>Reporter: D Qiu
>Priority: Minor
>
> Using struts2.3.24.1, the application can find the definition in a.xml and 
> b.xml
> (web.xml)
> 
>   
> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
>   /WEB-INF/a.xml,/WEB-INF/b.xml
> 
> With struts2.3.28, the application generates 
> "org.apache.tiles.definition.NoSuchDefinitionException" xxx at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:625)
> (web.xml)
> 
>   
> org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
> /WEB-INF/a.xml,/WEB-INF/b.xml
> 
> --
> It works fine with a single file
> (web.xml)
> 
>   
> org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
> /WEB-INF/a.xml
> 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


  1   2   >