public class SpringMiltonFilter extends Object implements javax.servlet.Filter
Use contextConfigClass to define the @Configuration class or
contextConfigLocation to define the Spring XML configuration file. If
any of them is defined, SpringMiltonFilter will try to load a file
named applicationContext.xml from the classpath.
If it still fails, only the parent context will be considered.
This filter then gets the bean named milton.http.manager and uses that for Milton processing.
The milton.http.manager bean can either be a HttpManager or it can be
a HttpManagerBuilder, in which case a HttpManager is
constructed from it
Requests with a path which begins with one of the exclude paths will not be processed by Milton. Instead, for these requests, the filter chain will be invoked so the request can be serviced by JSP or a servlet, etc
This uses an init parameter called milton.exclude.paths, which should
be a comma separated list of paths to ignore. For example:
/static,/images,/login.jsp
This allows non-Milton resources to be accessed, while still mapping all URLs to Milton
| Constructor and Description |
|---|
SpringMiltonFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp,
javax.servlet.FilterChain fc) |
void |
init(javax.servlet.FilterConfig fc) |
protected void |
initSpringApplicationContext(javax.servlet.FilterConfig fc) |
public void init(javax.servlet.FilterConfig fc)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionprotected void initSpringApplicationContext(javax.servlet.FilterConfig fc)
public void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp,
javax.servlet.FilterChain fc)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.FilterCopyright © 2021 McEvoy Software Ltd. All rights reserved.