Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0-beta-1
-
None
-
None
Description
In GlobalConfiguratorImpl._attachRequestContext(ExternalContext ec), if current RequestContext is null but cached RequestContext is not, reattach the cached one.
This causes problem for cases like when a request is terminated due to runtime exception and the application defines its error page to handle it, so the same physical request is dispatched to the same servlet, but the original RequestContext was released while it was terminated. The request may go through JSF lifecycle again, but its RequestContext is null now, which is in a wrong state and causes exception. The cached RequestContext is for the same physical request, so it needs to be reattached to RequestStateMap.