Package com.zfabrik.util.microweb
Class MicroWebFilter
java.lang.Object
com.zfabrik.util.microweb.MicroWebFilter
- All Implemented Interfaces:
 jakarta.servlet.Filter
All this filter does is to check wether an action should be executed for this
 request. If so, it will call the action. The outcome of that action
 determines where to go next.
 Actions are determined by the path information of the request URL. It will be
 cut into segments and actions will be applied according to a longest match
 pattern.
 The relevant URL can be obtained via
 
MicroWebUtil#getRelevantPath(HttpServletRequest). Actions that
 require relative addressing in turn should send a redirect in case of a
 missing trailing "/"- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) static jakarta.servlet.http.HttpServletRequestget the current requeststatic StringgetLanguageContextPath(jakarta.servlet.http.HttpServletRequest request, String lang) construct a new locale specific urlvoidinit(jakarta.servlet.FilterConfig cfg)  
- 
Constructor Details
- 
MicroWebFilter
public MicroWebFilter() 
 - 
 - 
Method Details
- 
destroy
public void destroy()- Specified by:
 destroyin interfacejakarta.servlet.Filter
 - 
getCurrentRequest
public static jakarta.servlet.http.HttpServletRequest getCurrentRequest()get the current request - 
getLanguageContextPath
public static String getLanguageContextPath(jakarta.servlet.http.HttpServletRequest request, String lang) construct a new locale specific url - 
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
 - 
init
public void init(jakarta.servlet.FilterConfig cfg) throws jakarta.servlet.ServletException - Specified by:
 initin interfacejakarta.servlet.Filter- Throws:
 jakarta.servlet.ServletException
 
 -