1.

Explain how the security filter chain works.

Answer»

Here's how filters work in a web application:   

  • Step 1: The client first sends a REQUEST for a resource (MVC controller). The application container creates a filter chain for handling and processing incoming requests.
  • Step 2: Each HttpServletRequest passes through the filter chain depending upon the request URI. (We can configure whether the filter CHAINS should be APPLIED to all requests or to the specific request URI).
  • Step 3: For most web applications, filters perform the following functions:
    • Modify or Change the HttpServletRequest/HttpServletResponse before it reaches the SPRING MVC controller.
    • Can stop the processing of the request and send a response to the client, such as Servlets not allowing requests to specific URI's.


Discussion

No Comment Found