You should check the capitalization of your bean properties:
is it eMail or EMail?
the jsp tag: jsp:setProperty name=dataBean property=eMail/
calling the set method: dataBean.setEMail( request.getParameter( eMail )
);
I would try jsp:setProperty name=dataBean property=EMail/.
Robert Sayre
-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 3:46 PM
To: Tomcat Users List
Subject: Strange bean problem in JSP
Hi all.
I have a strange bean problem in my JSP page.
The bean in question has several properties, most of them are R/W. Anyway,
those
that I'm trying to set from the request parameters are R/W.
My problem is that one of the properties *refuses* to be set. That is
eMail.
Others, like name, surname and mailBox are set just fine.
These are the tests I've tried:
--
jsp:useBean id=dataBean class=EUserBean scope=request
jsp:setProperty name=dataBean property=*/
/jsp:useBean
--
This sets all properties except eMail
--
jsp:useBean id=dataBean class=EUserBean scope=request
jsp:setProperty name=dataBean property=*/
jsp:setProperty name=dataBean property=eMail/
/jsp:useBean
--
This produces an exception:
2002-04-03 13:01:46 StandardWrapperValve[jsp]: Servlet.service() for servlet
jsp
threw exception org.apache.jasper.JasperException: Cannot find any
information
on property 'eMail' in a bean of type 'EUserBean'
at
org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRunt
imeLibrary.java,
Compiled Code)
at
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibra
ry.java,
Compiled Code)
However, this succedes and produces the desired result (setting of eMail
property):
jsp:useBean id=dataBean class=EUserBean scope=request
jsp:setProperty name=dataBean property=*/
/jsp:useBean
%
dataBean.setEMail( request.getParameter( eMail ) );
%
I know I can use this as a workaround, but I'd like to know what the real
problem is.
TYIA,
Nix.
--
To unsubscribe: mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]