struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hgos...@csc.com.au
Subject Re: error- no getter method for property of bean
Date Tue, 03 Feb 2004 22:09:10 GMT
You will need to change your getter method to getGroup_name()
Struts uses the name of the field when it looks for a getter or setter 
method. It will assume that the first letter of the field name is 
capitalised after the get (as per general JavaBean standards). 
getGroupName will not be recognized as the getter for your property 
group_name (although it would match a property called "groupName"

Cheers,
Heya Gosper
CSC Australia
212 Northbourne Ave, Braddon ACT 2612
Ph: +61 (0) 2 6246 8155  Fax: +61 (0) 2 62468100
MOB: 0401 611779
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.
----------------------------------------------------------------------------------------





"Frank Nguyen" <franktnguyen@sbcglobal.net>
04/02/2004 08:53 AM
Please respond to "Struts Users Mailing List"

 
        To:     "Struts Users Mailing List" <struts-user@jakarta.apache.org>
        cc: 
        Subject:        error- no getter method for property of bean


Hi,

I'm experimenting a simple form, adding a group (3 fields) to a simple, 
one
group table database, following some examples from the Struts book by 
James
Turner. All classes built (with Torque and mysql) and deployed. I couldn't
bring up the form and kept getting the error below. I think something is
wrong w/ my struts setup. Attached are struts config, my jsp, and some
simple java files. Could someone help me on this ? I really appreciate it.

-Frank

Error: 500
Location: /infolink/users/edit_group.jsp
Internal Servlet Error:

javax.servlet.ServletException: No getter method for property group_name 
of
bean org.apache.struts.taglib.html.BEAN
                 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:460)
                 at users.edit_group_1._jspService(edit_group_1.java:550)
                 at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
                 at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                 at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
                 at 
org.apache.tomcat.core.Handler.invoke(Handler.java:322)
                 at 
org.apache.tomcat.core.Handler.service(Handler.java:235)
                 at 
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
                 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91
7)
                 at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
                 at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I
nterceptor.java:176)
                 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
                 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:516)
                 at java.lang.Thread.run(Thread.java:536)
Root cause:
javax.servlet.jsp.JspException: No getter method for property group_name 
of
bean org.apache.struts.taglib.html.BEAN
                 at 
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:742)
                 at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:193)
                 at users.edit_group_1._jspService(edit_group_1.java:241)
                 at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
                 at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                 at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
                 at 
org.apache.tomcat.core.Handler.invoke(Handler.java:322)
                 at 
org.apache.tomcat.core.Handler.service(Handler.java:235)
                 at 
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
                 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91
7)
                 at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
                 at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I
nterceptor.java:176)
                 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
                 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:516)
                 at java.lang.Thread.run(Thread.java:536)


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message