[
http://issues.apache.org/jira/browse/TOMAHAWK-201?page=comments#action_12371487
]
Daniel Bernstein commented on TOMAHAWK-201:
-------------------------------------------
I located the problem: when I turn off my security constraint (I'm using
container managed authentication (JAAS)) the problem goes away. My login entry
point is /login.faces.
The problem is that the context that is being returned is null. Upon refresh,
the faces context has been initialized so the problem disappears. Sort of makes
sense that it's possible that faces context isn't being initialized in the
right order when entering via the JAAS entry point.
if I replace line 996 in HtmlRendererUtils.java
contentTypeListString =
(String)context.getExternalContext().getRequestHeaderMap().get("Accept");
with
if(context != null){
contentTypeListString =
(String)context.getExternalContext().getRequestHeaderMap().get("Accept");
}
the problem goes away.
> Null pointer exception in
> org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils.selectContentType
> ---------------------------------------------------------------------------------------------------------------
>
> Key: TOMAHAWK-201
> URL: http://issues.apache.org/jira/browse/TOMAHAWK-201
> Project: MyFaces Tomahawk
> Type: Bug
> Versions: 1.1.2-SNAPSHOT
> Environment: Linux, JBoss Head
> Reporter: Arash Bijanzadeh
>
> I am getting a null pointer excetion in
> org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils.selectContentType.
> The problemis my browser(Mozilla) do not send a accept header, abd the clas
> tryin to get it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira