[ 
https://issues.apache.org/jira/browse/WICKET-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586147#action_12586147
 ] 

Johan Compagner commented on WICKET-1478:
-----------------------------------------

We did clean it up, but the problem is that it is already set for the first 
request
As i said doing this:

httpServletResponse.sendError(errorCode)

will result in a redispatch of that code immediately so inside that call this 
is sort of the stacktrace:

wicketfilter.doget() 
wicketfilter.dofilter() -> does the second request
jettycode
httpServletResponse.sendError(errorCode)
WebErrorResponseRequestTarget.response()
wicketfilter.doget()
wicketfilter.dofilter()  -> does the first request

so you see if we would cleanup ALL the thread locals in the second request 
wicketfilter.
We have a problem when the  WebErrorResponseRequestTarget.response() comes back
Because everything is cleared, The Application is gone the RequestCycle is gone.
So everything that comes after that (detach and so on) will bomb out because 
there are no more threadlocals.




> AbortWithWebErrorCodeException in onBeforeRender causes WicketRuntimeException
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-1478
>                 URL: https://issues.apache.org/jira/browse/WICKET-1478
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Michael Sparer
>            Assignee: Johan Compagner
>            Priority: Minor
>             Fix For: 1.3.4
>
>         Attachments: quickstart404.jar
>
>
> Using custom error pages as described on 
> http://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html, a 
> wicket RTE gets thrown "There is no application attached to current thread 
> [threadname]" when a AbortWithWebErrorCodeException is thrown in the 
> onBeforeRender method of a WebPage. Note that this _only_ happens when using 
> a custom error page defined in web.xml.
> See attached quickstart for the complete stacktrace (and my usecase)
> See also the mailinglist entry on 
> http://www.nabble.com/Throw-AbortWithWebErrorCodeException-in-onBeforeRender-to16446341.html#a16473849

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to