You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/12/08 18:06:27 UTC
DO NOT REPLY [Bug 32589] New: -
getter Exception where setter has the wrong signature
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32589>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32589
Summary: getter Exception where setter has the wrong signature
Product: Tomcat 5
Version: 5.5.4
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: fmo@witbe.net
I defined a bean with a getter that return a type A and with a setter with the
same suffix but the signature doesn't take an argument of type A. It seems that
the getter cannot be called with a el expression any more with tomcat5.5. It
worked fine with tomcat5.0.
I noticed the same thing with a bean with two getters (the method getBar()).
I found a workaround but I'd like to know if it is a real bug or if my bean
doesn't respect the el documentation.
Thanks in advance !
Fabrice.
This jsp :
---------------------------------
<%@ taglib uri="/tags/struts-bean" prefix="bean" %><%@
taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
net.witbe.business.Foo fa = new net.witbe.business.Foo();
request.setAttribute("FooAttribute",fa);
%>
The foo string is @${FooAttribute.foo}@
---------------------------------
calling this bean :
---------------------------------
package net.witbe.business;
public class Foo {
public long getFoo() {
return 1;
}
public void setFoo(int bh,long countm) {
// nop
}
public long getBar() {
return 5;
}
public long getBar(int num) {
return 6;
}
}
---------------------------------
provoque an Exception :
---------------------------------
exception
javax.servlet.ServletException: Unable to find a value for "foo" in object of
class "net.witbe.business.Foo" using operator "."
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:845)
...
cause m�re
javax.servlet.jsp.el.ELException: Unable to find a value for "foo" in object of
class "net.witbe.business.Foo" using operator "."
org.apache.commons.el.Logger.logError(Logger.java:481)
org.apache.commons.el.Logger.logError(Logger.java:498)
...
---------------------------------
Fabrice.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org