Why servletContext.getResource returns null and throws JBWEB000236 java.lang.NullPointerException ?
Issue
- We are in the migrating process from jboss 5.0 GA to jboss eap 6.4 from windows server to RHEL 6.4. Not able to redirect to login page.
- Under what circumstances the following application code will return null, which will lead to the
java.lang.NullPointerException
:
servletContext.getResource( "/" );
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/test].[jsp]] (http-10.130.30.31-8080-19) Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- 5.x
- 4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.