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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "No getter method for property" Watch "No getter method for property" New topic
Author

No getter method for property

Vijay Chandran
Ranch Hand

Joined: Jan 07, 2007
Posts: 178
Dear friends,

Kindly help me in resolving this exception!

The following is my Action class:



This is my ActionForm class:


This is a simple model class:



This is my struts-config.xml


This is my input JSP: "form.jsp"



This is the output JSP: "result.jsp"



And the Exception stacktrace is:
javax.servlet.ServletException: No getter method for property: "brands" of bean: "Types"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.result_jsp._jspService(result_jsp.java:134)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

Kindly help me in resolving the issue.

Thanks & Regards,
Vijay



Balagopal Kannampallil
Ranch Hand

Joined: Oct 18, 2004
Posts: 136

I can see that in your execute method you are creating a List of String
and putting this list into request. In the resultant jsp you are trying to get this list (which contains only Strings) from request and trying to access a property brands from it which the list of Strings has no clue of.


SCJP 5.0 and now fighting with ExtJS
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No getter method for property