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

Johan Compagner updated WICKET-1478:
------------------------------------

    Assignee: Ate Douma  (was: Johan Compagner)

OK, when setting an error status (httpServletResponse.sendError(errorCode)), 
the container will try to resolve that in that call itself. This will result in 
a second wicket call in the same thread. Because of that we will clean all 
thread locals like RequestCycle and Application. I do reset those now to the 
previous values.

The problem is that we have more thread locals which also could be affected. 
Like Sessions thread locals (dirty pages) Also the RequestContext for our 
portlet support how to handle that?
We need to look at this in a next release a bit more (1.4)

So for the most part this is fixed (if not everything) for the next 1.3.x 
release.

Ate: can you quickly look at this code in WicketFilter:
                                // unset the application thread local if it 
didn't exist already.
                                if (previous == null)
                                {
                                        Application.unset();
                                        RequestContext.unset();
                                }
                                else
                                {
                                        Application.set(previous);
                                }
You see i dont do anything with RequestContext when the previous app was there..
Can i do that? Or is this not an issue at all in portlets?

Reassign to me when you have looked at it.

> 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: Ate Douma
>            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