[ 
https://issues.apache.org/jira/browse/WW-3318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856307#action_12856307
 ] 

Andreas Krüger edited comment on WW-3318 at 4/13/10 1:43 AM:
-------------------------------------------------------------

For your example:

Simply take any project, and stick the JSP-line

<s:property value="xxx == null ? 'Not yet determined' : xxx" />

into a JSP you can exercise from your browser.

(In the rare event an object with a getXxx() - Method exists on your value 
stack,
you need to replace the xxx in this line with some obscure property that does 
NOT exist.)

Exercise that JSP. If you see "Not yet determined" in your browser, you see the 
bug. 

If some "NoSuchMethodException" or similar gets thrown, the bug is no longer 
present.

Does that help?

      was (Author: andreas_krüger):
    For your example:

Simply take any project, and stick the JSP-line

<s:property value="xxx == null ? 'Not yet determined' : xxx" />

into a JSP you can exercise from your browser.

Just in case you happen to have an object with a getXxx() - Method on the value 
stack,
replace the xxx in the line with some obscure other property that does NOT 
exist.

Exercise that JSP. If you see "Not yet determined" in your browser, you see the 
bug. 

If some "NoSuchMethodException" or similar gets thrown, the bug is no longer 
present.

Does that help?
  
> throwExceptionOnFailure=true doesn't detect undefined property burried in OGNL
> ------------------------------------------------------------------------------
>
>                 Key: WW-3318
>                 URL: https://issues.apache.org/jira/browse/WW-3318
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Value Stack
>    Affects Versions: 2.1.8
>            Reporter: Andreas Krüger
>            Assignee: Lukasz Lenart
>             Fix For: 2.2.x
>
>
> Setup:
> struts.el.throwExceptionOnFailure=true in struts.properties
> In the value stack, there is no object which has any property "xxx"
> The JSP has  <s:property value="xxx == null ? 'Not yet determined' : xxx" />
> Expected behaviour: As the property xxx is not defined, this should throw an 
> exception.
> Behaviour seen: The string "Not yet determined" gets inserted into the HTML 
> output as if nothing were wrong.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to