You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Zsolt Koppany <zk...@web.de> on 2002/11/16 09:23:56 UTC

Hi,

I want to access the form data using the command:
 <bean:struts id="form" formBean="loginForm"/>

"loginForm" is defined in "struts-config.xml" as follows:
    <form-bean      name="loginForm"
                    type="cv.security.LoginForm" />

I get the error attached below for the command as follows:
<logic:notEmpty name="form" property="message" >

The form does have a getMessage() method.

How can I fix this problem?


ERROR Message:
[ServletException in:/admin/login.jsp] No getter method for property message 
of bean form' javax.servlet.ServletException: No getter method for property 
message of bean form at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494) 
at org.apache.jsp.login_jsp._jspService(login_jsp.java:277) at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) 
at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575) 
at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498) 
at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:820) 
at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:395) 
at

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Posted by Andrew Hill <an...@gridnode.com>.
Nah, getMessage() would be for a property named "message".
Zsolt, can you post the code for the form?

-----Original Message-----
From: vze49jqg [mailto:vze49jqg@verizon.net]
Sent: Saturday, November 16, 2002 17:53
To: Struts Users Mailing List
Subject: Re: <bean:struts problem


Hi,

my  2 cents :

=> <logic:notEmpty name="form" property="message" >

=> The form does have a getMessage() method.

Please make sure that You are calling
<logic:notEmpty name="form" property="Message" >

Regards
Gopal


----- Original Message -----
From: "Zsolt Koppany" <zk...@web.de>
To: <st...@jakarta.apache.org>
Sent: Saturday, November 16, 2002 3:23 AM
Subject: <bean:struts problem


Hi,

I want to access the form data using the command:
 <bean:struts id="form" formBean="loginForm"/>

"loginForm" is defined in "struts-config.xml" as follows:
    <form-bean      name="loginForm"
                    type="cv.security.LoginForm" />

I get the error attached below for the command as follows:
<logic:notEmpty name="form" property="message" >

The form does have a getMessage() method.

How can I fix this problem?


ERROR Message:
[ServletException in:/admin/login.jsp] No getter method for property message
of bean form' javax.servlet.ServletException: No getter method for property
message of bean form at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:494)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:277) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
20)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:395)
at

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Posted by vze49jqg <vz...@verizon.net>.
Hi,

my  2 cents :

=> <logic:notEmpty name="form" property="message" >

=> The form does have a getMessage() method.

Please make sure that You are calling
<logic:notEmpty name="form" property="Message" >

Regards
Gopal


----- Original Message -----
From: "Zsolt Koppany" <zk...@web.de>
To: <st...@jakarta.apache.org>
Sent: Saturday, November 16, 2002 3:23 AM
Subject: <bean:struts problem


Hi,

I want to access the form data using the command:
 <bean:struts id="form" formBean="loginForm"/>

"loginForm" is defined in "struts-config.xml" as follows:
    <form-bean      name="loginForm"
                    type="cv.security.LoginForm" />

I get the error attached below for the command as follows:
<logic:notEmpty name="form" property="message" >

The form does have a getMessage() method.

How can I fix this problem?


ERROR Message:
[ServletException in:/admin/login.jsp] No getter method for property message
of bean form' javax.servlet.ServletException: No getter method for property
message of bean form at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:494)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:277) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
20)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:395)
at

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Posted by Martin Cooper <ma...@apache.org>.

On Sat, 16 Nov 2002, Zsolt Koppany wrote:

> Hi,
>
> I want to access the form data using the command:
>  <bean:struts id="form" formBean="loginForm"/>
>
> "loginForm" is defined in "struts-config.xml" as follows:
>     <form-bean      name="loginForm"
>                     type="cv.security.LoginForm" />
>
> I get the error attached below for the command as follows:
> <logic:notEmpty name="form" property="message" >
>
> The form does have a getMessage() method.

The problem is that <bean:struts> does not return the form bean, it
returns the form bean *configuration*. The <bean:struts> tag gives you
access to the configuration data from your struts config file. If you want
to access the form bean itself, you should be doing so directly, as it is
in either request or session scope.

--
Martin Cooper


>
> How can I fix this problem?
>
>
> ERROR Message:
> [ServletException in:/admin/login.jsp] No getter method for property message
> of bean form' javax.servlet.ServletException: No getter method for property
> message of bean form at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494)
> at org.apache.jsp.login_jsp._jspService(login_jsp.java:277) at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
> at
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:575)
> at
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:498)
> at
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:820)
> at
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:395)
> at
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>