I am trying to use a custom ELResolver that will work with the existing
default resolvers. Initially, I tried just adding it within the
face-config.xml as follows:
<application>
<el-resolver>demo.resolver.DCELResolver</el-resolver>
</application>
It worked to add my resolver, but it got rid of all the other resolvers in
the chain.
Next, I tried to add it through the JspApplicationContext. I did this by
adding the following code to a servlet context listener (the
contextInitialized method).
try {
// This is a hack due to a bug in Tomcat 6.0
Class.forName("
org.apache.jasper.compiler.JspRuntimeContext");
} catch (ClassNotFoundException cnfe) {
throw new RuntimeException("Failed to load Jsp Runtime Context");
}
ServletContext servletContext = servletContextEvent.getServletContext();
JspFactory jspFactory = JspFactory.getDefaultFactory();
JspApplicationContext jspApplicationContext =
jspFactory.getJspApplicationContext(servletContext);
jspApplicationContext.addELResolver(new DCELResolver());
This code runs just fine, however my resolver is ignored. I placed
System.out.println calls within all the methods to check if they were ever
called and they weren't. Instead, property resolutions just failed without
ever consulting my resolver. What might I be missing?
The only warning that occurs at startup is the following:
WARNING: JSF1033: Resource injection is DISABLED.
I am using Apache Tomcat version 6.0.7, jstl 1.2, web.xml is using
web-app-2_5.xsd.
Thanks in advance for any hints or suggestions.
Jason
--
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)