You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Greg Huber (JIRA)" <ji...@apache.org> on 2012/11/24 23:22:58 UTC

[jira] [Created] (WW-3927) com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log

Greg Huber created WW-3927:
------------------------------

             Summary: com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log
                 Key: WW-3927
                 URL: https://issues.apache.org/jira/browse/WW-3927
             Project: Struts 2
          Issue Type: Bug
          Components: Core Interceptors
    Affects Versions: 2.3.7
         Environment: centos/tomcat
            Reporter: Greg Huber
            Priority: Minor


Hello,

Think the notifyDeveloper(..) message should be before the return true; statement!

{code:java}
    protected boolean isExcluded(String paramName) {
        if (!this.excludeParams.isEmpty()) {
            for (Pattern pattern : excludeParams) {
                Matcher matcher = pattern.matcher(paramName);
                if (matcher.matches()) {
                  // messsage here?  
                  return true;
                }
            }
        }
        notifyDeveloper("Parameter [#0] is on the excludeParams list of patterns!", paramName);
        return false;
    }
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3927) com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-3927:
------------------------------

    Fix Version/s: 2.3.8
    
> com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log
> ----------------------------------------------------------------------------------
>
>                 Key: WW-3927
>                 URL: https://issues.apache.org/jira/browse/WW-3927
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.3.7
>         Environment: centos/tomcat
>            Reporter: Greg Huber
>            Priority: Minor
>             Fix For: 2.3.8
>
>
> Hello,
> Think the notifyDeveloper(..) message should be before the return true; statement!
> {code:java}
>     protected boolean isExcluded(String paramName) {
>         if (!this.excludeParams.isEmpty()) {
>             for (Pattern pattern : excludeParams) {
>                 Matcher matcher = pattern.matcher(paramName);
>                 if (matcher.matches()) {
>                   // messsage here?  
>                   return true;
>                 }
>             }
>         }
>         notifyDeveloper("Parameter [#0] is on the excludeParams list of patterns!", paramName);
>         return false;
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WW-3927) com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart resolved WW-3927.
-------------------------------

    Resolution: Fixed
      Assignee: Lukasz Lenart

Solved, thanks for reporting!
                
> com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log
> ----------------------------------------------------------------------------------
>
>                 Key: WW-3927
>                 URL: https://issues.apache.org/jira/browse/WW-3927
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.3.7
>         Environment: centos/tomcat
>            Reporter: Greg Huber
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.3.8
>
>
> Hello,
> Think the notifyDeveloper(..) message should be before the return true; statement!
> {code:java}
>     protected boolean isExcluded(String paramName) {
>         if (!this.excludeParams.isEmpty()) {
>             for (Pattern pattern : excludeParams) {
>                 Matcher matcher = pattern.matcher(paramName);
>                 if (matcher.matches()) {
>                   // messsage here?  
>                   return true;
>                 }
>             }
>         }
>         notifyDeveloper("Parameter [#0] is on the excludeParams list of patterns!", paramName);
>         return false;
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3927) com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log

Posted by "Greg Huber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510542#comment-13510542 ] 

Greg Huber commented on WW-3927:
--------------------------------

Further to the "Unexpected Exception caught setting" coment, it may be the way I am using the checkboxlist (list of checkboxes in a table) as if I add to the id & name attributes the "cnt" number on the checkboxlist tag the error message goes away?


ie add   + "-" + Integer.toString(cnt)    below:

CheckboxListHandler (on the javatempaltes tag!)
{code:java}
//Hidden input section
                a = new Attributes();
                a.add("type", "hidden")
                        .add("id", "__multiselect_" + StringUtils.defaultString(StringEscapeUtils.escapeHtml4(id))+ "-" + Integer.toString(cnt))
                        .add("name", "__multiselect_" + StringUtils.defaultString(StringEscapeUtils.escapeHtml4(name))+ "-" + Integer.toString(cnt))
                        .add("value", "")
                        .addIfTrue("disabled", disabled);
                start("input", a);
                end("input");

{code}

output code:

<input id="favourites_idEmails-1" type="checkbox" value="test" name="idEmails">
<input id="__multiselect_favourites_idEmails-1" type="hidden" value="" name="__multiselect_idEmails-1">

Cheers Greg.

                
> com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log
> ----------------------------------------------------------------------------------
>
>                 Key: WW-3927
>                 URL: https://issues.apache.org/jira/browse/WW-3927
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.3.7
>         Environment: centos/tomcat
>            Reporter: Greg Huber
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.3.8
>
>
> Hello,
> Think the notifyDeveloper(..) message should be before the return true; statement!
> {code:java}
>     protected boolean isExcluded(String paramName) {
>         if (!this.excludeParams.isEmpty()) {
>             for (Pattern pattern : excludeParams) {
>                 Matcher matcher = pattern.matcher(paramName);
>                 if (matcher.matches()) {
>                   // messsage here?  
>                   return true;
>                 }
>             }
>         }
>         notifyDeveloper("Parameter [#0] is on the excludeParams list of patterns!", paramName);
>         return false;
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3927) com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510910#comment-13510910 ] 

Hudson commented on WW-3927:
----------------------------

Integrated in Struts2-JDK6 #574 (See [https://builds.apache.org/job/Struts2-JDK6/574/])
    WW-3927 corrects developer notification (Revision 1417339)

     Result = SUCCESS
lukaszlenart : 
Files : 
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java

                
> com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log
> ----------------------------------------------------------------------------------
>
>                 Key: WW-3927
>                 URL: https://issues.apache.org/jira/browse/WW-3927
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.3.7
>         Environment: centos/tomcat
>            Reporter: Greg Huber
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.3.8
>
>
> Hello,
> Think the notifyDeveloper(..) message should be before the return true; statement!
> {code:java}
>     protected boolean isExcluded(String paramName) {
>         if (!this.excludeParams.isEmpty()) {
>             for (Pattern pattern : excludeParams) {
>                 Matcher matcher = pattern.matcher(paramName);
>                 if (matcher.matches()) {
>                   // messsage here?  
>                   return true;
>                 }
>             }
>         }
>         notifyDeveloper("Parameter [#0] is on the excludeParams list of patterns!", paramName);
>         return false;
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3927) com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510971#comment-13510971 ] 

Hudson commented on WW-3927:
----------------------------

Integrated in Struts2-JDK5 #11 (See [https://builds.apache.org/job/Struts2-JDK5/11/])
    WW-3927 corrects developer notification (Revision 1417339)

     Result = SUCCESS
lukaszlenart : 
Files : 
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java

                
> com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log
> ----------------------------------------------------------------------------------
>
>                 Key: WW-3927
>                 URL: https://issues.apache.org/jira/browse/WW-3927
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.3.7
>         Environment: centos/tomcat
>            Reporter: Greg Huber
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.3.8
>
>
> Hello,
> Think the notifyDeveloper(..) message should be before the return true; statement!
> {code:java}
>     protected boolean isExcluded(String paramName) {
>         if (!this.excludeParams.isEmpty()) {
>             for (Pattern pattern : excludeParams) {
>                 Matcher matcher = pattern.matcher(paramName);
>                 if (matcher.matches()) {
>                   // messsage here?  
>                   return true;
>                 }
>             }
>         }
>         notifyDeveloper("Parameter [#0] is on the excludeParams list of patterns!", paramName);
>         return false;
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3927) com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log

Posted by "Greg Huber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510510#comment-13510510 ] 

Greg Huber commented on WW-3927:
--------------------------------

Lukasz,

There is another spurious "Unexpected Exception caught setting" message that comes from the use of the checkboxlist tag as it renders a hidden field with an id beginning with "__multiselect_".  There will never be a method with on the action for this.



com.opensymphony.xwork2.interceptor.ParametersInterceptor line starting 314


{code:java}
for (Map.Entry<String, Object> entry : acceptableParameters.entrySet()) {
            String name = entry.getKey();
            Object value = entry.getValue();
            try {
                newStack.setParameter(name, value);
            } catch (RuntimeException e) {
                if (devMode) {
                    String developerNotification = LocalizedTextUtil.findText(ParametersInterceptor.class, "devmode.notification", ActionContext.getContext().getLocale(), "Developer Notification:\n{0}", new Object[]{
                             "Unexpected Exception caught setting '" + name + "' on '" + action.getClass() + ": " + e.getMessage()
                    });
                    LOG.error(developerNotification);
                    if (action instanceof ValidationAware) {
                        ((ValidationAware) action).addActionMessage(developerNotification);
                    }
                }
            }
        }
{code}


btw what is the purpose of the hidden field as it does not seem to be used anyhow?  When I do my list handler I have save the original id's in a separate hidden field which will be a string.

Cheers Greg
                
> com.opensymphony.xwork2.interceptor.ParametersInterceptor incorrect message in log
> ----------------------------------------------------------------------------------
>
>                 Key: WW-3927
>                 URL: https://issues.apache.org/jira/browse/WW-3927
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.3.7
>         Environment: centos/tomcat
>            Reporter: Greg Huber
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.3.8
>
>
> Hello,
> Think the notifyDeveloper(..) message should be before the return true; statement!
> {code:java}
>     protected boolean isExcluded(String paramName) {
>         if (!this.excludeParams.isEmpty()) {
>             for (Pattern pattern : excludeParams) {
>                 Matcher matcher = pattern.matcher(paramName);
>                 if (matcher.matches()) {
>                   // messsage here?  
>                   return true;
>                 }
>             }
>         }
>         notifyDeveloper("Parameter [#0] is on the excludeParams list of patterns!", paramName);
>         return false;
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira