| Author |
How do I set a bean value from a dropdown?
|
Patrick Noah
Greenhorn
Joined: Aug 22, 2011
Posts: 28
|
|
I have the following form, myform.html:
I want to set this howdeep value in my bean, UserData.java:
I do this by using <jsp:set Property> in my SaveName.jsp:
I want to see if this variable is getting set by using jsp:getProperty but I get the following error: org.apache.jasper.JasperException: Cannot find any information on property 'howdeep' in a bean of type 'user.UserData' but YOU CAN CLEARLY SEE IN BOLD THAT I DO HAVE THIS PROPERTY! What is wrong? Thanks.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
Patrick Noah wrote: but YOU CAN CLEARLY SEE IN BOLD THAT I DO HAVE THIS PROPERTY!
Please don't post in all-caps. Thanks.
And, no, you don't. Look again. Carefully.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Patrick Noah
Greenhorn
Joined: Aug 22, 2011
Posts: 28
|
|
Bear Bibeault wrote:
Patrick Noah wrote: but YOU CAN CLEARLY SEE IN BOLD THAT I DO HAVE THIS PROPERTY!
Please don't post in all-caps. Thanks.
And, no, you don't. Look again. Carefully.
Sorry for the all caps . The property "howdeep" is in UserData.java, in lowercase. If I'm only trying to set "howdeep", what am I possibly missing? Are you possibly referring to setHowDeep(String value) ? My understanding is that setter method names are not case-sensitive. Please correct me if I'm wrong.
Thanks!
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
|
You're wrong.
|
 |
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1004
|
|
howdeep --> setHowDeep
howDeep --> setHowDeep
See the decapitalize method in java.beans.Introspector
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
|
I'm not sure what your point is, Stefan. Are you claiming that the property can be referenced by either of howDeep or howdeep successfully? Actual testing does not bear that out.
|
 |
 |
|
|
subject: How do I set a bean value from a dropdown?
|
|
|