<bean:write name="testMatt" property="userId" />
should work. I just lowercased the U in UserId...

Pls. check JavaBeans specifications for naming of property fields.

--aamir


-----Original Message-----
From: Matt Petteys [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 3:12 AM
To: [EMAIL PROTECTED]
Subject: \"No getter method\" error when using Bean:Write



Can someone point out what I am doing wrong here..  Or is this some kind of 
bug??

In my JSP, this code fragement works fine..

<jsp:useBean id="testMatt" class="test.WebForm" scope="session" />
<%= testMatt.getId() %><br>
<%= testMatt.getUserId() %><br>

But when I try to use the following code fragement it blows up on the 
property "UserId".  If i remove that "UserId" property, the "id" property is 
retrieved fine.

<bean:write name="testMatt" property="id" />
<bean:write name="testMatt" property="UserId" />

The bean seems to be declared correct for UserId..

...<snip>...

    public java.lang.String getUserId()
    {
        return this.userId;
    }

    public void setUserId( java.lang.String userId )
    {
        this.userId = userId;
    }

..<snip>..

Here is the error message, running tomcat in the NetBeans IDE 3.3.1 (3.x?) with 
a struts.jar, rel 1.02.  Any ideas?

javax.servlet.jsp.JspException: No getter method for property UserId of bean 
testMatt
        at org.apache.struts.taglib.template.InsertTag.doEndTag
(InsertTag.java:149)
        at 
WEB_0002dINF.templates._0002fWEB_0002dINF_0002ftemplates_0002fsecure_0002ejspsec
ure_jsp_0._jspService
(_0002fWEB_0002dINF_0002ftemplates_0002fsecure_0002ejspsecure_jsp_0.java:118)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:177)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:318)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
        at org.netbeans.modules.web.tomcat.JspServlet.service
(JspServlet.java:91)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService
(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service
(ServletWrapper.java:372)
        at org.apache.tomcat.facade.RequestDispatcherImpl.forward
(RequestDispatcherImpl.java:194)
        at org.apache.struts.action.ActionServlet.processActionForward
(ActionServlet.java:1692)
        at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1529)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:487)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService
(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service
(ServletWrapper.java:372)
        at org.apache.tomcat.core.ContextManager.internalService
(ContextManager.java:797)
        at org.apache.tomcat.core.ContextManager.service
(ContextManager.java:743)
        at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection
(HttpConnectionHandler.java:210)
        at org.apache.tomcat.service.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run
(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:484)



-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to