If you want to get hold on the actual exception that has been thrown you
need to override the ExceptionResponseStrategy in
DefaultWebRequestCycleProcessor. Do something like this:

In you WebApplication extended class:

protected IRequestCycleProcessor newRequestCycleProcessor() {
        return new MyDefaultWebRequestCycleProcessor();


public class MyDefaultWebRequestCycleProcessor extends
                DefaultWebRequestCycleProcessor {

        protected IExceptionResponseStrategy newExceptionResponseStrategy() {
                return new IExceptionResponseStrategy() {
                        public void respond(RequestCycle requestCycle, 
RuntimeException e) {

And then you can have your exception page:

public class MyExceptionPage extends WebPage {
        private static final long serialVersionUID = 1L;

        public MyExceptionPage(Throwable throwable) {
                add(new Label("title", throwable.getMessage()));

                // and whatever you like

        protected void configureResponse() {

        public boolean isErrorPage() {
                return true;

        public boolean isVersioned() {
                return false;


Frank Bille

On Tue, 2006-07-11 at 09:30 +0200, Frank Bille Jensen wrote:
> Yes, take a look at IApplicationSettings.setInternalErrorPage(). 
> Frank Bille 
> On Tue, 2006-07-11 at 09:46 +0300, Tymur Porkuyan wrote:
> > Is it possible to override standard Wicket exception page?
> > 
> > I would like to throw exceptions on lower levels and have a generic
> > error page that will display messages from custom exceptions and
> > something like "internal error" for system exception.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Wicket-user mailing list

Reply via email to