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 3707] New: - Custom action attribute of type Object does not accept literal string value
Date Tue, 18 Sep 2001 22:17:29 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3707>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3707

Custom action attribute of type Object does not accept literal string value

           Summary: Custom action attribute of type Object does not accept
                    literal string value
           Product: Tomcat 4
           Version: 4.0 Release Candidate 2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: hans@gefionsoftware.com


JSP 1.2 adds a new conversion rule for literal string to Object, but Jasper 
generates invalid code for this case. For instance, a custom action tag handler 
with this setter method:

  public void setItems(Object o)

use like this in a JSP page:

  <demo:myTag items="foo" />

results in code like this:

  _jspx_th_pe_myTag_1.setItems(new String(foo));

This, in turn, leads to a compilation error since there's no String named "foo".

The correct code should be like:

  _jspx_th_pe_myTag_1.setItems("foo");

Mime
View raw message