From: "Reynolds, James" <[EMAIL PROTECTED]> > > I have a question about the org.apache.shale.view.ExceptionHandler > interface. Comments in the Shale Wiki indicate that Shale "...can > optionally do a RequestDispatcher.forward() call to the context relative > path of an error display page..." How do I invoke the option to forward > to my error page? > > I've created my ExceptionHandler class (code below) and configured it > successfully. I also configured this parameter in my web.xml: > > > > org.apache.shale.view.EXCEPTION_DISPATCH_PATH > /exceptionViewer.jsf > > > ExceptionHandler code: > > public class WebEnabledExceptionHandler implements ExceptionHandler { > > public WebEnabledExceptionHandler(){ > } > > public void handleException(Exception exception) { > System.out.println("Shale ExceptionHandler: " + > exception.getMessage()); > // How do I forward to the error page? > } > } >
The shale-test-view application has an example of the ViewController exception handling. You need to add the error page to the web.xml [1] and then define an error page [2]. [1] https://svn.apache.org/repos/asf/shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/WEB-INF/web.xml [2] https://svn.apache.org/repos/asf/shale/framework/trunk/shale-apps/shale-test-view/src/main/webapp/WEB-INF/web.xml Gary > Thanks! > > > > > > > E-Mail messages may contain viruses, worms, or other malicious code. By > reading > the message and opening any attachments, the recipient accepts full > responsibility for taking protective action against such code. Sender is not > liable for any loss or damage arising from this message. > > The information in this e-mail is confidential and may be legally privileged. > It > is intended solely for the addressee(s). Access to this e-mail by anyone else > is > unauthorized. >