Volantis volantis = ApplicationInternals.getVolantisBean(application);
// Get the servlet configuration from the mcs-config.xml file. This
// is an optional configuration. If not present, the servlet filter
// operates in "pass-through" mode.
ServletFilterConfiguration config =
volantis.getServletFilterConfiguration();
if (config != null) {
passThroughMode = false;
excludedDevices = config.getExcludedDevices();
if (logger.isDebugEnabled()) {
Iterator it = excludedDevices.iterator();
while (it.hasNext()) {
String device = (String) it.next();
logger.debug("Read excluded device: " + device);
}
}
List xdimeMimeTypes = config.getMimeTypes();
if (logger.isDebugEnabled()) {
Iterator it = xdimeMimeTypes.iterator();
while (it.hasNext()) {
String type = (String) it.next();
logger.debug("Read mime type: " + type);
}
}
try {
addDescendantDevices();
} catch (RepositoryException e) {
logger.error("mcs-filter-child-device-error", e);
throw new ServletException(
exceptionLocalizer.format(
"mcs-filter-child-device-error"),
e);
}
// Get the page cache configuration from the mcs-config.xml file.
// This is an optional configuration. If not present, the page
// cache will not be enabled.
RenderedPageCacheConfiguration cacheConfig =
config.getRenderedPageCacheConfig();
if (cacheConfig != null) {
// use an XDIMERequestProcess that performs caching
xdimeRequestProcessor =
new CachingXDIMERequestProcessor(
servletContext,
xdimeMimeTypes,
cacheConfig,
config.getJsessionIdName());
} else {
// not caching so use the simple processor
xdimeRequestProcessor = new SimpleXDIMERequestProcessor(
servletContext, xdimeMimeTypes);
}