code: public Throwable getRootCause() {
          Throwable root = getError();
          while(true) {
              if(root instanceof ServletException) {
                  ServletException se = (ServletException)_error;
                  Throwable seRoot = se.getRootCause();
                  if(seRoot == null) {
                      return root;
                  }
                  else if(seRoot.equals(root)) {//prevent possible recursion
                      return root;
                  }
                  else {
                      root = seRoot;
                  }
              }
              else {
                  return root;
              }
          }
      }
docs: Get the original cause of the error.
  Use of ServletExceptions by the engine to rethrow errors
  can cause the original error to be buried within one or more
  exceptions.  This method will sift through the wrapped ServletExceptions
  to return the original error.