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 39804] New: - JspFactory.getDefaultFactory() returns null
Date Tue, 13 Jun 2006 18:34:12 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=39804>.
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=39804

           Summary: JspFactory.getDefaultFactory() returns null
           Product: Tomcat 6
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: ssilvert@jboss.com


Section 5.6.1 of the JSF 1.2 spec requires that an ELResolver be added to the
JspApplicationContext at application initialization time.  So, JSF does this in
a ServletContextListener: 

JspFactory factory = JspFactory.getDefaultFactory();

JspApplicationContext appCtx =
factory.getJspApplicationContext(servletContext);

appCtx.addELResolver(myResolver);

However, at this point the org.apache.jasper.compiler.JspRuntimeContext
class has not been loaded.  So, getDefaultFactory() returns null.

If I add this to my ServletContextListener then everything works:
Class.forName("org.apache.jasper.compiler.JspRuntimeContext");

This workaround is Tomcat-specific and doesn't belong in JSF code.  Tomcat's
implementation of getDefaultFactory() should load the JspRuntimeContext if it
has not already been created.  It should never return null.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message