tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikola Milutinovic <Nikola.Milutino...@ev.co.yu>
Subject Strange bean problem in JSP
Date Wed, 03 Apr 2002 20:46:24 GMT
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(JspRuntimeLibrary.java,

Compiled Code)
         at 
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.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:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message