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 30644] New: - Invalid Java code generation from JSP
Date Fri, 13 Aug 2004 09:06:56 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=30644>.
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=30644

Invalid Java code generation from JSP 

           Summary: Invalid Java code generation from JSP
           Product: Tomcat 5
           Version: 5.0.19
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: d_bajracharya@yahoo.com


An object named clientList of type ArrayList is passed to JSP page from servlet.
In JSP page, as part of jsp:useBean, java.util.List is specifed and scope
specified is request. 
(<jsp:useBean id="requestData" scope="request" class="scrub.util.RequestData" />)
The generated JAVA page fails to compile due to an attempt to create
java.util.List if the passed object is null. I think the generated code should
not try to create. The support for interface is very important.

Code snippet:

         java.util.List clientList =
_jspx_page_context.getAttribute("clientList");
        if (clientList == null){
           clientList = new java.util.List();
           _jspx_page_context.setAttribute("clientList", clientList,
PageContext.REQUEST_SCOPE);
         }

---------------------------------------------------------------------
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