aspose file tools*
The moose likes Struts and the fly likes whats problem with following code ** urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "whats problem with following code ** urgent" Watch "whats problem with following code ** urgent" New topic
Author

whats problem with following code ** urgent

Vaibhav Deshpande
Ranch Hand

Joined: Apr 26, 2002
Posts: 33
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

Joined: Feb 05, 2003
Posts: 4727

Well, according to the error you do not have a getCountry method in your ActionForm.

Your jsp is correct.


A good workman is known by his tools.
Vaibhav Deshpande
Ranch Hand

Joined: Apr 26, 2002
Posts: 33
Marc,

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

vebs
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Are the methods public and spelled getCountry (case-sensitive)?
Are you positive the page is using the correct ActionForm (Double check the struts-config)?
 
jQuery in Action, 2nd edition
 
subject: whats problem with following code ** urgent