[jira] [Commented] (WW-5360) Struts 2 and JDK 17 numbers in locale

2024-01-22 Thread Alireza Fattahi (Jira)


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

Alireza Fattahi commented on WW-5360:
-

Thanks Lukasz! It will be great!

> Struts 2 and JDK 17 numbers in locale
> -
>
> Key: WW-5360
> URL: https://issues.apache.org/jira/browse/WW-5360
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 6.3.0
>Reporter: Alireza Fattahi
>Priority: Major
> Fix For: 6.4.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> With struts `6.3.0.1` and jdk 8 in locale `fa_IR` the below generates `1, 2, 
> 3,`
>  
> {code:java}
>          
>                     ,
>          {code}
>  
> By upgrading to jdk 17 It generates `۱, ۲, ۳,` ( these are Persian numbers 
> for `1, 2, 3,`)  
>  
> I have asked it at 
> [https://stackoverflow.com/questions/77250075/struts-2-and-jdk-17-numbers-in-locale]
>  and got a workaround by Roman C.
>  
> How ever I think this is something that could be fixed. Developers most of 
> the times, use `s:iterator` to generate numbers which will be used in their 
> code, not to show them to user. 
> So for example a loop which generates 10 inputboxs with names as `inputbox_1, 
> inputbox-2 ... `  will now generate `inputbox_۱, inputbox-۲ ... `.. lots of 
> things need to be changed. ( The JavaScript which you developed base on 
> English number, the name of the variables which was set in action ...)
> I suggest that the `s:iterator` always generates English number, or at list 
> has a property that can be configured. Or even we can configure this behavior 
> globally with an `struts.xml`.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (WW-5368) Access warning when get resource bundle which its name starts with "label"

2023-12-08 Thread Alireza Fattahi (Jira)


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

Alireza Fattahi commented on WW-5368:
-

Thanks [~lukaszlenart] 

I renamed the resource bundle and changed `label.reasonOfTransaction` to 
`labels.reasonOfTransaction` .  ( `label` -> `labels` )

So the tag will be `listValue="%\{getText('labels.reasonOfTransaction.'+top)}"

The warning is now gone!

I *think* that the resource bundle should not start with `label` when the 
`getText` is used in OGNL. 

> Access warning when get resource bundle which its name starts with "label"
> --
>
> Key: WW-5368
> URL: https://issues.apache.org/jira/browse/WW-5368
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 6.3.0
>Reporter: Alireza Fattahi
>Priority: Critical
> Fix For: 6.4.0
>
>
> The below:
> {code:java}
>  listKey="top" listValue="%{getText('label.reasonOfTransaction.'+top)}"/> 
> {code}
> generates this warning for each item in the list, so if the 
> `reasonOfTransactionList` has seven items I see this error seven time:
> {code:java}
> ognl.SecurityMemberAccess: Access to non-public [protected java.lang.String 
> org.apache.struts2.components.UIBean.label] is blocked!
>  
> {code}
>  
> But this works fine If I  just rename resource bundle and removes `label` 
> from its name
>  
> {code:java}
>  listKey="top" listValue="%{getText('reasonOfTransaction.'+top)}"/> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (WW-5368) Access warning when get resource bundle which its name starts with "label"

2023-12-06 Thread Alireza Fattahi (Jira)
Alireza Fattahi created WW-5368:
---

 Summary: Access warning when get resource bundle which its name 
starts with "label"
 Key: WW-5368
 URL: https://issues.apache.org/jira/browse/WW-5368
 Project: Struts 2
  Issue Type: Bug
  Components: Core
Affects Versions: 6.3.0
Reporter: Alireza Fattahi


The below:
{code:java}
 {code}
generates this warning for each item in the list, so if the 
`reasonOfTransactionList` has seven items I see this error seven time:
{code:java}
ognl.SecurityMemberAccess: Access to non-public [protected java.lang.String 
org.apache.struts2.components.UIBean.label] is blocked!
 
{code}
 

But this works fine If I  just rename resource bundle and removes `label` from 
its name

 
{code:java}
 {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (WW-5360) Struts 2 and JDK 17 numbers in locale

2023-11-01 Thread Alireza Fattahi (Jira)
Alireza Fattahi created WW-5360:
---

 Summary: Struts 2 and JDK 17 numbers in locale
 Key: WW-5360
 URL: https://issues.apache.org/jira/browse/WW-5360
 Project: Struts 2
  Issue Type: Improvement
  Components: Core
Affects Versions: 6.3.0
Reporter: Alireza Fattahi


With struts `6.3.0.1` and jdk 8 in locale `fa_IR` the below generates `1, 2, 3,`

 
{code:java}
         
                    ,
         {code}
 

By upgrading to jdk 17 It generates `۱, ۲, ۳,` ( these are Persian numbers for 
`1, 2, 3,`)  

 

I have asked it at 
[https://stackoverflow.com/questions/77250075/struts-2-and-jdk-17-numbers-in-locale]
 and got a workaround by Roman C.

 

How ever I think this is something that could be fixed. Developers most of the 
times, use `s:iterator` to generate numbers which will be used in their code, 
not to show them to user. 

So for example a loop which generates 10 inputboxs with names as `inputbox_1, 
inputbox-2 ... `  will now generate `inputbox_۱, inputbox-۲ ... `.. lots of 
things need to be changed. ( The JavaScript which you developed base on English 
number, the name of the variables which was set in action ...)

I suggest that the `s:iterator` always generates English number, or at list has 
a property that can be configured. Or even we can configure this behavior 
globally with an `struts.xml`.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (WW-5217) new OgnlContext() is removed

2022-08-29 Thread Alireza Fattahi (Jira)


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

Alireza Fattahi commented on WW-5217:
-

It works !

I have replace 
ognlExpression.getValue(new OgnlContext(), rootObject);
with
ognlExpression.getValue((OgnlContext) Ognl.createDefaultContext(null), 
rootObject);
 

> new OgnlContext() is removed
> 
>
> Key: WW-5217
> URL: https://issues.apache.org/jira/browse/WW-5217
> Project: Struts 2
>  Issue Type: Bug
>  Components: Expression Language
>Reporter: Alireza Fattahi
>Priority: Major
>
> We used the OGNL in our classes as below
>  
> {code:java}
> OgnlExpression ognlExpression = new OgnlExpression(expressionString);
> ognlExpression.getValue(new OgnlContext(), rootObject);{code}
>  
> The OgnlExpression is a simple wrapper.
>  
>  
> {code:java}
> public class OgnlExpression{
>     private Object expression;
>     private static final Logger LOG = 
> LoggerFactory.getLogger(OgnlExpression.class);
>     public OgnlExpression( String expressionString )
>         throws OgnlException
>     {
>         super();
>         expression = Ognl.parseExpression( expressionString );
>     }
>     public Object getExpression()
>     {
>         return expression;
>     }
>     public Object getValue( OgnlContext context, Object rootObject )
>         throws OgnlException
>     {
>         LOG.debug("parse the expression with OGNL");
>         return Ognl.getValue( getExpression(), context, rootObject );
>     }
>     public void setValue( OgnlContext context, Object rootObject, Object 
> value )
>         throws OgnlException
>     {
>         Ognl.setValue(getExpression(), context, rootObject, value);
>     }
> {code}
>  
> After upgrade to version 6, the `new OgnlContext()` constructor seems to be 
> removed. I test the `new OgnlContext(null,null,null)` but got illegal 
> argument exception.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (WW-5217) new OgnlContext() is removed

2022-08-28 Thread Alireza Fattahi (Jira)


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

Alireza Fattahi commented on WW-5217:
-

According to issue which you mentioned the 
[https://github.com/orphan-oss/ognl/pull/101/files] shows that the empty 
constructor was removed. 

Well, is there any work around for this so our code could still work ?!

> new OgnlContext() is removed
> 
>
> Key: WW-5217
> URL: https://issues.apache.org/jira/browse/WW-5217
> Project: Struts 2
>  Issue Type: Bug
>  Components: Expression Language
>Reporter: Alireza Fattahi
>Priority: Major
>
> We used the OGNL in our classes as below
>  
> {code:java}
> OgnlExpression ognlExpression = new OgnlExpression(expressionString);
> ognlExpression.getValue(new OgnlContext(), rootObject);{code}
>  
> The OgnlExpression is a simple wrapper.
>  
>  
> {code:java}
> public class OgnlExpression{
>     private Object expression;
>     private static final Logger LOG = 
> LoggerFactory.getLogger(OgnlExpression.class);
>     public OgnlExpression( String expressionString )
>         throws OgnlException
>     {
>         super();
>         expression = Ognl.parseExpression( expressionString );
>     }
>     public Object getExpression()
>     {
>         return expression;
>     }
>     public Object getValue( OgnlContext context, Object rootObject )
>         throws OgnlException
>     {
>         LOG.debug("parse the expression with OGNL");
>         return Ognl.getValue( getExpression(), context, rootObject );
>     }
>     public void setValue( OgnlContext context, Object rootObject, Object 
> value )
>         throws OgnlException
>     {
>         Ognl.setValue(getExpression(), context, rootObject, value);
>     }
> {code}
>  
> After upgrade to version 6, the `new OgnlContext()` constructor seems to be 
> removed. I test the `new OgnlContext(null,null,null)` but got illegal 
> argument exception.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (WW-5217) new OgnlContext() is removed

2022-08-28 Thread Alireza Fattahi (Jira)


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

Alireza Fattahi commented on WW-5217:
-

Thanks!

In the the project the struts `2.5.30` was used and the `ognl-3.1.29.jar` was 
imported ( I have not add OGNL in pom  and I think it was added as an struts 
dependency) .

In version 3.1.29 the OgnlContext() has an empty constructor. I decompile and 
it is as below

 
{code:java}

public OgnlContext() {
   this(null, null, null);
}{code}
 

> new OgnlContext() is removed
> 
>
> Key: WW-5217
> URL: https://issues.apache.org/jira/browse/WW-5217
> Project: Struts 2
>  Issue Type: Bug
>  Components: Expression Language
>Reporter: Alireza Fattahi
>Priority: Major
>
> We used the OGNL in our classes as below
>  
> {code:java}
> OgnlExpression ognlExpression = new OgnlExpression(expressionString);
> ognlExpression.getValue(new OgnlContext(), rootObject);{code}
>  
> The OgnlExpression is a simple wrapper.
>  
>  
> {code:java}
> public class OgnlExpression{
>     private Object expression;
>     private static final Logger LOG = 
> LoggerFactory.getLogger(OgnlExpression.class);
>     public OgnlExpression( String expressionString )
>         throws OgnlException
>     {
>         super();
>         expression = Ognl.parseExpression( expressionString );
>     }
>     public Object getExpression()
>     {
>         return expression;
>     }
>     public Object getValue( OgnlContext context, Object rootObject )
>         throws OgnlException
>     {
>         LOG.debug("parse the expression with OGNL");
>         return Ognl.getValue( getExpression(), context, rootObject );
>     }
>     public void setValue( OgnlContext context, Object rootObject, Object 
> value )
>         throws OgnlException
>     {
>         Ognl.setValue(getExpression(), context, rootObject, value);
>     }
> {code}
>  
> After upgrade to version 6, the `new OgnlContext()` constructor seems to be 
> removed. I test the `new OgnlContext(null,null,null)` but got illegal 
> argument exception.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-5217) new OgnlContext() is removed

2022-08-28 Thread Alireza Fattahi (Jira)


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

Alireza Fattahi updated WW-5217:

Description: 
We used the OGNL in our classes as below

 
{code:java}
OgnlExpression ognlExpression = new OgnlExpression(expressionString);
ognlExpression.getValue(new OgnlContext(), rootObject);{code}
 

The OgnlExpression is a simple wrapper.

 

 
{code:java}
public class OgnlExpression{
    private Object expression;
    private static final Logger LOG = 
LoggerFactory.getLogger(OgnlExpression.class);
    public OgnlExpression( String expressionString )
        throws OgnlException
    {
        super();
        expression = Ognl.parseExpression( expressionString );
    }
    public Object getExpression()
    {
        return expression;
    }
    public Object getValue( OgnlContext context, Object rootObject )
        throws OgnlException
    {
        LOG.debug("parse the expression with OGNL");
        return Ognl.getValue( getExpression(), context, rootObject );
    }
    public void setValue( OgnlContext context, Object rootObject, Object value )
        throws OgnlException
    {
        Ognl.setValue(getExpression(), context, rootObject, value);
    }
{code}
 

After upgrade to version 6, the `new OgnlContext()` constructor seems to be 
removed. I test the `new OgnlContext(null,null,null)` but got illegal argument 
exception.

 

  was:
We used the OGNL in our classes as below

 
{code:java}
OgnlExpression ognlExpression = new OgnlExpression(expressionString);
ognlExpression.getValue(new OgnlContext(), rootObject);{code}
 

After upgrade to version 6, the `new OgnlContext()` constructor seems to be 
removed. I test the `new OgnlContext(null,null,null)` but got illegal argument 
exception.

 


> new OgnlContext() is removed
> 
>
> Key: WW-5217
> URL: https://issues.apache.org/jira/browse/WW-5217
> Project: Struts 2
>  Issue Type: Bug
>  Components: Expression Language
>Reporter: Alireza Fattahi
>Priority: Major
>
> We used the OGNL in our classes as below
>  
> {code:java}
> OgnlExpression ognlExpression = new OgnlExpression(expressionString);
> ognlExpression.getValue(new OgnlContext(), rootObject);{code}
>  
> The OgnlExpression is a simple wrapper.
>  
>  
> {code:java}
> public class OgnlExpression{
>     private Object expression;
>     private static final Logger LOG = 
> LoggerFactory.getLogger(OgnlExpression.class);
>     public OgnlExpression( String expressionString )
>         throws OgnlException
>     {
>         super();
>         expression = Ognl.parseExpression( expressionString );
>     }
>     public Object getExpression()
>     {
>         return expression;
>     }
>     public Object getValue( OgnlContext context, Object rootObject )
>         throws OgnlException
>     {
>         LOG.debug("parse the expression with OGNL");
>         return Ognl.getValue( getExpression(), context, rootObject );
>     }
>     public void setValue( OgnlContext context, Object rootObject, Object 
> value )
>         throws OgnlException
>     {
>         Ognl.setValue(getExpression(), context, rootObject, value);
>     }
> {code}
>  
> After upgrade to version 6, the `new OgnlContext()` constructor seems to be 
> removed. I test the `new OgnlContext(null,null,null)` but got illegal 
> argument exception.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (WW-5217) new OgnlContext() is removed

2022-08-28 Thread Alireza Fattahi (Jira)
Alireza Fattahi created WW-5217:
---

 Summary: new OgnlContext() is removed
 Key: WW-5217
 URL: https://issues.apache.org/jira/browse/WW-5217
 Project: Struts 2
  Issue Type: Bug
  Components: Expression Language
Reporter: Alireza Fattahi


We used the OGNL in our classes as below

 
{code:java}
OgnlExpression ognlExpression = new OgnlExpression(expressionString);
ognlExpression.getValue(new OgnlContext(), rootObject);{code}
 

After upgrade to version 6, the `new OgnlContext()` constructor seems to be 
removed. I test the `new OgnlContext(null,null,null)` but got illegal argument 
exception.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (WW-5211) Error while upgrade to Struts 6 with struts jquery plugin

2022-08-27 Thread Alireza Fattahi (Jira)


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

Alireza Fattahi commented on WW-5211:
-

upgrading to Struts2 jquery plugin 5.0.0 fix the error

> Error while upgrade to Struts 6 with struts jquery plugin
> -
>
> Key: WW-5211
> URL: https://issues.apache.org/jira/browse/WW-5211
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 6.0.0
>Reporter: Alireza Fattahi
>Priority: Major
>
> We have upgraded from `Struts 2.5.30` to `Struts 6.0.0`. The project `Struts 
> 2 jquery plugin version 4.0.3`. 
> When loading a page we face this error:
> {code:java}
>     Could not load the FreeMarker template named 'div':
>     Attempted: /template/jquery/div.ftl
>     Attempted: /template/xhtml/div.ftl
>     Attempted: /template/simple/div.ftl
>     The TemplateLoader provided by the FreeMarker Configuration was a: 
> org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader
>     Could not open template{code}
> The stack trace cause is:
>  
> {code:java}
>     Caused by: freemarker.core.ParseException: Syntax error in template 
> "template/jquery/div.ftl" in line 22, column 43:
>     Using ?html (legacy escaping) is not allowed when auto-escaping is on 
> with a markup output format (HTML), to avoid double-escaping mistakes.
>         at freemarker.core.FMParser.BuiltIn(FMParser.java:1225)
>         at freemarker.core.FMParser.PrimaryExpression(FMParser.java:595)
>         at freemarker.core.FMParser.UnaryExpression(FMParser.java:707)
>         at 
> freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:822)
>  
> {code}
> The line 22 in file `template/jquery/div.ftl` is as:
>    
> {code:java}
>  <#if parameters.id??> id="${parameters.id?html}"<#rt/>{code}
> I am not familiar with `Freemaker` and I hope I could find a flag or 
> something to by pass this.
> I see the migration guide at 
> [https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration|http://example.com/]
>  and also 
> h[ttps://struts.apache.org/tag-developers/tag-syntax#escaping-body-of-a-tag|http://example.com/]
>  but could not find the issue
> I try to set `struts.ui.escapeHtmlBody` this in `struts.xml` but it did not 
> help.
> I find the the freemaker version in both `Struts 2.5.30` and `Struts 6.0.0` 
> is `Freemaker 2.3.31`. 
> also try to set freemaker.propeties with
> {code:java}
> auto_escaping_policy=disabled{code}
>  
> but it did no help



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-5211) Error while upgrade to Struts 6 with struts jquery plugin

2022-08-17 Thread Alireza Fattahi (Jira)


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

Alireza Fattahi updated WW-5211:

Description: 
We have upgraded from `Struts 2.5.30` to `Struts 6.0.0`. The project `Struts 2 
jquery plugin version 4.0.3`. 
When loading a page we face this error:
{code:java}
    Could not load the FreeMarker template named 'div':
    Attempted: /template/jquery/div.ftl
    Attempted: /template/xhtml/div.ftl
    Attempted: /template/simple/div.ftl
    The TemplateLoader provided by the FreeMarker Configuration was a: 
org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader
    Could not open template{code}
The stack trace cause is:

 
{code:java}
    Caused by: freemarker.core.ParseException: Syntax error in template 
"template/jquery/div.ftl" in line 22, column 43:
    Using ?html (legacy escaping) is not allowed when auto-escaping is on with 
a markup output format (HTML), to avoid double-escaping mistakes.
        at freemarker.core.FMParser.BuiltIn(FMParser.java:1225)
        at freemarker.core.FMParser.PrimaryExpression(FMParser.java:595)
        at freemarker.core.FMParser.UnaryExpression(FMParser.java:707)
        at freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:822)
 
{code}
The line 22 in file `template/jquery/div.ftl` is as:

   
{code:java}
 <#if parameters.id??> id="${parameters.id?html}"<#rt/>{code}
I am not familiar with `Freemaker` and I hope I could find a flag or something 
to by pass this.

I see the migration guide at 
[https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration|http://example.com/]
 and also 
h[ttps://struts.apache.org/tag-developers/tag-syntax#escaping-body-of-a-tag|http://example.com/]
 but could not find the issue

I try to set `struts.ui.escapeHtmlBody` this in `struts.xml` but it did not 
help.

I find the the freemaker version in both `Struts 2.5.30` and `Struts 6.0.0` is 
`Freemaker 2.3.31`. 

also try to set freemaker.propeties with
{code:java}
auto_escaping_policy=disabled{code}
 

but it did no help

  was:
We have upgraded to `Struts 6.0.0`. The project `Struts 2 jquery plugin version 
4.0.3`. 
When loading a page we face this error:
{code:java}
    Could not load the FreeMarker template named 'div':
    Attempted: /template/jquery/div.ftl
    Attempted: /template/xhtml/div.ftl
    Attempted: /template/simple/div.ftl
    The TemplateLoader provided by the FreeMarker Configuration was a: 
org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader
    Could not open template{code}

The stack trace cause is:

 
{code:java}
    Caused by: freemarker.core.ParseException: Syntax error in template 
"template/jquery/div.ftl" in line 22, column 43:
    Using ?html (legacy escaping) is not allowed when auto-escaping is on with 
a markup output format (HTML), to avoid double-escaping mistakes.
        at freemarker.core.FMParser.BuiltIn(FMParser.java:1225)
        at freemarker.core.FMParser.PrimaryExpression(FMParser.java:595)
        at freemarker.core.FMParser.UnaryExpression(FMParser.java:707)
        at freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:822)
 
{code}

The line 22 in file `template/jquery/div.ftl` is as:

   
{code:java}
 <#if parameters.id??> id="${parameters.id?html}"<#rt/>{code}
I am not familiar with `Freemaker` and I hope I could find a flag or something 
to by pass this.

I see the migration guide at 
[https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration|http://example.com]
 and also 
h[ttps://struts.apache.org/tag-developers/tag-syntax#escaping-body-of-a-tag|http://example.com]
 but could not find the issue

I try to set `struts.ui.escapeHtmlBody` this in `struts.xml` but it did not 
help.

 

also try to set freemaker.propeties with
{code:java}
auto_escaping_policy=disabled{code}
 

but it did no help


> Error while upgrade to Struts 6 with struts jquery plugin
> -
>
> Key: WW-5211
> URL: https://issues.apache.org/jira/browse/WW-5211
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 6.0.0
>Reporter: Alireza Fattahi
>Priority: Major
>
> We have upgraded from `Struts 2.5.30` to `Struts 6.0.0`. The project `Struts 
> 2 jquery plugin version 4.0.3`. 
> When loading a page we face this error:
> {code:java}
>     Could not load the FreeMarker template named 'div':
>     Attempted: /template/jquery/div.ftl
>     Attempted: /template/xhtml/div.ftl
>     Attempted: /template/simple/div.ftl
>     The TemplateLoader provided by the FreeMarker Configuration was a: 
> org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader
>     Could not open template{code}
> The stack trace cause is:
>  
> {code:java}
>     Caused by: freemarker.core.ParseException: Syntax error in template 
> 

[jira] [Created] (WW-5211) Error while upgrade to Struts 6 with struts jquery plugin

2022-08-17 Thread Alireza Fattahi (Jira)
Alireza Fattahi created WW-5211:
---

 Summary: Error while upgrade to Struts 6 with struts jquery plugin
 Key: WW-5211
 URL: https://issues.apache.org/jira/browse/WW-5211
 Project: Struts 2
  Issue Type: Bug
  Components: Core
Affects Versions: 6.0.0
Reporter: Alireza Fattahi


We have upgraded to `Struts 6.0.0`. The project `Struts 2 jquery plugin version 
4.0.3`. 
When loading a page we face this error:
{code:java}
    Could not load the FreeMarker template named 'div':
    Attempted: /template/jquery/div.ftl
    Attempted: /template/xhtml/div.ftl
    Attempted: /template/simple/div.ftl
    The TemplateLoader provided by the FreeMarker Configuration was a: 
org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader
    Could not open template{code}

The stack trace cause is:

 
{code:java}
    Caused by: freemarker.core.ParseException: Syntax error in template 
"template/jquery/div.ftl" in line 22, column 43:
    Using ?html (legacy escaping) is not allowed when auto-escaping is on with 
a markup output format (HTML), to avoid double-escaping mistakes.
        at freemarker.core.FMParser.BuiltIn(FMParser.java:1225)
        at freemarker.core.FMParser.PrimaryExpression(FMParser.java:595)
        at freemarker.core.FMParser.UnaryExpression(FMParser.java:707)
        at freemarker.core.FMParser.MultiplicativeExpression(FMParser.java:822)
 
{code}

The line 22 in file `template/jquery/div.ftl` is as:

   
{code:java}
 <#if parameters.id??> id="${parameters.id?html}"<#rt/>{code}
I am not familiar with `Freemaker` and I hope I could find a flag or something 
to by pass this.

I see the migration guide at 
[https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration|http://example.com]
 and also 
h[ttps://struts.apache.org/tag-developers/tag-syntax#escaping-body-of-a-tag|http://example.com]
 but could not find the issue

I try to set `struts.ui.escapeHtmlBody` this in `struts.xml` but it did not 
help.

 

also try to set freemaker.propeties with
{code:java}
auto_escaping_policy=disabled{code}
 

but it did no help



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (WW-4829) Set a global resource bundle in class

2017-07-31 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi edited comment on WW-4829 at 7/31/17 12:44 PM:
---

Can you please help me with this too:

Here is the code:

{code:java}
public class CustomStrutsTextProviderFactory extends StrutsTextProviderFactory {

@Override
protected TextProvider getTextProvider(Class clazz) {
   localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");
return new CustomTextProvider(clazz, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
  }

{code}

The code works, but for every request the 
*CustomStrutsTextProviderFactory.getTextProvider* is called. So the 
*localizedTextProvider.addDefaultResourceBundle* is called for every request. 
Although the   *AbstractLocalizedTextProvider.addDefaultResourceBundle* make 
sure bundle is not doesn't get added more than once it is not a good approch 
... 

I think the *CustomStrutsTextProviderFactory* could be write better, any idea!


was (Author: afattahi):
Can you please help me with this too:

Here is the code:

{code:java}
public class CustomStrutsTextProviderFactory extends StrutsTextProviderFactory {

@Override
protected TextProvider getTextProvider(Class clazz) {
   localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");
return new CustomTextProvider(clazz, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
  }

{code}

The code works, but for every request the 
*CustomStrutsTextProviderFactory.getTextProvider* is called. So the 
*localizedTextProvider.addDefaultResourceBundle* is called for every request. 
Although the   *AbstractLocalizedTextProvider.addDefaultResourceBundle* make 
sure bundle is not doesn't get added more than once ... I think the 
*CustomStrutsTextProviderFactory* could be write better.

> Set a global resource bundle in class 
> --
>
> Key: WW-4829
> URL: https://issues.apache.org/jira/browse/WW-4829
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Alireza Fattahi
> Fix For: 2.5.13
>
>
> In struts 2.5.12 the *LocalizedTextUtil* is removed.
> We used to `*LocalizedTextUtil.addDefaultResourceBundle*` in our classes to 
> add resource bundles. This was mentioned in 
> https://struts.apache.org/docs/how-do-i-set-a-global-resource-bundle.html
> Can you please let me know how this can be done with this change ?!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WW-4829) Set a global resource bundle in class

2017-07-31 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi commented on WW-4829:
-

Can you please help me with this too:

Here is the code:

{code:java}
public class CustomStrutsTextProviderFactory extends StrutsTextProviderFactory {

@Override
protected TextProvider getTextProvider(Class clazz) {
   localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");
return new CustomTextProvider(clazz, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
  }

{code}

The code works, but for every request the 
*CustomStrutsTextProviderFactory.getTextProvider* is called. So the 
*localizedTextProvider.addDefaultResourceBundle* is called for every request. 
Although the   *AbstractLocalizedTextProvider.addDefaultResourceBundle* make 
sure bundle is not doesn't get added more than once ... I think the 
*CustomStrutsTextProviderFactory* could be write better.

> Set a global resource bundle in class 
> --
>
> Key: WW-4829
> URL: https://issues.apache.org/jira/browse/WW-4829
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Alireza Fattahi
> Fix For: 2.5.13
>
>
> In struts 2.5.12 the *LocalizedTextUtil* is removed.
> We used to `*LocalizedTextUtil.addDefaultResourceBundle*` in our classes to 
> add resource bundles. This was mentioned in 
> https://struts.apache.org/docs/how-do-i-set-a-global-resource-bundle.html
> Can you please let me know how this can be done with this change ?!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (WW-4830) Override TextProvider doesnot work in struts 2.5.12

2017-07-30 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi edited comment on WW-4830 at 7/31/17 4:20 AM:
--

It worked, the sample helped a lot.

I will put some code here for others who may read :)

{code:xml}




{code}


And
{code:java}

public class CustomStrutsTextProviderFactory extends StrutsTextProviderFactory {

@Override
protected TextProvider getTextProvider(Class clazz) {
   //If you want to optionaly add some resource bundles dynamically 
you can do it here

//localizedTextProvider.addDefaultResourceBundle("messages/label");

//localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");
return new CustomTextProvider(clazz, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}

@Override
protected TextProvider getTextProvider(ResourceBundle bundle) {
 //If you want to optionaly add some resource bundles 
dynamically you can do it here

//localizedTextProvider.addDefaultResourceBundle("messages/label");

//localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");

return new CustomTextProvider(bundle, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}
}

{code}

And the CustomTextProvider  which you can play with get text.

{code:java}

public class CustomTextProvider extends TextProviderSupport {

public CustomTextProvider(Class clazz, LocaleProvider provider, 
LocalizedTextProvider localizedTextProvider) {
super(clazz, provider, localizedTextProvider);
}

public CustomTextProvider(ResourceBundle bundle, LocaleProvider 
provider, LocalizedTextProvider localizedTextProvider) {
super(bundle, provider, localizedTextProvider);
}

public String getText(String key, String defaultValue, List args) {
String text = super.getText(key, defaultValue, args);
//Do some thing with text
  //for example return text.trim();
  }

   //Override other getText if you need


{code}

Please correct me. Thanks for the help


was (Author: afattahi):
It worked, the sample helped a lot.

I will put some code here for others who may read :)

{code:xml}




{code}


And
{code:java}

public class CustomStrutsTextProviderFactory extends StrutsTextProviderFactory {

@Override
protected TextProvider getTextProvider(Class clazz) {
   //If you want to optionaly add some resource bundles dynamically 
you can do it here

//localizedTextProvider.addDefaultResourceBundle("messages/label");

//localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");
return new CustomTextProvider(clazz, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}

@Override
protected TextProvider getTextProvider(ResourceBundle bundle) {
 //If you want to optionaly add some resource bundles 
dynamically you can do it here

//localizedTextProvider.addDefaultResourceBundle("messages/label");

//localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");

return new CustomTextProvider(bundle, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}
}

{code}

And the CustomTextProvider  which you can play with get text.

{code:java}

public class CustomTextProvider extends TextProviderSupport {

public CustomTextProvider(Class clazz, LocaleProvider provider, 
LocalizedTextProvider localizedTextProvider) {
super(clazz, provider, localizedTextProvider);
}

public CustomTextProvider(ResourceBundle bundle, LocaleProvider 
provider, LocalizedTextProvider localizedTextProvider) {
super(bundle, provider, localizedTextProvider);
}

public String getText(String key, String defaultValue, List args) {
String text = super.getText(key, defaultValue, args);
//Do some thing with text
  return;
  }

   //Override other getText if you need


{code}

Please correct me. Thanks for the help

> Override TextProvider doesnot work in struts 2.5.12
> ---
>
> Key: WW-4830
> URL: https://issues.apache.org/jira/browse/WW-4830
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Alireza Fattahi
> Fix For: 2.5.13
>
>
> In struts 2.3 , to override the TextProvider we used below
> {code:xml}
>   
>

[jira] [Comment Edited] (WW-4830) Override TextProvider doesnot work in struts 2.5.12

2017-07-30 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi edited comment on WW-4830 at 7/31/17 4:18 AM:
--

It worked, the sample helped a lot.

I will put some code here for others who may read :)

{code:xml}




{code}


And
{code:java}

public class CustomStrutsTextProviderFactory extends StrutsTextProviderFactory {

@Override
protected TextProvider getTextProvider(Class clazz) {
   //If you want to optionaly add some resource bundles dynamically 
you can do it here

//localizedTextProvider.addDefaultResourceBundle("messages/label");

//localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");
return new CustomTextProvider(clazz, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}

@Override
protected TextProvider getTextProvider(ResourceBundle bundle) {
 //If you want to optionaly add some resource bundles 
dynamically you can do it here

//localizedTextProvider.addDefaultResourceBundle("messages/label");

//localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");

return new CustomTextProvider(bundle, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}
}

{code}

And the CustomTextProvider  which you can play with get text.

{code:java}

public class CustomTextProvider extends TextProviderSupport {

public CustomTextProvider(Class clazz, LocaleProvider provider, 
LocalizedTextProvider localizedTextProvider) {
super(clazz, provider, localizedTextProvider);
}

public CustomTextProvider(ResourceBundle bundle, LocaleProvider 
provider, LocalizedTextProvider localizedTextProvider) {
super(bundle, provider, localizedTextProvider);
}

public String getText(String key, String defaultValue, List args) {
String text = super.getText(key, defaultValue, args);
//Do some thing with text
  return;
  }

   //Override other getText if you need


{code}

Please correct me. Thanks for the help


was (Author: afattahi):
It worked, the sample helped a lot.

I will put some code here for others who may read :)

{code}




{code}


And
{code:java}

public class CustomStrutsTextProviderFactory extends StrutsTextProviderFactory {

@Override
protected TextProvider getTextProvider(Class clazz) {
   //If you want to optionaly add some resource bundles dynamically 
you can do it here

localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");
return new CustomTextProvider(clazz, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}

@Override
protected TextProvider getTextProvider(ResourceBundle bundle) {
 //If you want to optionaly add some resource bundles 
dynamically you can do it here

localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");

return new CustomTextProvider(bundle, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}
}

{code}

And the CustomTextProvider  which you can play with get text.

{code:java}

public class CustomTextProvider extends TextProviderSupport {

public CustomTextProvider(Class clazz, LocaleProvider provider, 
LocalizedTextProvider localizedTextProvider) {
super(clazz, provider, localizedTextProvider);
}

public CustomTextProvider(ResourceBundle bundle, LocaleProvider 
provider, LocalizedTextProvider localizedTextProvider) {
super(bundle, provider, localizedTextProvider);
}

public String getText(String key, String defaultValue, List args) {
String text = super.getText(key, defaultValue, args);
//Do some thing with text
  return;
  }

   //Override other getText if you need


{code}

Please correct me. Thanks for the help

> Override TextProvider doesnot work in struts 2.5.12
> ---
>
> Key: WW-4830
> URL: https://issues.apache.org/jira/browse/WW-4830
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Alireza Fattahi
> Fix For: 2.5.13
>
>
> In struts 2.3 , to override the TextProvider we used below
> {code:xml}
>   
>name="DefaultTextProvider" 

[jira] [Comment Edited] (WW-4830) Override TextProvider doesnot work in struts 2.5.12

2017-07-30 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi edited comment on WW-4830 at 7/31/17 4:17 AM:
--

It worked, the sample helped a lot.

I will put some code here for others who may read :)

{code}




{code}


And
{code:java}

public class CustomStrutsTextProviderFactory extends StrutsTextProviderFactory {

@Override
protected TextProvider getTextProvider(Class clazz) {
   //If you want to optionaly add some resource bundles dynamically 
you can do it here

localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");
return new CustomTextProvider(clazz, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}

@Override
protected TextProvider getTextProvider(ResourceBundle bundle) {
 //If you want to optionaly add some resource bundles 
dynamically you can do it here

localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");

return new CustomTextProvider(bundle, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}
}

{code}

And the CustomTextProvider  which you can play with get text.

{code:java}

public class CustomTextProvider extends TextProviderSupport {

public CustomTextProvider(Class clazz, LocaleProvider provider, 
LocalizedTextProvider localizedTextProvider) {
super(clazz, provider, localizedTextProvider);
}

public CustomTextProvider(ResourceBundle bundle, LocaleProvider 
provider, LocalizedTextProvider localizedTextProvider) {
super(bundle, provider, localizedTextProvider);
}

public String getText(String key, String defaultValue, List args) {
String text = super.getText(key, defaultValue, args);
//Do some thing with text
  return;
  }

   //Override other getText if you need


{code}

Please correct me. Thanks for the help


was (Author: afattahi):
It worked, the sample helped a lot.

I will put some code here for others who may read :)

{code}




{code}


And
{code:java}

public class CustomStrutsTextProviderFactory extends StrutsTextProviderFactory {

@Override
protected TextProvider getTextProvider(Class clazz) {

localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");
return new CustomTextProvider(clazz, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}

@Override
protected TextProvider getTextProvider(ResourceBundle bundle) {

localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");

return new CustomTextProvider(bundle, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}
}

{code}

And the CustomTextProvider  which you can play with get text.

{code:java}

public class CustomTextProvider extends TextProviderSupport {

public CustomTextProvider(Class clazz, LocaleProvider provider, 
LocalizedTextProvider localizedTextProvider) {
super(clazz, provider, localizedTextProvider);
}

public CustomTextProvider(ResourceBundle bundle, LocaleProvider 
provider, LocalizedTextProvider localizedTextProvider) {
super(bundle, provider, localizedTextProvider);
}

public String getText(String key, String defaultValue, List args) {
String text = super.getText(key, defaultValue, args);
//Do some thing with text
  return;
  }

   //Override other getText if you need


{code}

Please correct me. Thanks for the help

> Override TextProvider doesnot work in struts 2.5.12
> ---
>
> Key: WW-4830
> URL: https://issues.apache.org/jira/browse/WW-4830
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Alireza Fattahi
> Fix For: 2.5.13
>
>
> In struts 2.3 , to override the TextProvider we used below
> {code:xml}
>   
>name="DefaultTextProvider" class=".utils.CustomTextProvider" scope="default" 
> />
> {code}
> And make CustomTextProvider
> {code}
> public class CustomTextProvider extends DefaultTextProvider{
> public String getText(String key, String 

[jira] [Commented] (WW-4829) Set a global resource bundle in class

2017-07-30 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi commented on WW-4829:
-

Thanks !
I put some code at https://issues.apache.org/jira/browse/WW-4830 for whom has 
same issue.

> Set a global resource bundle in class 
> --
>
> Key: WW-4829
> URL: https://issues.apache.org/jira/browse/WW-4829
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Alireza Fattahi
> Fix For: 2.5.13
>
>
> In struts 2.5.12 the *LocalizedTextUtil* is removed.
> We used to `*LocalizedTextUtil.addDefaultResourceBundle*` in our classes to 
> add resource bundles. This was mentioned in 
> https://struts.apache.org/docs/how-do-i-set-a-global-resource-bundle.html
> Can you please let me know how this can be done with this change ?!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (WW-4830) Override TextProvider doesnot work in struts 2.5.12

2017-07-30 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi commented on WW-4830:
-

It worked, the sample helped a lot.

I will put some code here for others who may read :)

{code}




{code}


And
{code:java}

public class CustomStrutsTextProviderFactory extends StrutsTextProviderFactory {

@Override
protected TextProvider getTextProvider(Class clazz) {

localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");
return new CustomTextProvider(clazz, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}

@Override
protected TextProvider getTextProvider(ResourceBundle bundle) {

localizedTextProvider.addDefaultResourceBundle("messages/label");

localizedTextProvider.addDefaultResourceBundle("messages/customerA/label");

return new CustomTextProvider(bundle, 
localeProviderFactory.createLocaleProvider(), localizedTextProvider);
}
}

{code}

And the CustomTextProvider  which you can play with get text.

{code:java}

public class CustomTextProvider extends TextProviderSupport {

public CustomTextProvider(Class clazz, LocaleProvider provider, 
LocalizedTextProvider localizedTextProvider) {
super(clazz, provider, localizedTextProvider);
}

public CustomTextProvider(ResourceBundle bundle, LocaleProvider 
provider, LocalizedTextProvider localizedTextProvider) {
super(bundle, provider, localizedTextProvider);
}

public String getText(String key, String defaultValue, List args) {
String text = super.getText(key, defaultValue, args);
//Do some thing with text
  return;
  }

   //Override other getText if you need


{code}

Please correct me. Thanks for the help

> Override TextProvider doesnot work in struts 2.5.12
> ---
>
> Key: WW-4830
> URL: https://issues.apache.org/jira/browse/WW-4830
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.12
>Reporter: Alireza Fattahi
> Fix For: 2.5.13
>
>
> In struts 2.3 , to override the TextProvider we used below
> {code:xml}
>   
>name="DefaultTextProvider" class=".utils.CustomTextProvider" scope="default" 
> />
> {code}
> And make CustomTextProvider
> {code}
> public class CustomTextProvider extends DefaultTextProvider{
> public String getText(String key, String defaultValue, List args) {
> String text = super.getText(key, defaultValue, args);
> //Do something with the text
> //and return it
> }
>  //other getText methods can be override too
> }
> {code}
> This seems not to be worked at Struts 2.15.2. 
> To make some test, I remove my bean from* strust.xml* and put some break 
> points in *DefaultTextProvider *the *getText *of this class is not called, 
> however I find that the *TextProviderSupport **getText *method is called. 
> Should we override other classes ?!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (WW-4830) Override TextProvider doesnot work in struts 2.5.12

2017-07-30 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4830:
---

 Summary: Override TextProvider doesnot work in struts 2.5.12
 Key: WW-4830
 URL: https://issues.apache.org/jira/browse/WW-4830
 Project: Struts 2
  Issue Type: Bug
  Components: Core
Affects Versions: 2.5.12
Reporter: Alireza Fattahi


In struts 2.3 , to override the TextProvider we used below

{code:xml}




{code}

And make CustomTextProvider

{code}
public class CustomTextProvider extends DefaultTextProvider{

public String getText(String key, String defaultValue, List args) {
String text = super.getText(key, defaultValue, args);
//Do something with the text
//and return it
}

 //other getText methods can be override too
}
{code}

This seems not to be worked at Struts 2.15.2. 

To make some test, I remove my bean from* strust.xml* and put some break points 
in *DefaultTextProvider *the *getText *of this class is not called, however I 
find that the *TextProviderSupport **getText *method is called. 

Should we override other classes ?!




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WW-4829) Set a global resource bundle in class

2017-07-29 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi updated WW-4829:

Description: 
In struts 2.5.12 the *LocalizedTextUtil* is removed.

We used to `*LocalizedTextUtil.addDefaultResourceBundle*` in our classes to add 
resource bundles. This was mentioned in 
https://struts.apache.org/docs/how-do-i-set-a-global-resource-bundle.html

Can you please let me know how this can be done with this change ?!


  was:
In struts 2.5.12 the LocalizedTextUtil is removed.

We used to ` LocalizedTextUtil.addDefaultResourceBundle` in our classes. 

Can you please let me know how this can be done with this change. I think it 
will be a good idea to update this page also:  
LocalizedTextUtil.addDefaultResourceBundle


> Set a global resource bundle in class 
> --
>
> Key: WW-4829
> URL: https://issues.apache.org/jira/browse/WW-4829
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Reporter: Alireza Fattahi
> Fix For: 2.5.x
>
>
> In struts 2.5.12 the *LocalizedTextUtil* is removed.
> We used to `*LocalizedTextUtil.addDefaultResourceBundle*` in our classes to 
> add resource bundles. This was mentioned in 
> https://struts.apache.org/docs/how-do-i-set-a-global-resource-bundle.html
> Can you please let me know how this can be done with this change ?!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (WW-4829) Set a global resource bundle in class

2017-07-29 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4829:
---

 Summary: Set a global resource bundle in class 
 Key: WW-4829
 URL: https://issues.apache.org/jira/browse/WW-4829
 Project: Struts 2
  Issue Type: Bug
  Components: Core
Reporter: Alireza Fattahi
 Fix For: 2.5.x


In struts 2.5.12 the LocalizedTextUtil is removed.

We used to ` LocalizedTextUtil.addDefaultResourceBundle` in our classes. 

Can you please let me know how this can be done with this change. I thinl it 
will be a good idea to update this page also:  
LocalizedTextUtil.addDefaultResourceBundle



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WW-4829) Set a global resource bundle in class

2017-07-29 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi updated WW-4829:

Description: 
In struts 2.5.12 the LocalizedTextUtil is removed.

We used to ` LocalizedTextUtil.addDefaultResourceBundle` in our classes. 

Can you please let me know how this can be done with this change. I think it 
will be a good idea to update this page also:  
LocalizedTextUtil.addDefaultResourceBundle

  was:
In struts 2.5.12 the LocalizedTextUtil is removed.

We used to ` LocalizedTextUtil.addDefaultResourceBundle` in our classes. 

Can you please let me know how this can be done with this change. I thinl it 
will be a good idea to update this page also:  
LocalizedTextUtil.addDefaultResourceBundle


> Set a global resource bundle in class 
> --
>
> Key: WW-4829
> URL: https://issues.apache.org/jira/browse/WW-4829
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Reporter: Alireza Fattahi
> Fix For: 2.5.x
>
>
> In struts 2.5.12 the LocalizedTextUtil is removed.
> We used to ` LocalizedTextUtil.addDefaultResourceBundle` in our classes. 
> Can you please let me know how this can be done with this change. I think it 
> will be a good idea to update this page also:  
> LocalizedTextUtil.addDefaultResourceBundle



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (WW-4728) JSONValidationInterceptor change ststic parameters names

2016-12-20 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi updated WW-4728:

Description: 
For security reasons I want to not reveal that we are using struts2 in our 
site. But the hackers can find it if they see the hidden parameters in the 
request.

Is it possible to make below parameters configurable ( For example in 
struts.xml)

{code}
public static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
public static final String VALIDATE_JSON_PARAM = "struts.enableJSONValidation";
public static final String NO_ENCODING_SET_PARAM = 
"struts.JSONValidation.no.encoding";
{code}

  was:
For security reasons I want to not reveal that we are using struts2 in our 
site. But the hackers can find it if they see the hidden parameters in the 
request.

Is it possible to make below parameters configurable ( For example in 
struts.xml)


public static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
public static final String VALIDATE_JSON_PARAM = 
"struts.enableJSONValidation";
public static final String NO_ENCODING_SET_PARAM = 
"struts.JSONValidation.no.encoding";



> JSONValidationInterceptor change ststic parameters names
> 
>
> Key: WW-4728
> URL: https://issues.apache.org/jira/browse/WW-4728
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Reporter: Alireza Fattahi
>
> For security reasons I want to not reveal that we are using struts2 in our 
> site. But the hackers can find it if they see the hidden parameters in the 
> request.
> Is it possible to make below parameters configurable ( For example in 
> struts.xml)
> {code}
> public static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
> public static final String VALIDATE_JSON_PARAM = 
> "struts.enableJSONValidation";
> public static final String NO_ENCODING_SET_PARAM = 
> "struts.JSONValidation.no.encoding";
> {code}



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


[jira] [Created] (WW-4728) JSONValidationInterceptor change ststic parameters names

2016-12-20 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4728:
---

 Summary: JSONValidationInterceptor change ststic parameters names
 Key: WW-4728
 URL: https://issues.apache.org/jira/browse/WW-4728
 Project: Struts 2
  Issue Type: Bug
  Components: Plugin - JSON
Reporter: Alireza Fattahi


For security reasons I want to not reveal that we are using struts2 in our 
site. But the hackers can find it if they see the hidden parameters in the 
request.

Is it possible to make below parameters configurable ( For example in 
struts.xml)


public static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
public static final String VALIDATE_JSON_PARAM = 
"struts.enableJSONValidation";
public static final String NO_ENCODING_SET_PARAM = 
"struts.JSONValidation.no.encoding";




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


[jira] [Created] (WW-4687) Struts 2 make fileUpload parameters dynamic

2016-09-08 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4687:
---

 Summary: Struts 2 make fileUpload parameters dynamic
 Key: WW-4687
 URL: https://issues.apache.org/jira/browse/WW-4687
 Project: Struts 2
  Issue Type: Improvement
Reporter: Alireza Fattahi


In a struts 2 application ... we use `fileUpload` interceptor to get file from 
user.

The `fileUpload`  has some configurations `maximumSize` , `allowedTypes` , 
`allowedExtensions` that can be used as:

{code}
 

[jira] [Commented] (WW-4637) Unable to process Jar entry (javassist-3.20.0-GA.jar)

2016-05-21 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi commented on WW-4637:
-

Thanks. I solve it by adding below to catalina.properties

{code:xml}
tomcat.util.scan.DefaultJarScanner.jarsToSkip=javassist-*.jar
{code}

> Unable to process Jar entry (javassist-3.20.0-GA.jar)
> -
>
> Key: WW-4637
> URL: https://issues.apache.org/jira/browse/WW-4637
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.5
> Environment: Tomcat 7.0.54 jdk 1.7.0_21
>Reporter: Alireza Fattahi
>Priority: Blocker
>
> I got below error during start up, which seems to be an error during parsing 
> javassit.jar:
> {code:java}
> May 21, 2016 9:58:26 AM org.apache.catalina.startup.ContextConfig 
> processAnnotationsJar
> SEVERE: Unable to process Jar entry 
> [javassist/util/proxy/SerializedProxy$1.class] from Jar 
> [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Saba/WEB-INF/lib/javassist-3.20.0-GA.jar!/]
>  for annotations
> java.io.EOFException
>   at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
>   at 
> org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:796)
>   at 
> org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
>   at 
> org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:57)
>   at org.apache.tomcat.util.bcel.classfile.Method.(Method.java:71)
>   at 
> org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
>   at 
> org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
>   at 
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
>   at 
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
>   at 
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
>   at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>   at 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>   at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
>   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>   at 
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
>   at 
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
>   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>   at java.lang.Thread.run(Thread.java:722)
> May 21, 2016 9:58:26 AM org.apache.catalina.startup.ContextConfig 
> processAnnotationsJar
> SEVERE: Unable to process Jar entry 
> [javassist/util/proxy/SerializedProxy.class] from Jar 
> [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Saba/WEB-INF/lib/javassist-3.20.0-GA.jar!/]
>  for annotations
> java.io.EOFException
>   at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
>   at 
> org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:797)
>   at 
> org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
>   at 
> org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:57)
>   at org.apache.tomcat.util.bcel.classfile.Method.(Method.java:71)
>   at 
> org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
>   at 
> org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
>   at 
> 

[jira] [Updated] (WW-4637) Unable to process Jar entry (javassist-3.20.0-GA.jar)

2016-05-20 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi updated WW-4637:

Environment: Tomcat 7.0.54 jdk 1.7.0_21  (was: Tomcat 7.0.54)

> Unable to process Jar entry (javassist-3.20.0-GA.jar)
> -
>
> Key: WW-4637
> URL: https://issues.apache.org/jira/browse/WW-4637
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.5
> Environment: Tomcat 7.0.54 jdk 1.7.0_21
>Reporter: Alireza Fattahi
>Priority: Blocker
>
> I got below error during start up, which seems to be an error during parsing 
> javassit.jar:
> {code:java}
> May 21, 2016 9:58:26 AM org.apache.catalina.startup.ContextConfig 
> processAnnotationsJar
> SEVERE: Unable to process Jar entry 
> [javassist/util/proxy/SerializedProxy$1.class] from Jar 
> [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Saba/WEB-INF/lib/javassist-3.20.0-GA.jar!/]
>  for annotations
> java.io.EOFException
>   at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
>   at 
> org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:796)
>   at 
> org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
>   at 
> org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:57)
>   at org.apache.tomcat.util.bcel.classfile.Method.(Method.java:71)
>   at 
> org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
>   at 
> org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
>   at 
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
>   at 
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
>   at 
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
>   at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>   at 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>   at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
>   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>   at 
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
>   at 
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
>   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>   at java.lang.Thread.run(Thread.java:722)
> May 21, 2016 9:58:26 AM org.apache.catalina.startup.ContextConfig 
> processAnnotationsJar
> SEVERE: Unable to process Jar entry 
> [javassist/util/proxy/SerializedProxy.class] from Jar 
> [jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Saba/WEB-INF/lib/javassist-3.20.0-GA.jar!/]
>  for annotations
> java.io.EOFException
>   at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
>   at 
> org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:797)
>   at 
> org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
>   at 
> org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:57)
>   at org.apache.tomcat.util.bcel.classfile.Method.(Method.java:71)
>   at 
> org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
>   at 
> org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
>   at 
> org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
>   at 
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
>   at 
> 

[jira] [Updated] (WW-4637) Unable to process Jar entry (javassist-3.20.0-GA.jar)

2016-05-20 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi updated WW-4637:

Description: 
I got below error during start up, which seems to be an error during parsing 
javassit.jar:

{code:java}
May 21, 2016 9:58:26 AM org.apache.catalina.startup.ContextConfig 
processAnnotationsJar
SEVERE: Unable to process Jar entry 
[javassist/util/proxy/SerializedProxy$1.class] from Jar 
[jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Saba/WEB-INF/lib/javassist-3.20.0-GA.jar!/]
 for annotations
java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
at 
org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:796)
at 
org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
at 
org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:57)
at org.apache.tomcat.util.bcel.classfile.Method.(Method.java:71)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
at 
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
at 
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
at 
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)

May 21, 2016 9:58:26 AM org.apache.catalina.startup.ContextConfig 
processAnnotationsJar
SEVERE: Unable to process Jar entry 
[javassist/util/proxy/SerializedProxy.class] from Jar 
[jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Saba/WEB-INF/lib/javassist-3.20.0-GA.jar!/]
 for annotations
java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
at 
org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:797)
at 
org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
at 
org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:57)
at org.apache.tomcat.util.bcel.classfile.Method.(Method.java:71)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
at 
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
at 
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
at 
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at 

[jira] [Updated] (WW-4637) Unable to process Jar entry (javassist-3.20.0-GA.jar)

2016-05-20 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi updated WW-4637:

Description: 
I got below error during start up, which seems to be an error during parsing 
javassit.jar:



May 21, 2016 9:58:26 AM org.apache.catalina.startup.ContextConfig 
processAnnotationsJar
SEVERE: Unable to process Jar entry 
[javassist/util/proxy/SerializedProxy$1.class] from Jar 
[jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Saba/WEB-INF/lib/javassist-3.20.0-GA.jar!/]
 for annotations
java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
at 
org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:796)
at 
org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
at 
org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:57)
at org.apache.tomcat.util.bcel.classfile.Method.(Method.java:71)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
at 
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
at 
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
at 
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)

May 21, 2016 9:58:26 AM org.apache.catalina.startup.ContextConfig 
processAnnotationsJar
SEVERE: Unable to process Jar entry 
[javassist/util/proxy/SerializedProxy.class] from Jar 
[jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Saba/WEB-INF/lib/javassist-3.20.0-GA.jar!/]
 for annotations
java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
at 
org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:797)
at 
org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
at 
org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:57)
at org.apache.tomcat.util.bcel.classfile.Method.(Method.java:71)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
at 
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
at 
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
at 
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
 

[jira] [Created] (WW-4637) Unable to process Jar entry (javassist-3.20.0-GA.jar)

2016-05-20 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4637:
---

 Summary: Unable to process Jar entry (javassist-3.20.0-GA.jar)
 Key: WW-4637
 URL: https://issues.apache.org/jira/browse/WW-4637
 Project: Struts 2
  Issue Type: Bug
Affects Versions: 2.5
 Environment: Tomcat 7.0.54
Reporter: Alireza Fattahi
Priority: Blocker


I got below error during start up:



May 21, 2016 9:58:26 AM org.apache.catalina.startup.ContextConfig 
processAnnotationsJar
SEVERE: Unable to process Jar entry 
[javassist/util/proxy/SerializedProxy$1.class] from Jar 
[jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Saba/WEB-INF/lib/javassist-3.20.0-GA.jar!/]
 for annotations
java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
at 
org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:796)
at 
org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
at 
org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:57)
at org.apache.tomcat.util.bcel.classfile.Method.(Method.java:71)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
at 
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
at 
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
at 
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)

May 21, 2016 9:58:26 AM org.apache.catalina.startup.ContextConfig 
processAnnotationsJar
SEVERE: Unable to process Jar entry 
[javassist/util/proxy/SerializedProxy.class] from Jar 
[jar:file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Saba/WEB-INF/lib/javassist-3.20.0-GA.jar!/]
 for annotations
java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
at 
org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:797)
at 
org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
at 
org.apache.tomcat.util.bcel.classfile.FieldOrMethod.(FieldOrMethod.java:57)
at org.apache.tomcat.util.bcel.classfile.Method.(Method.java:71)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
at 
org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
at 
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
at 
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
at 
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
at 
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
  

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

2016-02-01 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi commented on WW-4600:
-

Long story :)  During login we use a library which invalidate session

> 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] [Created] (WW-4601) webconsole can always be accessed

2016-01-31 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4601:
---

 Summary: webconsole can always be accessed
 Key: WW-4601
 URL: https://issues.apache.org/jira/browse/WW-4601
 Project: Struts 2
  Issue Type: Bug
Reporter: Alireza Fattahi


It is possible that you get the webconsole.html in dev without having debug in 
the stack trace

I found that you can access /stuts/webconsole.html to see this html.  For 
example (thanks jgeppert! ) :
{code}
http://struts.jgeppert.com/struts2-jquery-showcase/struts/webconsole.html
{code}

I wonder if this should be fixed and if this can be used for attackers.



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


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

2016-01-31 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi commented on WW-4600:
-

I see this on version 2.5-BETA2 and 2.3.24.1

> 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-01-30 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi commented on WW-4600:
-

The error happens in these lines:


 session.put(actionErrorsSessionKey, 
validationAwareAction.getActionErrors());
 session.put(actionMessagesSessionKey, 
validationAwareAction.getActionMessages());
 session.put(fieldErrorsSessionKey, validationAwareAction.getFieldErrors());

> 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] [Comment Edited] (WW-4600) MessageStoreInterceptor throws Session already invalidated

2016-01-30 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi edited comment on WW-4600 at 1/31/16 5:15 AM:
--

Here is the full stack trace:

{code}

java.lang.IllegalStateException: getAttribute: Session already invalidated
at 
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1189)
at 
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:120)
at org.apache.struts2.dispatcher.SessionMap.get(SessionMap.java:161)
at org.apache.struts2.dispatcher.SessionMap.put(SessionMap.java:179)
at 
org.apache.struts2.interceptor.MessageStoreInterceptor.after(MessageStoreInterceptor.java:289)
{code}

As you find the  `session.getAttribute` is called during a `session.put` call.  
I think it is good idea that the `MessageStoreInterceptor` gently by passed if 
session is already invalidated


was (Author: afattahi):
Here is the full stack trace:

{code}

java.lang.IllegalStateException: getAttribute: Session already invalidated
at 
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1189)
at 
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:120)
at org.apache.struts2.dispatcher.SessionMap.get(SessionMap.java:161)
at org.apache.struts2.dispatcher.SessionMap.put(SessionMap.java:179)
at 
org.apache.struts2.interceptor.MessageStoreInterceptor.after(MessageStoreInterceptor.java:289)
{code}

As you find the  `session.getAttribute` is called during a `session.put` call. 

> 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] [Comment Edited] (WW-4600) MessageStoreInterceptor throws Session already invalidated

2016-01-30 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi edited comment on WW-4600 at 1/31/16 5:13 AM:
--

Here is the full stack trace:

{code}

java.lang.IllegalStateException: getAttribute: Session already invalidated
at 
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1189)
at 
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:120)
at org.apache.struts2.dispatcher.SessionMap.get(SessionMap.java:161)
at org.apache.struts2.dispatcher.SessionMap.put(SessionMap.java:179)
at 
org.apache.struts2.interceptor.MessageStoreInterceptor.after(MessageStoreInterceptor.java:289)
{code}

As you find the  `session.getAttribute` is called during a `session.put` call. 


was (Author: afattahi):
Here is the full stack trace:

`Java

java.lang.IllegalStateException: getAttribute: Session already invalidated
at 
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1189)
at 
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:120)
at org.apache.struts2.dispatcher.SessionMap.get(SessionMap.java:161)
at org.apache.struts2.dispatcher.SessionMap.put(SessionMap.java:179)
at 
org.apache.struts2.interceptor.MessageStoreInterceptor.after(MessageStoreInterceptor.java:289)

As you find the  `session.getAttribute` is called during a `session.put` call. 

> 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-01-30 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi commented on WW-4600:
-

Here is the full stack trace:

`Java

java.lang.IllegalStateException: getAttribute: Session already invalidated
at 
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1189)
at 
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:120)
at org.apache.struts2.dispatcher.SessionMap.get(SessionMap.java:161)
at org.apache.struts2.dispatcher.SessionMap.put(SessionMap.java:179)
at 
org.apache.struts2.interceptor.MessageStoreInterceptor.after(MessageStoreInterceptor.java:289)

As you find the  `session.getAttribute` is called during a `session.put` call. 

> 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] [Created] (WW-4600) MessageStoreInterceptor throws Session already invalidated

2016-01-29 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4600:
---

 Summary: 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


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-4559) Define a bean of java.io.FileInputStream in Spring makes the Struts stream result not work

2015-11-04 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi commented on WW-4559:
-

Chaning the "struts.objectFactory.spring.autoWire" did not helped but the 
"struts.objectFactory.spring.autoWire.alwaysRespect=true" helped me. I don't if 
this is a good idea to change the default of 
"struts.objectFactory.spring.autoWire.alwaysRespect" or change the StreamResult 
class in the way that the issue dosn't happen.

Please refer to: 
http://stackoverflow.com/questions/33326730/define-a-bean-of-java-io-fileinputstream-in-spring-makes-the-struts-stream-resul


> Define a bean of java.io.FileInputStream in Spring makes the Struts stream 
> result not work
> --
>
> Key: WW-4559
> URL: https://issues.apache.org/jira/browse/WW-4559
> Project: Struts 2
>  Issue Type: Bug
>  Components: Dispatch Filter
>Reporter: Alireza Fattahi
> Fix For: 2.3.x
>
>
> In a strust2 + Spring 4 project
> Consider a simple action with stream result 
> {code:title=Bar.java|borderStyle=solid}
> @Action(value = "sample-export", 
> results = { @Result(name = "success", type = "stream", params = {
> "inputName", "exportInputStream", "contentType",
> "${exportContentType}; charset=UTF-8", "Content-Disposition",
> "attachment; filename=\"${filename}\"", "contentDisposition",
> "attachment; filename=\"${filename}\"", "bufferSize", "2048" }) })
> public String export() throws ClientException {
> //buildExportInputStream() creates and returns new ByteArrayOutputStream 
> by using jasper
> exportInputStream = buildExportInputStream();
> LOG.debug("Exporting to {} file ", getFilename());
> return SUCCESS;
> }
> {code}
> This works fine,
> Now define a bean 
> {code:xml}
>  
>   
>   
> {code}
> The export will not work correctly any more, first time you get the 
> c:/sample.jks as file and then an  error which same stream already closed.
> I have found that the sampleStream will be autowired to 
> org.apache.struts2.dispatcher.StreamResult and I see this log:
> {panel:title=LOG|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1|bgColor=#CE}
> DEBUG ort.DefaultListableBeanFactory Returning cached instance of singleton 
> bean 'sampleStream'
> DEBUG ort.DefaultListableBeanFactory Autowiring by type from bean name 
> 'org.apache.struts2.dispatcher.StreamResult' via constructor to bean named 
> 'sampleStream'
> {panel}
> This mistaken autowired is the source of problem ! Is there any workaround. 
> And by the way, why the sampleStream is autowired here !



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


[jira] [Updated] (WW-4559) Define a bean of java.io.FileInputStream in Spring makes the Struts stream result not work

2015-11-02 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi updated WW-4559:

Description: 
In a strust2 + Spring 4 project

Consider a simple action with stream result 
{code:title=Bar.java|borderStyle=solid}
@Action(value = "sample-export", 
results = { @Result(name = "success", type = "stream", params = {
"inputName", "exportInputStream", "contentType",
"${exportContentType}; charset=UTF-8", "Content-Disposition",
"attachment; filename=\"${filename}\"", "contentDisposition",
"attachment; filename=\"${filename}\"", "bufferSize", "2048" }) })
public String export() throws ClientException {
//buildExportInputStream() creates and returns new ByteArrayOutputStream by 
using jasper
exportInputStream = buildExportInputStream();
LOG.debug("Exporting to {} file ", getFilename());

return SUCCESS;

}
{code}

This works fine,

Now define a bean 
{code:xml}
 
  
  
{code}
The export will not work correctly any more, first time you get the 
c:/sample.jks as file and then an  error which same stream already closed.

I have found that the sampleStream will be autowired to 
org.apache.struts2.dispatcher.StreamResult and I see this log:
{panel:title=LOG|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1|bgColor=#CE}
DEBUG ort.DefaultListableBeanFactory Returning cached instance of singleton 
bean 'sampleStream'
DEBUG ort.DefaultListableBeanFactory Autowiring by type from bean name 
'org.apache.struts2.dispatcher.StreamResult' via constructor to bean named 
'sampleStream'
{panel}
This mistaken autowired is the source of problem ! Is there any workaround. And 
by the way, why the sampleStream is autowired here !

  was:
In a strust2 + Spring 4 project

Consider a simple action with stream result 
{code:title=Bar.java|borderStyle=solid}
@Action(value = "sample-export", 
results = { @Result(name = "success", type = "stream", params = {
"inputName", "exportInputStream", "contentType",
"${exportContentType}; charset=UTF-8", "Content-Disposition",
"attachment; filename=\"${filename}\"", "contentDisposition",
"attachment; filename=\"${filename}\"", "bufferSize", "2048" }) })
public String export() throws ClientException {
//buildExportInputStream() creates and returns new ByteArrayOutputStream by 
using jasper
exportInputStream = buildExportInputStream();
LOG.debug("Exporting to {} file ", getFilename());

return SUCCESS;

}
{code}

This works fine,

Now define a bean 
{code:xml}
 
  
  
{code}
The export will not work correctly any more, first time you get the 
c:/sample.jks as file and then an  error which same stream already closed.

I have found that the sampleStream will be autowired to 
org.apache.struts2.dispatcher.StreamResult and I see this log:
{panel:title=My 
Title|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1|bgColor=#CE}
DEBUG ort.DefaultListableBeanFactory Returning cached instance of singleton 
bean 'sampleStream'
DEBUG ort.DefaultListableBeanFactory Autowiring by type from bean name 
'org.apache.struts2.dispatcher.StreamResult' via constructor to bean named 
'sampleStream'
{panel}
This mistaken autowired is the source of problem ! Is there any workaround. And 
by the way, why the sampleStream is autowired here !


> Define a bean of java.io.FileInputStream in Spring makes the Struts stream 
> result not work
> --
>
> Key: WW-4559
> URL: https://issues.apache.org/jira/browse/WW-4559
> Project: Struts 2
>  Issue Type: Bug
>  Components: Dispatch Filter
>Reporter: Alireza Fattahi
> Fix For: 2.3.x
>
>
> In a strust2 + Spring 4 project
> Consider a simple action with stream result 
> {code:title=Bar.java|borderStyle=solid}
> @Action(value = "sample-export", 
> results = { @Result(name = "success", type = "stream", params = {
> "inputName", "exportInputStream", "contentType",
> "${exportContentType}; charset=UTF-8", "Content-Disposition",
> "attachment; filename=\"${filename}\"", "contentDisposition",
> "attachment; filename=\"${filename}\"", "bufferSize", "2048" }) })
> public String export() throws ClientException {
> //buildExportInputStream() creates and returns new ByteArrayOutputStream 
> by using jasper
> exportInputStream = buildExportInputStream();
> LOG.debug("Exporting to {} file ", getFilename());
> return SUCCESS;
> }
> {code}
> This works fine,
> Now define a bean 
> {code:xml}
>  
>   
>   
> {code}
> The export will not work correctly any more, first time you get the 
> c:/sample.jks as file and then an  error which same stream already closed.
> I have found that the sampleStream will be autowired to 
> 

[jira] [Created] (WW-4559) Define a bean of java.io.FileInputStream in Spring makes the Struts stream result not work

2015-11-02 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4559:
---

 Summary: Define a bean of java.io.FileInputStream in Spring makes 
the Struts stream result not work
 Key: WW-4559
 URL: https://issues.apache.org/jira/browse/WW-4559
 Project: Struts 2
  Issue Type: Bug
  Components: Dispatch Filter
Reporter: Alireza Fattahi
 Fix For: 2.3.x


In a strust2 + Spring 4 project

Consider a simple action with stream result 
{code:title=Bar.java|borderStyle=solid}
@Action(value = "sample-export", 
results = { @Result(name = "success", type = "stream", params = {
"inputName", "exportInputStream", "contentType",
"${exportContentType}; charset=UTF-8", "Content-Disposition",
"attachment; filename=\"${filename}\"", "contentDisposition",
"attachment; filename=\"${filename}\"", "bufferSize", "2048" }) })
public String export() throws ClientException {
//buildExportInputStream() creates and returns new ByteArrayOutputStream by 
using jasper
exportInputStream = buildExportInputStream();
LOG.debug("Exporting to {} file ", getFilename());

return SUCCESS;

}
{code}

This works fine,

Now define a bean 
{code:xml}
 
  
  
{code}
The export will not work correctly any more, first time you get the 
c:/sample.jks as file and then an  error which same stream already closed.

I have found that the sampleStream will be autowired to 
org.apache.struts2.dispatcher.StreamResult and I see this log:
{panel:title=My 
Title|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1|bgColor=#CE}
DEBUG ort.DefaultListableBeanFactory Returning cached instance of singleton 
bean 'sampleStream'
DEBUG ort.DefaultListableBeanFactory Autowiring by type from bean name 
'org.apache.struts2.dispatcher.StreamResult' via constructor to bean named 
'sampleStream'
{panel}
This mistaken autowired is the source of problem ! Is there any workaround. And 
by the way, why the sampleStream is autowired here !



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


[jira] [Created] (WW-4535) Struts 2.5 BETA1 and conversation plugin

2015-08-09 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4535:
---

 Summary:  Struts 2.5 BETA1 and conversation plugin
 Key: WW-4535
 URL: https://issues.apache.org/jira/browse/WW-4535
 Project: Struts 2
  Issue Type: Bug
Affects Versions: 2.3.24
Reporter: Alireza Fattahi


Sorry to post it here, subscribing to d...@struts.apache.org di not worked and 
I didn't get response email.
--
The Struts 2.5 BETA1 make the struts 2 conversation plugin fails. This happens 
because of renaming the
org.apache.struts2.dispatcher.ServletActionRedirectResult;
org.apache.struts2.dispatcher.ServletRedirectResult;

After tweking these packages to:
org.apache.struts2.result.ServletActionRedirectResult
org.apache.struts2.result.ServletRedirectResult

the conversation plugin worked fine...
As this is a useful plugin is it possible to keep the removed packages.





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


[jira] [Commented] (WW-4509) MethodFilter accept wildcard

2015-08-01 Thread Alireza Fattahi (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14650169#comment-14650169
 ] 

Alireza Fattahi commented on WW-4509:
-

Thanks, I could not find it in documents or searching it on the internet. I 
think it can be added there.

 MethodFilter accept wildcard
 

 Key: WW-4509
 URL: https://issues.apache.org/jira/browse/WW-4509
 Project: Struts 2
  Issue Type: Improvement
  Components: Core Interceptors
Reporter: Alireza Fattahi
 Fix For: 2.5


 Is it a good idea to improve the interceptor filtering method to accept 
 wildcard (or RegEx) for include and exclude names.



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


[jira] [Commented] (WW-4530) The ExceptionMappingInterceptor extends MethodFilterInterceptor

2015-07-31 Thread Alireza Fattahi (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14650148#comment-14650148
 ] 

Alireza Fattahi commented on WW-4530:
-

ExceptionMappingInterceptor functionality is not enough always, so we have 
developed an interceptor which handles exceptions. It means that the 
ExceptionMappingInterceptor can be quite good in SOME actions. If 
ExceptionMappingInterceptor  supports MethodFilterInterceptor we can configure 
it easily to work in conjunction with our exception handler.

Consider below which is a single web page web application:
We have developed an interceptor which always catch all exceptions and produce 
a JSON result so all exception will be mapped to JSON string, with a predefined 
key word like: {'error','it went wrong'}. The client always parse the string 
and show an error message as a alert.
On the other hand, there are some actions which exception in them should be 
forwarded to a global error page, this is where the ExceptionMappingInterceptor 
 with MethodFilterInterceptor can help us.
Please let me know if I need to explain it more.

 The ExceptionMappingInterceptor extends MethodFilterInterceptor
 ---

 Key: WW-4530
 URL: https://issues.apache.org/jira/browse/WW-4530
 Project: Struts 2
  Issue Type: Bug
Reporter: Alireza Fattahi
 Fix For: 2.5


 Is it possible that the ExceptionMappingInterceptor extends 
 MethodFilterInterceptor, this will help to add ExceptionMappingInterceptor  
 to defined methods



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


[jira] [Created] (WW-4530) The ExceptionMappingInterceptor extends MethodFilterInterceptor

2015-07-22 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4530:
---

 Summary: The ExceptionMappingInterceptor extends 
MethodFilterInterceptor
 Key: WW-4530
 URL: https://issues.apache.org/jira/browse/WW-4530
 Project: Struts 2
  Issue Type: Bug
Reporter: Alireza Fattahi


Is it possible that the ExceptionMappingInterceptor extends 
MethodFilterInterceptor, this will help to add ExceptionMappingInterceptor  to 
defined methods



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


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

2015-07-14 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi commented on WW-4525:
-

Yes s:optgroup/ works fine. But I tried to make a dynamic s:optgroup/ as 
suggested at : 
http://stackoverflow.com/questions/13569453/struts-2-dynamically-populate-optgroup-with-iteration
 

 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}
 s:select id=toAccount name=destinationKnownAccount
 list=destinationKnownAccounts listKey=accountNo
 listValue=%{ farsiFirstName + \ \ + farsiLastName } 
   s:iterator value=destinationKnownAccounts  
 optgroup label=${farsiFirstName}  
  option value=${accountNo} 
 ${accountNo}/option  
  /optgroup  
 /s:iterator   
 /s:select 
 {code}
 The optiongroup will be displayed outside select as
 {code:title=Bar.jsp|borderStyle=solid}  
 optgroup label=محمد option value=01946005 01946005/option  
 /optgroup  
 optgroup label=حامد option value=0333783051000 0333783051000/option 
  
 /optgroup  
 optgroup label=سارا option value=015087000 015087000/option 
  
 /optgroup  
  select name=destinationKnownAccount id=toAccount 
 option value= /option
 option value=0194600501946005 محمد رادان/option
 option value=0333783051333783051000 حامد پیروزفر/option
 option value=01508715087000 سارا حاتمی/option
 /select
 {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] [Created] (WW-4525) s:select with an inside iterator through option group

2015-07-13 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4525:
---

 Summary: 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


Please look at below code:

{code:title=Bar.jsp|borderStyle=solid}
s:select id=toAccount name=destinationKnownAccount
list=destinationKnownAccounts listKey=accountNo
listValue=%{ farsiFirstName + \ \ + farsiLastName } 
  s:iterator value=destinationKnownAccounts  
optgroup label=${farsiFirstName}  
 option value=${accountNo} 
${accountNo}/option  
 /optgroup  
/s:iterator   
/s:select 
{code}
The optiongroup will be displayed outside select as

{code:title=Bar.jsp|borderStyle=solid}  
optgroup label=محمد option value=01946005 01946005/option  
/optgroup  
optgroup label=حامد option value=0333783051000 0333783051000/option  
/optgroup  
optgroup label=سارا option value=015087000 015087000/option  
/optgroup  
 select name=destinationKnownAccount id=toAccount 
option value= /option
option value=0194600501946005 محمد رادان/option
option value=0333783051333783051000 حامد پیروزفر/option
option value=01508715087000 سارا حاتمی/option
/select
{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] [Commented] (WW-4519) StrutsResultSupport outputs remining bytes of data during out

2015-06-28 Thread Alireza Fattahi (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14604688#comment-14604688
 ] 

Alireza Fattahi commented on WW-4519:
-

Yes, that's it ?!

 StrutsResultSupport outputs remining bytes of data during out
 -

 Key: WW-4519
 URL: https://issues.apache.org/jira/browse/WW-4519
 Project: Struts 2
  Issue Type: Improvement
Reporter: Alireza Fattahi
 Fix For: 2.5


 The StreamResult writes buffer to out put, for long file sizes it may take a 
 while, it will be a good idea that during the while loop (line 294) the 
 StreamResult generates some log ( in trace level) 



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


[jira] [Comment Edited] (WW-4519) StrutsResultSupport outputs remining bytes of data during out

2015-06-28 Thread Alireza Fattahi (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14604688#comment-14604688
 ] 

Alireza Fattahi edited comment on WW-4519 at 6/28/15 2:06 PM:
--

Yes, that's it !


was (Author: afattahi):
Yes, that's it ?!

 StrutsResultSupport outputs remining bytes of data during out
 -

 Key: WW-4519
 URL: https://issues.apache.org/jira/browse/WW-4519
 Project: Struts 2
  Issue Type: Improvement
Reporter: Alireza Fattahi
 Fix For: 2.5


 The StreamResult writes buffer to out put, for long file sizes it may take a 
 while, it will be a good idea that during the while loop (line 294) the 
 StreamResult generates some log ( in trace level) 



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


[jira] [Created] (WW-4519) StrutsResultSupport outputs remining bytes of data during out

2015-06-27 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4519:
---

 Summary: StrutsResultSupport outputs remining bytes of data during 
out
 Key: WW-4519
 URL: https://issues.apache.org/jira/browse/WW-4519
 Project: Struts 2
  Issue Type: Improvement
Reporter: Alireza Fattahi


The StrutsResultSupport writes buffer to out put, for long file sizes it may 
take a while, it will be a good idea that during the while loop (line 294) the 
StrutsResultSupport generates some log ( in trace level) 



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


[jira] [Updated] (WW-4519) StrutsResultSupport outputs remining bytes of data during out

2015-06-27 Thread Alireza Fattahi (JIRA)

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

Alireza Fattahi updated WW-4519:

Description: The StreamResult writes buffer to out put, for long file sizes 
it may take a while, it will be a good idea that during the while loop (line 
294) the StreamResult generates some log ( in trace level)   (was: The 
StrutsResultSupport writes buffer to out put, for long file sizes it may take a 
while, it will be a good idea that during the while loop (line 294) the 
StrutsResultSupport generates some log ( in trace level) )

 StrutsResultSupport outputs remining bytes of data during out
 -

 Key: WW-4519
 URL: https://issues.apache.org/jira/browse/WW-4519
 Project: Struts 2
  Issue Type: Improvement
Reporter: Alireza Fattahi
 Fix For: 2.5


 The StreamResult writes buffer to out put, for long file sizes it may take a 
 while, it will be a good idea that during the while loop (line 294) the 
 StreamResult generates some log ( in trace level) 



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


[jira] [Commented] (WW-4519) StrutsResultSupport outputs remining bytes of data during out

2015-06-27 Thread Alireza Fattahi (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14604511#comment-14604511
 ] 

Alireza Fattahi commented on WW-4519:
-

It was StreamResult ;)

 StrutsResultSupport outputs remining bytes of data during out
 -

 Key: WW-4519
 URL: https://issues.apache.org/jira/browse/WW-4519
 Project: Struts 2
  Issue Type: Improvement
Reporter: Alireza Fattahi
 Fix For: 2.5


 The StreamResult writes buffer to out put, for long file sizes it may take a 
 while, it will be a good idea that during the while loop (line 294) the 
 StreamResult generates some log ( in trace level) 



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


[jira] [Created] (WW-4509) MethodFilter accept wildcard

2015-06-03 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4509:
---

 Summary: MethodFilter accept wildcard
 Key: WW-4509
 URL: https://issues.apache.org/jira/browse/WW-4509
 Project: Struts 2
  Issue Type: Improvement
  Components: Core Interceptors
Reporter: Alireza Fattahi


Is it a good idea to improve the interceptor filtering method to accept 
wildcard (or RegEx) for include and exclude names.



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


[jira] [Commented] (WW-4433) ConventionUnknownHandler change breaks exception handling in interceptors.

2015-04-07 Thread Alireza Fattahi (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14484637#comment-14484637
 ] 

Alireza Fattahi commented on WW-4433:
-

Me too ! Looking for workaround code !

 ConventionUnknownHandler change breaks exception handling in interceptors.
 --

 Key: WW-4433
 URL: https://issues.apache.org/jira/browse/WW-4433
 Project: Struts 2
  Issue Type: Bug
  Components: Core Interceptors, Documentation, Plugin - Convention
Affects Versions: 2.3.20
Reporter: Joseph Wolschon
Assignee: Lukasz Lenart
Priority: Minor
 Fix For: 2.3.23


 Struts 2.3.20 appears to have caused a regression that prevents exceptions 
 thrown from convention-plugin actions from reaching 
 ExceptionMappingInterceptor. This breaks exception handling when using the 
 convention-plugin.
 To Reproduce: 
 * Generate a project struts2-archetype-convention archetype using 2.3.20
 * Throw exception in the action. With 2.3.20, a blank page is shown.
 * Change to 2.3.16.3 and you will get the standard struts2 error page.
 The breaking change appears to have been made in WW-4331. This causes error 
 interceptor code to break (showing a blank page when exceptions are thrown) 
 as DefaultActionInvocation does not catch an exception from the default 
 UnknownHandler implementation execution, which would previously re-throw the 
 original exception back up for the interceptors to catch. 
 Workaround:
 We've created our own UnknownHandler implementation that just throws a new 
 NoSuchMethodException, allowing DefaultActionInvocation to re-throw the 
 original exception so that our error interceptor can again catch it.



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


[jira] [Commented] (WW-4433) ConventionUnknownHandler change breaks exception handling in interceptors.

2014-12-21 Thread Alireza Fattahi (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14255435#comment-14255435
 ] 

Alireza Fattahi commented on WW-4433:
-

I don't know it should be asked here or not ! 
But this bug fix is very important for us, and we could not upgrade until the 
2.3.21 is released. 
So, when do you think the 2.3.21 will be release ( and put in maven)

Thanks!

 ConventionUnknownHandler change breaks exception handling in interceptors.
 --

 Key: WW-4433
 URL: https://issues.apache.org/jira/browse/WW-4433
 Project: Struts 2
  Issue Type: Bug
  Components: Core Interceptors, Documentation, Plugin - Convention
Affects Versions: 2.3.20
Reporter: Joseph Wolschon
Assignee: Lukasz Lenart
Priority: Minor
 Fix For: 2.3.21


 Struts 2.3.20 appears to have caused a regression that prevents exceptions 
 thrown from convention-plugin actions from reaching 
 ExceptionMappingInterceptor. This breaks exception handling when using the 
 convention-plugin.
 To Reproduce: 
 * Generate a project struts2-archetype-convention archetype using 2.3.20
 * Throw exception in the action. With 2.3.20, a blank page is shown.
 * Change to 2.3.16.3 and you will get the standard struts2 error page.
 The breaking change appears to have been made in WW-4331. This causes error 
 interceptor code to break (showing a blank page when exceptions are thrown) 
 as DefaultActionInvocation does not catch an exception from the default 
 UnknownHandler implementation execution, which would previously re-throw the 
 original exception back up for the interceptors to catch. 
 Workaround:
 We've created our own UnknownHandler implementation that just throws a new 
 NoSuchMethodException, allowing DefaultActionInvocation to re-throw the 
 original exception so that our error interceptor can again catch it.



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


[jira] [Created] (WW-4432) The %{#attr.counter.index} is not working

2014-12-15 Thread Alireza Fattahi (JIRA)
Alireza Fattahi created WW-4432:
---

 Summary:  The %{#attr.counter.index} is not working
 Key: WW-4432
 URL: https://issues.apache.org/jira/browse/WW-4432
 Project: Struts 2
  Issue Type: Bug
Reporter: Alireza Fattahi
 Fix For: 2.3.20


Below code is not working in struts 2.3.20

 c:forTokens items=${images} delims=, var=imagevar varStatus=counter 
begin=1
s:text name=site.intro.intro%{#attr.counter.index}.caption/
/c:forTokens

The %{#attr.counter.index} is not returning any value and no exception is 
thrown in the log the below message is shown:

WARN  ognl.SecurityMemberAccess  Package of target 
[javax.servlet.jsp.jstl.core.LoopTagSupport$1Status@680cabbd] or package of 
member [public int 
javax.servlet.jsp.jstl.core.LoopTagSupport$1Status.getIndex()] are excluded!

When I set struts.excludedPackageNamePatterns to empty, it works!



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