protected synchronized void configure() {
if (this.cocoonBeanFactory == null) {
this.cocoonBeanFactory = WebApplicationContextUtils.getRequiredWebApplicationContext(this.servletContext);
this.settings = (Settings) this.cocoonBeanFactory.getBean(Settings.ROLE);
this.servletSettings = new ServletSettings(this.settings);
String containerEncoding;
final String encoding = this.settings.getContainerEncoding();
if (encoding == null) {
containerEncoding = "ISO-8859-1";
} else {