Package net.bull.javamelody
Class CustomResourceFilter
java.lang.Object
net.bull.javamelody.CustomResourceFilter
- All Implemented Interfaces:
Filter
Servlet filter to customize resources in html reports, such as css file.
For example, add the following, before the monitoring filter, in the web.xml file of your webapp, in order to use your own css or icons:
You can replace every web resource in this directory and sub-directories
For example, add the following, before the monitoring filter, in the web.xml file of your webapp, in order to use your own css or icons:
<filter>
<filter-name>customResourceFilter</filter-name>
<filter-class>net.bull.javamelody.CustomResourceFilter</filter-class>
<init-param>
<param-name>monitoring.css</param-name>
<param-value>/customMonitoring.css</param-value>
</init-param>
<init-param>
<param-name>bullets/green.png</param-name>
<param-value>/static/bullets/red.png</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>customResourceFilter</filter-name>
<url-pattern>/monitoring</url-pattern>
</filter-mapping>
Then add files "customMonitoring.css" and "static/bullets/red.png" at the root of the web content in your webapp.You can replace every web resource in this directory and sub-directories
- Author:
- Emeric Vernat
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(ServletRequest request, ServletResponse response, FilterChain chain) voidinit(FilterConfig filterConfig)
-
Constructor Details
-
CustomResourceFilter
public CustomResourceFilter()
-
-
Method Details
-
init
- Specified by:
initin interfaceFilter- Throws:
ServletException
-
doFilter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException - Specified by:
doFilterin interfaceFilter- Throws:
IOExceptionServletException
-
destroy
public void destroy()
-