wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: Wicket 6 and Atmosphere framework integration
Date Thu, 30 Aug 2012 13:55:12 GMT
I think AtmosphereServlet should delegate the processing to
WicketFilter internally.
I.e. if there is a request to /error/error404 then Wicket should be
asked to handle it and it will use the configured page.

Please create a quickstart application and attach it to a ticket in Jira.

On Thu, Aug 30, 2012 at 3:48 PM, esajjkh <programmer.sajjad@gmail.com> wrote:
> I have some error pages that are configured in web.xml e.g.
>
>  <error-page>
>         <error-code>404</error-code>
>         <location>/error/error404</location>
>     </error-page>
>
> and "/error/error404" is mounted to PageNotFoundError.class in
> MyWebApplication class. These error pages only work with WicketFilter but as
> I am using AtmosphereServlet so all the application requests are dispatched
> to this servlet and therefore my customized page does not show up for 404.
>
> I have fixed it by writing my own Servlet e.g MyErrorHandler I check the
> statuscode and redirect to the mounted page like this:
>
>  Integer statusCode = (Integer)
> request.getAttribute("javax.servlet.error.status_code");
> .... some check if the status code = 404
>  response.sendRedirect(response.encodeRedirectURL(error404));
>
>
> and web.xml look like this:
> <error-page>
>         <error-code>404</error-code>
>         <location>/MyErrorHandler</location>
>     </error-page>
>
> MyErrorHAndler is a servlet so it is defined and mapped in web.xml as well.
> It is working.
>
> I'm interested to know if there is any better way to fix this problem.
>
> Thanks for the help!
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-and-Atmosphere-framework-integration-tp4651637p4651649.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Mime
View raw message