PageRenderTime 25ms CodeModel.GetById 19ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/plugin-module-codegen-engine/src/main/resources/templates/common/servlet/filter/ServletFilter.java.vtl

https://bitbucket.org/mmeinhold/amps
Unknown | 28 lines | 19 code | 9 blank | 0 comment | 0 complexity | 03c49b358b27f32580fb74baa18bb456 MD5 | raw file
 1package ${PACKAGE};
 2
 3import org.slf4j.Logger;
 4import org.slf4j.LoggerFactory;
 5
 6import javax.servlet.*;
 7import javax.servlet.http.HttpServletRequest;
 8import javax.servlet.http.HttpServletResponse;
 9import java.io.IOException;
10
11public class ${CLASSNAME} implements Filter{
12    private static final Logger log = LoggerFactory.getLogger(${CLASSNAME}.class);
13
14    public void init(FilterConfig filterConfig)throws ServletException{
15    }
16
17    public void destroy(){
18    }
19
20
21    public void doFilter(ServletRequest request,ServletResponse response,FilterChain chain)throws IOException,ServletException{
22        //do some custom handling here
23
24        //continue the request
25        chain.doFilter(request,response);
26    }
27
28}