[ 
https://issues.apache.org/jira/browse/TAP5-986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800390#action_12800390
 ] 

Christophe Cordenier commented on TAP5-986:
-------------------------------------------

After more test i have seen that my sendError request bypass default 
ErrorRequestFilter by catching throwable, new code is :

                RequestFilter sendErrorFilter = new RequestFilter() {
                        public boolean service(Request request, Response 
response, RequestHandler handler) throws IOException {
                                try {
                                        return handler.service(request, 
response);
                                } catch (HttpErrorException htex) {
                                        
response.sendError(htex.getHttpError().getStatus(), 
htex.getHttpError().getMessage());
                                        return true;
                                }
                        }
                };


> sendError in onActivate / Tapestry error dispatching
> ----------------------------------------------------
>
>                 Key: TAP5-986
>                 URL: https://issues.apache.org/jira/browse/TAP5-986
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Christophe Cordenier
>         Attachments: TAP5-986.txt
>
>
> With this kind of configuration in web.xml :
> <filter-mapping>
>       <filter-name>tapestryFilter</filter-name>
>       <url-pattern>/*</url-pattern>
>       <dispatcher>ERROR</dispatcher>
>       <dispatcher>REQUEST</dispatcher>
> </filter-mapping>
> <error-page>
>       <error-code>403</error-code>
>       <location>/error/AccessDenied</location>
> </error-page>
> <error-page>
>       <error-code>404</error-code>
>       <location>/error/NotFound</location>
> </error-page>
> RestoreDirtySessionObjects is generating a NullPointerException with this 
> line :
> Session session = request.getSession(false);
> It seems that the dispatching is done in one single thread, then the initial 
> class to RestoreDirtySessionObjects is delay, and request object is lost.

-- 
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