Forwarding to 404 Page

2014-02-24 Thread Tom Norton
Let's say I have a detail page with url /widgets/${id}. If there is no widget for the given id, how would I redirect the user to the 404 page? I'm using wicket 1.5. Thanks, Tom

Re: Forwarding to 404 Page

2014-02-24 Thread Martin Grigorov
Hi, Since the application code reads the value of 'id' parameter and checks the DB for an item with this id it is in your control to do: setResponsePage(My404.class) Another way is to define a page for 404 in web.xml and just throw AbortWithHttpErrorCodeException(404). The rest will be handled