code: public Class getExceptionClass()
      {
      	Class exceptionClass = null;
          Throwable rootCause = this;
          
          do{
              Throwable temp = ((ServletException)rootCause).getRootCause();
              if(temp != null) {
                  rootCause = temp;
              }
              else{
                  break;
              }
          }while (rootCause instanceof ServletException);
  
          // rootCause must be non-null (it started as "this" and was then NEVER set to null by the loop above
          exceptionClass = rootCause.getClass();
  
          return exceptionClass;
      }
docs: Returns the java.lang.Class of the root cause.