try {
ServletContext scontext = webApp.getServletContext();
ImmutableScriptResources scriptResources = (ImmutableScriptResources) scontext.getAttribute(SCRIPT_RESOURCES_ATTR);
if (scriptResources != null) {
javascriptConfigService.remove(scriptResources, scontext.getContextPath());
scontext.removeAttribute(SCRIPT_RESOURCES_ATTR);
}
} catch (Exception ex) {
log.error(
"An error occurred while removing script resources for the context '"
+ webApp.getServletContext().getServletContextName() + "'", ex);