You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vincent Lin <vi...@gmail.com> on 2007/11/23 06:44:23 UTC

[s2]Runtime exception in a bean setter

I'm using struts 2.0.9.
I have a bean in a action.
The setter of the bean will throw a RuntimeException when the value is not a
legal value.
But when I submitted the form with the illegal value, and the
RuntimeException was thrown.
Nothing happens to struts 2 container. The exception disappeared and is not
displayed in log.

What I expected is a Error 500 page, but it seems nothing happen at all
except the value is not set to the bean.
The behavior is quite different from struts 1.

Is this a feature of struts 2? Hide the exception of setter of bean?
Or can I turn this off in struts.properties or struts.xml?

Thanks!
Vincent Lin