class CsrfAccessDeniedHandler implements AccessDeniedHandler {

    protected final Logger logger= LoggerFactory.getLogger(this.getClass());

    @Override
    public void handle(HttpServletRequest request, HttpServletResponse response,
                       AccessDeniedException accessDeniedException) throws IOException {<FILL_FUNCTION_BODY>}

}


        logger.info("[-] URL: " + request.getRequestURL() + "?" + request.getQueryString() + "\t" +
                "Referer: " + request.getHeader("referer"));

        response.setContentType(MediaType.TEXT_HTML_VALUE); // content-type: text/html
        response.setStatus(HttpServletResponse.SC_FORBIDDEN); // 403 forbidden
        response.getWriter().write("403 forbidden by JoyChou.");  // response contents
    
<no_super_class>