What is the purpose of the <filter> tag in web.xml?

What is the purpose of the tag <filter>in web.xml?

+3
source share
2 answers

It allows you to declare servlet filters, which are aspects of HTTP requests. A filter chain can intercept an incoming request and / or an outgoing response and modify it as necessary.

A common example is the presence of a filter that performs GZIP compression in the response stream if the user browser can accept it. This improves performance by reducing the number of bytes on the wire, provided that the savings are greater than the time for compression and decompression.

+13
source

, -. - .

0

Source: https://habr.com/ru/post/1780861/


All Articles