• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

whats problem with following code ** urgent

 
Vaibhav Deshpande
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • 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
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • 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)?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic