Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

No getter method available for property epr for bean under name org.apache.struts.taglib.html.BEAN

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to use struts <html:select/> tag.I am getting the bellow mentioned error.No getter method available for property epr for bean under name org.apache.struts.taglib.html.BEAN.

Code snippet:

form:
private String epr="";
public String getEpr() {
return epr;
}

public void setEpr(String epr) {
this.epr = epr;
}

Action:

Collection<HtmlSelectOption> eprList = new ArrayList<HtmlSelectOption>();
eprList.add(options);
eprList.add(options1);
currentForm.setEprList(eprList);

currentForm.setEprList(eprList);
session.setAttribute("epr", currentForm.getEpr());
session.setAttribute("quoteHubForm", currentForm);

jsp:

<html:select property="epr" >
<html:option value="0">Select EPR</html:option>
<html:optionsCollection name="quoteHubForm" property="eprList" label="displayName" value="id" />
</html:select>

Please help
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This will come when you might not have configured struts-config.xml correctly.

Did you defined the form in struts-config.

<form-beans>
<form-bean name="someForm" type="com.xxx.urformbean">

</form-beans>
<action-mappings>
<action path="/initDept"
name="someForm"
type="com.someActionClass">
<forward name="success" path="/pages/abc.jsp"/>
</action>
</action-mappings>

this will do.
 
catch it before it slithers away! Oh wait, it's a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic