Example usage for org.apache.commons.jelly JellyTagException getCause

List of usage examples for org.apache.commons.jelly JellyTagException getCause

Introduction

In this page you can find the example usage for org.apache.commons.jelly JellyTagException getCause.

Prototype

public Throwable getCause() 

Source Link

Usage

From source file:hudson.security.UnwrapSecurityExceptionFilter.java

public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
        throws IOException, ServletException {
    try {//  w w w  . ja v  a2 s . c o  m
        chain.doFilter(request, response);
    } catch (ServletException e) {
        Throwable t = e.getRootCause();
        if (t instanceof JellyTagException) {
            JellyTagException jte = (JellyTagException) t;
            Throwable cause = jte.getCause();
            if (cause instanceof AcegiSecurityException) {
                AcegiSecurityException se = (AcegiSecurityException) cause;
                throw new ServletException(se);
            }
        }
        throw e;
    }
}