tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32591] New: - getter Exception where setter has the wrong signature
Date Wed, 08 Dec 2004 17:39:34 GMT
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=32591>.
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=32591

           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


Mime
View raw message