Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.5
-
None
Description
DeltaSpike uses a filter to record the request and response objects for injection in that thread. This filter is configured in web-fragment.xml, which is loaded before other web-fragments, but not before web.xml. Filters from web.xml will be first in the chain, breaking request and response injection into these filters with "Attempt to access the request/response without an active HTTP request" (RequestResponseHolder:85).
We are moving from Solder, where the request and response objects were recorded in a ServletRequestListener, which is always fired first, regardless of it's position in the web.xml/web-fragment.xml. I think DeltaSpike should use the same approach.
For now, a workaround is to copy the configuration of RequestResponseHolderFilter to your web.xml and put it before all other filters.