- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are filters in JSP?
Servlet and JSP Filters are Java classes that can be used in Servlet and JSP Programming for the following purposes
To intercept requests from a client before they access a resource at the back end.
To manipulate responses from the server before they are sent back to the client.
There are various types of filters suggested by the specifications −
- Authentication Filters
- Data compression Filters
- Encryption Filters
- Filters that trigger resource access events
- Image Conversion Filters
- Logging and Auditing Filters
- MIME-TYPE Chain Filters
- Tokenizing Filters
- XSL/T Filters That Transform XML Content
Filters are deployed in the deployment descriptor file web.xml and then map to either servlet or JSP names or URL patterns in your application's deployment descriptor. The deployment descriptor file web.xml can be found in <Tomcat-installation-directory>\conf directory.
When the JSP container starts up your web application, it creates an instance of each filter that you have declared in the deployment descriptor. The filters execute in the order that they are declared in the deployment descriptor.
- What are intent-filters in Android?
- How do you define multiple filters in JSP?
- What are JSP comments?
- What are JSP Directives?
- What are JSP literals?
- What are cookies in JSP?
- What type of filters are recommended for farmers?
- What are JSP actions elements?
- What are the different types of filters in C# ASP.NET WebAPI?
- What are advantages of using JSP?
- What are JSTL formatting tags in JSP?
- What are JSTL Core tags in JSP?
- What are the different scope values for the JSP action in JSP?
- What implicit objects are supported by JSP?
- What are JSP declarations? In how many ways we can write JSP declarations?