Emond Papegaaij created DELTASPIKE-414:
------------------------------------------
Summary: HttpServletRequest (and others) injection not working in
servlet filters from web.xml
Key: DELTASPIKE-414
URL: https://issues.apache.org/jira/browse/DELTASPIKE-414
Project: DeltaSpike
Issue Type: Bug
Components: Servlet-Module
Affects Versions: 0.5
Reporter: Emond Papegaaij
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.
--
This message was sent by Atlassian JIRA
(v6.1#6144)