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/02/19 03:11:43 UTC

DO NOT REPLY [Bug 27056] New: - Jasper taglib bug!!

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=27056>.
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=27056

Jasper taglib <useBean> bug!!

           Summary: Jasper taglib <useBean> bug!!
           Product: Tomcat 5
           Version: 5.0.15
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: gogogirl@263.net
                CC: gogogirl@263.net


When I write the snippet code in jsp file like below, the compile error will be 
occured(TestClassName is Interface or abstract class):
------------------
...
<jsp:useBean id="beanId" scope="request" class="TestClassName"/>
...
------------------

So I view the java source code, and find the corresponding snippet code:
------------------
...
TestClassName beanId= null;
synchronized (request) {
    id= (TestClassName) pageContext.getAttribute("beanId", 
PageContext.REQUEST_SCOPE);
    if (beanId== null){
        beanId= new TestClassName();
        pageContext.setAttribute("beanId", beanId, PageContext.REQUEST_SCOPE);
    }
}
...
------------------

It is easy to know that the statement "beanId= new TestClassName();" is wrong 
when TestClassName is Interface or abstract class.

Please fig it !!

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