struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Krüger (JIRA) <j...@apache.org>
Subject [jira] Commented: (WW-3306) Null value accepted from action property, but not model property when throwExceptionOnFailure=true
Date Mon, 02 Nov 2009 17:09:50 GMT

    [ https://issues.apache.org/struts/browse/WW-3306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47018#action_47018
] 

Andreas Krüger commented on WW-3306:
------------------------------------

> By default(no need to set struts.el.throwExceptionOnFailure), struts will be silent about
errors in expressions, 

No problems as far as that is concerned. It's not what we want or need, but it functions as
described.

> To make struts throw errors in expressions, and missing properties set struts.el.throwExceptionOnFailure=true.


This we do.

And this does not work as described:

It also throws exceptions not only on missing properties, but also on properties which exist,
but return a null value.

This bug seems to exist only when the property is a property of the model.

All is well when the property is from an action object.

The code as given above can be used to reproduce the bug. If you have any problem reproducing
the bug, I'd be glad to help.

> Null value accepted from action property, but not model property when throwExceptionOnFailure=true
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-3306
>                 URL: https://issues.apache.org/struts/browse/WW-3306
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Value Stack
>    Affects Versions: 2.2.0
>            Reporter: Andreas Krüger
>
> In this project, we experiment with setting struts.el.throwExceptionOnFailure=true to
catch errors.
> We use <s:property value="myprop" /> in our JSP.
> Occasionally, the property thus referenced is null. We want struts to insert an empty
string in that case.
> This it duely does, when either struts.el.throwExceptionOnFailure=false or when the property
is from an action object.
> However, if the property is from a model object and struts.el.throwExceptionOnFailure=true,
this bombs out.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message