Re: Howto display 404 cause of response on custom error page?

2012-11-27 Thread Per Newgro
Thanks you both for your suggestions. I will try it tomorrow and come back if i got more questions :-) Thanks Per Am 26.11.2012 16:49, schrieb Stefan Renz: Hi, we had a similar requirement, so we did the following: instead of throwing a AbortWithHttpErrorCodeException, we throw a semantic

Howto display 404 cause of response on custom error page?

2012-11-26 Thread Per Newgro
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

Re: Howto display 404 cause of response on custom error page?

2012-11-26 Thread Martin Grigorov
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

Re: Howto display 404 cause of response on custom error page?

2012-11-26 Thread Stefan Renz
Hi, we had a similar requirement, so we did the following: instead of throwing a AbortWithHttpErrorCodeException, we throw a semantic exception. In your case, throw MissingSubsiteException( your message ). How to make Wicket aware of such an exception and implement a proper reaction/response?