struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <hus...@apache.org>
Subject Re: How can I tell Struts 2 to throw/log exceptions for invalid OGNL Expressions
Date Thu, 06 Sep 2007 16:25:42 GMT
Moving to dev@ ....

It occurred to me that if we make this kind of change, we might want
to take the behavior of the text tag/message resources into
consideration too. Right now, if a message resource is not found, the
tag displays the name of the tag, e.g.

<s:text name="doesntexist" />

renders

doesntexist

Other tags might do the same thing (print the property name) if the
property doesn't exist. Or, alternatively, when in devmode we could
log when a message resource is not found. (Right now, that doesn't
happen.) I'm just thinking there should be consistency between the
literal-text and message-resource behaviors.

-Ted.


On 9/6/07, Ted Husted <husted@apache.org> wrote:
> Good point. Feel free to open a S2 JIRA ticket that cross-references
> XW-557 (since I'm not sure if its something we could do here or not)
> -- and feel even more free to submit a patch!
>
> As usual, we are short of active volunteers, and we can always use a
> hand with the code!
>
> -Ted.
>
> On 9/6/07, mraible <matt@raibledesigns.com> wrote:
> >
> > struts.devMode=true will catch setting invalid properties, but not reading
> > from them. I want to be warned when a property/method doesn't exist. Or in
> > the instance of calling stating methods with FQCN, I want to be made aware
> > when I fat finger the package name. If I could use JSP's import and then
> > read from the package, that'd be even nicer. It's somewhat verbose to call
> > FQ static methods. I suppose I could move the methods into my action, so
> > it's not too bad.
> >
> > Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message