org.apache.catalina.core.ApplicationContext.getResource() uses File.toURL(), which is deprecated in favour of File.toURI().toURL() because it does not escape characters correctly. With the FileURLConnection changes in EAP 5.1.2, this causes failures in the JSP taglib handling code if JBoss is installed into a path containing a space.
This worked in EAP 5.1.1 and earlier because the JBPAPP-8068 change in 5.1.2 altered URL handling.