}
protected Compiler createCompiler(Map<String, Object> appMap, WebConfiguration webConfig) {
Compiler c = new SAXCompiler();
// load decorators
String decParam = webConfig
.getOptionValue(FaceletsDecorators);
if (decParam != null) {
decParam = decParam.trim();
String[] decs = Util.split(appMap, decParam, ";");
TagDecorator decObj;
for (String decorator : decs) {
try {
decObj = (TagDecorator) ReflectionUtil.forName(decorator)
.newInstance();
c.addTagDecorator(decObj);
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE,
"Successfully Loaded Decorator: {0}",
decorator);
}
} catch (Exception e) {
if (LOGGER.isLoggable(Level.SEVERE)) {
LOGGER.log(Level.SEVERE,
"Error Loading Decorator: " + decorator,
e);
}
}
}
}
// skip params?
c.setTrimmingComments(
webConfig.isOptionEnabled(
BooleanWebContextInitParameter.FaceletsSkipComments));
c.addTagLibrary(new CoreLibrary());
c.addTagLibrary(new CoreLibrary("http://xmlns.jcp.org/jsf/core"));
c.addTagLibrary(new HtmlLibrary());
c.addTagLibrary(new HtmlLibrary("http://xmlns.jcp.org/jsf/html"));
c.addTagLibrary(new UILibrary());
c.addTagLibrary(new UILibrary("http://xmlns.jcp.org/jsf/facelets"));
c.addTagLibrary(new JstlCoreLibrary());
c.addTagLibrary(new JstlCoreLibrary("http://java.sun.com/jstl/core"));
c.addTagLibrary(new JstlCoreLibrary("http://xmlns.jcp.org/jsp/jstl/core"));
c.addTagLibrary(new PassThroughAttributeLibrary());
c.addTagLibrary(new PassThroughElementLibrary());
c.addTagLibrary(new FunctionLibrary(JstlFunction.class, "http://java.sun.com/jsp/jstl/functions"));
c.addTagLibrary(new FunctionLibrary(JstlFunction.class, "http://xmlns.jcp.org/jsp/jstl/functions"));
if (isDevModeEnabled()) {
c.addTagLibrary(new FunctionLibrary(DevTools.class, "http://java.sun.com/mojarra/private/functions"));
c.addTagLibrary(new FunctionLibrary(DevTools.class, "http://xmlns.jcp.org/mojarra/private/functions"));
}
c.addTagLibrary(new CompositeLibrary());
c.addTagLibrary(new CompositeLibrary("http://xmlns.jcp.org/jsf/composite"));
return c;
}