Package com.jk.web.filters
Class JKDefaultFilter
java.lang.Object
com.jk.web.filters.JKDefaultFilter
- All Implemented Interfaces:
 jakarta.servlet.Filter
This class is a servlet filter that provides default behavior for caching and
 processing requests.
 
It handles caching for specific types of resources such as JavaScript, CSS, images, fonts, and more.
Additionally, it can be configured to perform specific actions based on request parameters, such as converting the response to a PDF format.
- Version:
 - 1.0
 - Author:
 - Dr. Jalal H. Kiswani
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) voidinit(jakarta.servlet.FilterConfig arg0) static booleanisMultipartContent(jakarta.servlet.http.HttpServletRequest request) This method checks if the request is of multi-part content type. 
- 
Constructor Details
- 
JKDefaultFilter
public JKDefaultFilter() 
 - 
 - 
Method Details
- 
destroy
public void destroy()- Specified by:
 destroyin interfacejakarta.servlet.Filter
 - 
doFilter
public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Specified by:
 doFilterin interfacejakarta.servlet.Filter- Throws:
 IOExceptionjakarta.servlet.ServletException
 - 
isMultipartContent
public static boolean isMultipartContent(jakarta.servlet.http.HttpServletRequest request) This method checks if the request is of multi-part content type.- Parameters:
 request- Specifies the HTTP servlet request.- Returns:
 - true, if the request is of multi-part content type, false otherwise.
 
 - 
init
public void init(jakarta.servlet.FilterConfig arg0) throws jakarta.servlet.ServletException - Specified by:
 initin interfacejakarta.servlet.Filter- Throws:
 jakarta.servlet.ServletException
 
 -