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 7989] New: - <jsp:setProperty> and <jsp:getProperty> ignore information from <jsp:useBean>
Date Thu, 11 Apr 2002 23:03:33 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=7989>.
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=7989

<jsp:setProperty> and <jsp:getProperty> ignore information from <jsp:useBean>

           Summary: <jsp:setProperty> and <jsp:getProperty> ignore
                    information from <jsp:useBean>
           Product: Tomcat 4
           Version: 4.0.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: alex.yiu@oracle.com
                CC: alex.yiu@oracle.com


As of Tomcat 401, when <jsp:getProperty> or <jsp:setProperty> is used
without a <jsp:useBean> or a related custom action, it will raise
NEITHER a compile-time NOR request-time exception, the logic can find
the bean in **any** one of scope.
 
Using "colrs.jsp" from Tomcat 401 example,
-------------------------------------------------------------------
<jsp:useBean id="cb" scope="session" class="colors.ColorGameBean" />
<jsp:setProperty name="cb" property="*" />
-------------------------------------------------------------------
 
The related java code generated for <jsp:setProperty>:
-------------------------------------------------------------------
JspRuntimeLibrary.introspect(pageContext.findAttribute("cb"), request);
-------------------------------------------------------------------

The useBean introduces explicitly the "cb" from "session" scope.
However, the generated java code will just take any "cb" object from any
one of the scopes. If there is a "cb" from the "page" scope, it will
just take it, instead of "cb" from "session" scope. The <jsp:useBean>
information becomes totally irrelevant to <jsp:setProperty>.

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message