• 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

whats problem with following code ** urgent

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am new to struts. I just want to show drop-down box with values od states hard coded.
my code in jsp is like this

<html:select property="country" size="1">
<html ption value="US">USA</html ption>
<html ption value="JPN">Japan</html ption>
</html:select>

I have get and set methods in my Form class for country field

when i try to run my page it gives error msg and page doesn't displayed

no getter method availabe for property country in org.apache.struts.html.BEAN

* I jsut want to show values in drop down with hard coded values.
I tried on web but all info is realted to collection and all other stuff.

can some one plz help.

vebs
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, according to the error you do not have a getCountry method in your ActionForm.

Your jsp is correct.
 
Vaibhav Deshpande
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Marc,

I have get and set methods for country but still i am facing same error.

vebs
 
Marc Peabody
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are the methods public and spelled getCountry (case-sensitive)?
Are you positive the page is using the correct ActionForm (Double check the struts-config)?
 
reply
    Bookmark Topic Watch Topic
  • New Topic