• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do I set a bean value from a dropdown?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're wrong.
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
howdeep --> setHowDeep
howDeep --> setHowDeep

See the decapitalize method in java.beans.Introspector
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic