This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I set a bean value from a dropdown?  RSS feed

 
Patrick Noah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Patrick Noah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're wrong.
 
Stefan Evans
Bartender
Posts: 1834
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
howdeep --> setHowDeep
howDeep --> setHowDeep

See the decapitalize method in java.beans.Introspector
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!