2

I would like to use a servlet filter of type javax.servlet.Filter to check if the calling Action class contains a particular annotation. So something like

@CustomAnnotation
public class MyAction extends Action {
    // action stuff
}



public class CustomFilter implements Filter {

    public void doFilter(ServletRequest request, ServletResponse response,
        FilterChain chain) throws IOException, ServletException {

    // somehow check if the calling Action contains @CustomAnnotation
}

Is this possible to do inside of my Filter? If not, how could I go about filtering based on annotation?

secondbreakfast
  • 4,194
  • 5
  • 47
  • 101

0 Answers0