Hi,

I am facing a strange issue while trying to display a generic application
error page whenever some exception is thrown. 

We recently upgraded from wicket 1.3 to wicket 6. However, it was a step by
step upgrade for each major version. There were no issues from 1.3 to 1.4.
However, after the upgrade to 1.5 the error page stopped getting displayed
and what we get now is just a plain white blank page. No exception/markup on
the stack trace.

In my Java class that implements the IRequestCycleListener interface we have
the following logic written for the onException method - 

public IRequestHandler onException(RequestCycle cycle, final Exception ex) {

                if (ex instanceof RuntimeException) {
                        if(ex instanceof AuthorizationException || ex instanceof
PageExpiredException)
                                return null;
                        return (new IRequestHandler() {

                                @Override
                                public void respond(IRequestCycle requestCycle) 
{
                                        
((ABC)Application.get()).getErrorMessagePage(ex);
                                        
                                }

                                @Override
                                public void detach(IRequestCycle requestCycle) {
                                        // TODO Auto-generated method stub
                                        
                                }
                                
                        });
                }
                return null;
        }

getErrorMessagePage is the method inside my application class that extends
WebApplication and returns the error page that is to be displayed.

I have made sure that there are no issues with the Java and HTML files of
the error message page. In fact, I tried to render the error page using
setResponse on click of a button on some other page and it does come up. 
So, I am assuming it has something to do with the way I have implemented
IRequestHandler and IRequestCycleListener. Not quite sure on what might be
going on.

Any help will be much appreciated.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Blank-page-while-trying-to-show-a-generic-error-page-onException-tp4669813.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to