worry about (Web server iis) providing a catch block unless they
Sunday, August 12th, 2007worry about providing a catch block unless they plan to provide further specialized behavior for the exception. The execute( )method passes the exception, along with the request and mapping objects, to the processExceptions( )method shown in Example 10-8. Example 10-8. The processExceptions( ) method in the StorefrontBaseAction protected ActionForward processExceptions( HttpServletRequestrequest, ActionMappingmapping, BaseException ex ){ ActionErrors errors = new ActionErrors( ); ActionForward forward = null; // Get the locale for the user Locale locale = getUserContainer( request ).getLocale( ); if (locale == null){ // If it hasn’t been configured, get the default for theenvironment locale = Locale.getDefault( ); } processBaseException(errors, (FieldException) ex, locale); // Either return to the input resource or a configured failure forward String inputStr = mapping.getInput( ); String failureForward = mapping.findForward(IConstants.FAILURE_KEY); if ( inputStr != null) { forward = new ActionForward( inputStr ); }else if (failureForward != null){ forward = failureForward; } // See if this exception contains a list of subexceptions List exceptions = ex.getExceptions( ); if (exceptions != null && !exceptions.isEmpty( ) ){ int size = exceptions.size( ); Iterator iter = exceptions.iterator( ); while( iter.hasNext( ) ){ // All subexceptions must be BaseExceptionsBaseException subException = (BaseException)iter.next( ); processBaseException(errors, subException, locale);
You want to have a cheap webhost for your apache application, then check apache web hosting services.