I try to create a watchdog page for our site. My idea was to check the
neccessary resources and respond with a 500 error in case of failure.
So I placed
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus
(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
in the page
Ah! Thank you.
Stefan.
-Ursprüngliche Nachricht-
Von: Serkan Camurcuoglu [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 7. Oktober 2008 14:18
An: users@wicket.apache.org
Betreff: Re: How to answer Request with 500 error
The WIA book says:
Setting an HTTP status code:
If you want to set
The WIA book says:
Setting an HTTP status code:
If you want to set an HTTP status code for your page, such as 404 (not
found), you
can do so by overriding the page’s setHeaders method:
@Override
protected void setHeaders(WebResponse response) {
response.getHttpServletResponse().setStatus(
: Dienstag, 7. Oktober 2008 14:18
An: users@wicket.apache.org
Betreff: Re: How to answer Request with 500 error
The WIA book says:
Setting an HTTP status code:
If you want to set an HTTP status code for your page, such as 404 (not
found), you
can do so by overriding the page's setHeaders method