D
dpr
I use a setProperty with property="*" in a start of my jsp.
But I happen to have a property that is supposed to be an integer which
get initialised with bad data (alphabetic char).
To be clearer:
<jsp:useBean name="mybean" property="*" />
mybean have a property of type int named myProp and the page gets call
with a parameter myProp="abcdef"
This results in a exception displayed in the web browser.
I know I could encapsulate the useBean in a try catch block, or use a
string (instead of an int) and validate it myself.
But what is the usual way to handle this (if there is one) ?
Thanks in advance.
But I happen to have a property that is supposed to be an integer which
get initialised with bad data (alphabetic char).
To be clearer:
<jsp:useBean name="mybean" property="*" />
mybean have a property of type int named myProp and the page gets call
with a parameter myProp="abcdef"
This results in a exception displayed in the web browser.
I know I could encapsulate the useBean in a try catch block, or use a
string (instead of an int) and validate it myself.
But what is the usual way to handle this (if there is one) ?
Thanks in advance.