This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes No getter method available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "No getter method available" Watch "No getter method available" New topic
Author

No getter method available

kumar raj
Greenhorn

Joined: Sep 05, 2005
Posts: 2
Hi,
I am writing an application, which uses struts and hibernate. when i try to retrive the valiues from bean, i get the following error:
E SRVE0026E: [Servlet Error]-[No getter method for property agentName of bean aMEnrollment]

The following is the code iam using...

struts-config.xml:
- the relevant form definition
<form-bean name="AMEnrollmentForm" type="com.abc.forms.AMEnrollmentForm" />
- the relevant action mapping
<action path="/AMEnrollment" type="com.abc.actions.AMEnrollmentAction">
<forward name="success" path="/jsp/am_enrollment.jsp" />
</action>

Java code:

- relevant snippets from action class

query = session.createQuery("from com.abc.entities.Agent " + params);
results= query.list();
request.setAttribute("aMEnrollments", results);


JSP:

-<jsp:useBean id="aMEnrollments" type="java.util.List" scope="request"/>
<logic:iterate id="aMEnrollment" name="aMEnrollments" scope="request" >
<td><bean:write name="aMEnrollment" property="agentName" /></td>

stacktrace:

E SRVE0026E: [Servlet Error]-[No getter method for property agentName of bean aMEnrollment]: javax.servlet.jsp.JspException: No getter method for property agentName of bean aMEnrollment
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:973)
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:225)

Please help me.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
You are iterating through a list of enrolments, retrieving a bunch of AMEnrollment objects?
The class AMEnrollment DOES have a method public String getAgentName() right?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No getter method available
 
Similar Threads
I am getting error when starting Tomcat .How can I rectify it?
Hi All Struts error
No getter method for property: "userName" of bean: "result"
No getter method available
problem getting data from form bean