final ModuleManagementFacade moduleManagementFactory = WebServletUtils.getModuleManagementFacade(servletContext);
HttpServletRequest wrappedRequest = null;
if (moduleManagementFactory != null) {
HttpRequestWrapper factory = ObjectUtils.cast(moduleManagementFactory.getBean(WebConstants.REQUEST_WRAPPER_FACTORY_BEAN_NAME), HttpRequestWrapper.class);
if (factory != null) {
wrappedRequest = factory.getWrappedRequest(request, servletContext, moduleMapping, applicationId);
} else {
wrappedRequest = request;
}
} else {
wrappedRequest = request;