aspose file tools*
The moose likes Struts and the fly likes No getter method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "No getter method" Watch "No getter method" New topic
Author

No getter method

Nicolas Flammel
Ranch Hand

Joined: May 05, 2004
Posts: 32
I have an html text tag in my JSP:
<html:text name="manageUserForm" property="eMail" style="width: 380;" >
</html:text>

I am setting the eMail as manageUserForm.setEMail("abc@aol.com) and then going to the JSP page.

I have getters and setters for the property eMail in the manageUserForm bean
and the form bean is in the request.

But when the jsp loads it does not render the text field at all and I get an exception as:
javax.servlet.jsp.JspException: No getter method for property eMail of bean manageUserForm
javax.servlet.jsp.JspException: No getter method for property eMail of bean manageUserForm
at com.caucho.jsp.QPageContext.handlePageException(QPageContext.java:666)
at _jsp._edituser__jsp._jspService(_edituser__jsp.java:1633)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:506)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:222)
at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:103)
at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:80)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at com.xora.fieldservice.common.logic.FsAccessControlFilter.doFilter(FsAccessControlFilter.java:66)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:534)

What can be the glitch?
Jay Haley
Greenhorn

Joined: May 18, 2004
Posts: 9
This may sound bizarre, but I have had problems with property names when the first or second letter is upper case. Rename you property to all lower case and see if that addresses the problem.
Nicolas Flammel
Ranch Hand

Joined: May 05, 2004
Posts: 32
Changing the property name to all lowercase doesn't seem to rectify the issue. A peculiar thing here is that this exception gets generated only with eMail. All other properties work just fine. I am retrieving the eMail from the database. It comes fine till the action class. And after I set the same email value in the form bean using setEMail("a@aol.com") and print the same using userForm.getEMail(), the value does get printed.
The problem occurs only when the form loads, the email does not get filled in the textfield. In fact the text field itself does not get displayed and all other components after that text field(because of the exception).

This is pretty wierd. Any pther solution people....???
Jay Haley
Greenhorn

Joined: May 18, 2004
Posts: 9
When you renamed your property to all lower case did you rename your field, getters, and setter in the associated action form?
Nicolas Flammel
Ranch Hand

Joined: May 05, 2004
Posts: 32
Sure I did.
Jay Haley
Greenhorn

Joined: May 18, 2004
Posts: 9
Beyond seeing if manageUserForm is actually in the request, I don't think I have any other ideas. And if it is in the request, can you get to any other fields.
 
jQuery in Action, 2nd edition
 
subject: No getter method