コード例 #1
0
  /**
   * Return a path to which an include should be attempted in the case when the response was
   * committed before the <code>ExceptionHandler</code> was invoked.
   *
   * <p>If the <code>ExceptionConfig</code> has the property <code>INCLUDE_PATH</code> defined, then
   * the value of that property will be returned. Otherwise, the ActionForward path is returned.
   *
   * @param config Configuration element
   * @param actionForward Forward to use on error
   * @return Path of resource to include
   * @since Struts 1.3
   */
  protected String determineIncludePath(ExceptionConfig config, ActionForward actionForward) {
    String includePath = config.getProperty("INCLUDE_PATH");

    if (includePath == null) {
      includePath = actionForward.getPath();
    }

    return includePath;
  }
コード例 #2
0
 /**
  * Indicate whether this Handler has been configured to be silent. In the base implementation,
  * this is done by specifying the value <code>"true"</code> for the property "SILENT_IF_COMMITTED"
  * in the ExceptionConfig.
  *
  * @param config The ExceptionConfiguration we are handling
  * @return True if Handler is silent
  * @since Struts 1.3
  */
 private boolean silent(ExceptionConfig config) {
   return "true".equals(config.getProperty(SILENT_IF_COMMITTED));
 }