if(hasErrors()) {
reportErrors();
return EVAL_PAGE;
}
BundleMap bundleMap = null;
Object obj = pageContext.getAttribute("bundle");
if(obj == null) {
// NetUI v2 -- in JSP 2.0 EL, the BundleMap is dropped into the PageContext so that
// it's available to the EL runtime.
bundleMap = new BundleMap((HttpServletRequest)pageContext.getRequest(), pageContext.getServletContext());
pageContext.setAttribute("bundle", bundleMap);
}
else if(!(obj instanceof BundleMap)) {
String msg = Bundle.getErrorString("Tags_DeclareBundle_wrongContextType", new Object[]{obj.getClass().getName()});
registerTagError(msg, null);
if(hasErrors())
reportErrors();
return EVAL_PAGE;
}
else bundleMap = (BundleMap)obj;
bundleMap.registerResourceBundle(_name, _bundlePath, locale);
return EVAL_PAGE;
}