package global; import org.apache.beehive.test.tools.milton.common.Report; import org.apache.beehive.netui.pageflow.*; import org.apache.beehive.netui.pageflow.annotations.Jpf; /** * WARNING: This file is part of the test framework. It is copied * into this webapp at build time. Any changes you make to * this file will be lost the next time you rebuild. * DO NOT ADD THIS FILE TO YOUR WEBAPP! --> */ @Jpf.Controller( catches={ @Jpf.Catch(type=java.lang.Exception.class, method="handleException") } ) public class Global extends GlobalApp { @Jpf.ExceptionHandler( forwards={ @Jpf.Forward(name=Report.RESULTS, path=Report.RESULTSJSP) } ) protected Forward handleException(Exception ex, String actionName, String message, Object form) { Report report = (Report)getRequest().getAttribute(Report.KEY); if (null == report) report = new Report(Report.ABORT, "An Unexpected Exception Was Found", ex); return new Forward(Report.RESULTS, Report.KEY, report); } }