I just upgraded to JBoss 4.0.4RC1. I did not have this error in the previous version of JBoss.
There is already a JIRA entry on this issue: http://issues.apache.org/jira/browse/MYFACES-1121 I just picked up the latest nightly build of MyFaces. This problem has not yet been fixed. There is an admittedly "hack" solution presented in JIRA. Any chance a real solution can get into the nightly build? Thx. :) FacesContext.getCurrentContext is null in the page following a successful login. The login is a standard JSP forms-based login. The form redirects to j_security_check as normal, then presumably it gets automatically redirected to the originally requested page. That's when the error occurs (see stack trace below). If I then refresh the page, it displays correctly. 12:46:14,137 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception java.lang.NullPointerException at org.apache.myfaces.renderkit.html.HtmlRendererUtils.selectContentType(HtmlRendererUtils.java:995) at org.apache.myfaces.renderkit.html.util.DefaultAddResource.writeResponse(DefaultAddResource.java:786) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:143) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com