java.lang.Object
com.erudika.para.server.utils.filters.ErrorFilter
All Implemented Interfaces:
javax.servlet.Filter

@Component @Order(-2147483648) public class ErrorFilter extends Object implements javax.servlet.Filter
Alternative to Spring Boot's ErrorPageFilter which was causing problems with other filters, because it was trying to send errors after a response was committed.
Author:
Alex Bogdanovski [[email protected]]
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
     
    void
    init(javax.servlet.FilterConfig fc)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ErrorFilter

      public ErrorFilter()
  • Method Details

    • init

      public void init(javax.servlet.FilterConfig fc) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Filter
      Throws:
      javax.servlet.ServletException
    • doFilter

      public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
      Specified by:
      doFilter in interface javax.servlet.Filter
      Throws:
      IOException
      javax.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Filter