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=40820>. 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=40820 Summary: Default JSP factory not initialized early enough Product: Tomcat 6 Version: 6.0.0 Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Jasper AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] With the latest TC6 code, I'm seeing a problem that did not exist on earlier TC6 drivers. Sorry that I can't put a finger on when this problem arose. I looked into relevant source files (like JspRuntimeContext) but haven't found the source of the problem. Here's the issue (a testcase will be attached). The app is very simple: it installs ServletContextListener for the purpose of adding a custom ELResolver. It accomplishes this via: public void contextInitialized(ServletContextEvent evt) { ServletContext context = evt.getServletContext(); JspApplicationContext jspContext = JspFactory.getDefaultFactory().getJspApplicationContext(context); jspContext.addELResolver(new ChipsELResolver()); } The problem is that JspFactory.getDefaultFactory() is returning null; see below. Oct 4, 2006 5:32:18 PM org.apache.catalina.core.AprLifecycleListener lifecycleEv ent INFO: The Apache Tomcat Native library which allows optimal performance in produ ction environments was not found on the java.library.path: C:\javaFor6.0BuildJDK 15\java\jre\bin;.;C:\javaFor6.0BuildJDK15\java\bin;c:\mantis2.1\mantis\bin;C:\se tupIBASE;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c: \Python22;C:\Program Files\PC-Doctor for Windows\services;c:\cvsnt-2.0.4;c:\ecli pse;w:\;w:\bin;C:\Program Files\QuickTime\QTSystem\;C:\Diskeeper\;C:\CMVC\exe;C: \CMVC\exe\bin;;C:\CMVCDC50;C:\CMVCDC50;C:\CMVCDC50; Oct 4, 2006 5:32:18 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 4, 2006 5:32:19 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1234 ms Oct 4, 2006 5:32:19 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 4, 2006 5:32:19 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.0-dev Oct 4, 2006 5:32:19 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Oct 4, 2006 5:32:19 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive ELResolverTest.war ChipsListener.contextInitialized evt= javax.servlet.ServletContextEvent[source= [EMAIL PROTECTED] ChipsListener.contextInitialized context= org.apache.catalina.core.ApplicationC [EMAIL PROTECTED] ChipsListener.contextInitialized JspFactory.getDefaultFactory()= null Oct 4, 2006 5:32:20 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Oct 4, 2006 5:32:20 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/ELResolverTest] startup failed due to previous errors Oct 4, 2006 5:32:21 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Oct 4, 2006 5:32:21 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Oct 4, 2006 5:32:21 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/63 config=null Oct 4, 2006 5:32:21 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 2657 ms This is easily reproducible when you deploy the ELResolverTest.war *before* the server has started (I assume JspFactory.setDefaultFactory() hasn't been invoked at the time the listeners are being installed). If you deploy the WAR *after* the server starts, the problem does not manifest and the app works --- until you stop and restart the server. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]