tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject Bug in runtime/JspFactoryImpl.java
Date Thu, 17 May 2001 09:09:47 GMT
Hi,

Excuse the cross post to User/Dev but this problem has been reported by
others in user.

Further to yesterday's message re jasper/tomcat exceptions, it seems
that there is either a bug in the coed generation or the
JspFactoryImpl.  If the generated code gets an exception pageContext is
never set so in the finally clause the releasePageContext will be passed
null.

Seems to me the releasePageContext should either check for null or the
generated code should check for null.  In the generated number guess
code from the examples there is

---------------------------------------
        } catch (Exception ex) {
            if (out != null && out.getBufferSize() != 0)
                out.clearBuffer();
            if (pageContext != null)
pageContext.handlePageException(ex);
        } finally {
            if (out != null) out.flush();
            if (_jspxFactory != null)
_jspxFactory.releasePageContext(pageContext);
        }
---------------------------------------
the exception checks for null but not the finally.

Who might be the best person to decide where the fix should go??

This causes big problems if security is turned on because any access
control failure makes this problem occur.

Rgds
-- 
Antony Bowesman
Teamware Group 
adb@teamware.com
tel: +358 9 5128 2562
fax: +358 9 5128 2705

Mime
View raw message