File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "No getter method available" Watch "No getter method available" New topic

No getter method available

kumar raj

Joined: Sep 05, 2005
Posts: 2
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...

- the relevant form definition
<form-bean name="AMEnrollmentForm" type="" />
- the relevant action mapping
<action path="/AMEnrollment" type="">
<forward name="success" path="/jsp/am_enrollment.jsp" />

Java code:

- relevant snippets from action class

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


-<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>


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(
at org.apache.struts.taglib.bean.WriteTag.doStartTag(

Please help me.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63532

Moved to the Struts forum.

[Asking smart questions] [About Bear] [Books by Bear]
Stefan Evans

Joined: Jul 06, 2005
Posts: 1518
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:
subject: No getter method available
It's not a secret anymore!