THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
This is assuming that you have mapped "/404" in your WebApplication:
Code Block |
---|
mountmountPage(new HybridUrlCodingStrategy("/404", PageNotFound.class)); |
In your error WebPage:
Code Block |
---|
public class PageNotFound extends WebPage { private static final long serialVersionUID = 1L; public PageNotFound() { // Add any necessary components } @Override protected void configureResponse() { super.configureResponse(); getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(HttpServletResponse.SC_NOT_FOUND); } @Override public boolean isVersioned() { return false; } @Override public boolean isErrorPage() { return true; } } |
...