//load /WEB-INF/zk.xml
try {
final URL cfgUrl = _ctx.getResource("/WEB-INF/zk.xml");
if (cfgUrl != null)
parser.parse(cfgUrl, config, new ServletContextLocator(_ctx));
} catch (Throwable ex) {
log.error("Unable to load /WEB-INF/zk.xml", ex);
}
//after zk.xml is loaded since it depends on the configuration
_cwr = ClassWebResource.getInstance(_ctx, _updateURI);
_cwr.setCompress(new String[] {"js", "css", "html", "xml"});
String s = Library.getProperty("org.zkoss.web.util.resource.dir");
if (s != null && s.length() > 0) {
if (s.charAt(0) != '/') s = '/' + s;
_cwr.setExtraLocator(new ServletContextLocator(_ctx, null, s));
}
Labels.register(new ServletLabelLocator(_ctx));
Labels.setVariableResolver(new ServletLabelResovler());