Hi,

See ErrorAttributes.java.
By Servlet spec several request attributes are available when the web
container does error dispatching.


On Mon, Nov 26, 2012 at 3:14 PM, Per Newgro <per.new...@gmx.ch> wrote:

> Hi,
>
> i'm looking for a way to display the cause of a 404 send by myself on my
> custom error page.
>
> In a behavior i do
> <code>
> throw new
> AbortWithHttpErrorCodeException(HttpServletResponse.SC_NOT_FOUND, "Missing
> subsite in behavior");
> </code>
>
> It is displayed in my custom error page
>
> <code>
> @MountPath("404.html")
> public class PageNotFound extends AbstractErrorPage {
>
>         public PageNotFound() {
>                 super();
>         }
>
>         @Override
>         protected void setHeaders(WebResponse response) {
>                 response.setStatus(HttpServletResponse.SC_NOT_FOUND);
>         super.setHeaders(response);
>         }
> }
> </code>
>
> But i wouuld like to display the cause of the 404 to. If i debug i can see
> the cause deep inside the response. But i can't imagine that i have to
> rebuild the path to the cause by myself.
>
> Thanks for helping me
> Per
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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

Reply via email to