[ 
https://issues.apache.org/jira/browse/DELTASPIKE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Kaltepoth resolved DELTASPIKE-414.
--------------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.6

I just committed a fix for this issue. I added a ServletRequestListener that 
binds the request to the thread which will happen immediately after the request 
is created. There is also an integration test that verifies that the scenario 
you described now works as expected.

> 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
>            Assignee: Christian Kaltepoth
>             Fix For: 0.6
>
>
> 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.2#6252)

Reply via email to