while(e instanceof JspException) {
while((e instanceof JspException) && (((JspException) e).getRootCause() != null)) {
    public ZExceptionBean(Throwable e) {        if (e instanceof JspException) {            while(e instanceof JspException) {                e =  ((JspException) e).getRootCause();            }        }        if ((!(e instanceof ServiceException)) && (e.getCause() instanceof ServiceException)) {            e = e.getCause();        }        if (e instanceof ServiceException) {            mException = (ServiceException) e;        } else {            mException = ServiceException.FAILURE(e.getMessage(), e);        }    }