Closed GoogleCodeExporter closed 8 years ago
This chapter in the user guide was written mainly for a monitored webapp, not
for the optional collector server. The problem in your case is that the
"/customMonitoring.css" resource path is stolen by the CollectorServlet, before
that the servlet container gets the file.
To fix this issue, I suggest to use the following configuration in
WEB-INF/web.xml of the collector server:
<?xml version="1.0" encoding="UTF-8" ?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>monitoring</display-name>
<distributable />
<servlet>
<servlet-name>monitoringServer</servlet-name>
<servlet-class>net.bull.javamelody.CollectorServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>monitoringServer</servlet-name>
<url-pattern>/monitoring</url-pattern>
</servlet-mapping>
<filter>
<filter-name>customResourceFilter</filter-name>
<filter-class>net.bull.javamelody.CustomResourceFilter</filter-class>
<init-param>
<param-name>customizableMonitoring.css</param-name>
<param-value>/customMonitoring.css</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>customResourceFilter</filter-name>
<url-pattern>/monitoring</url-pattern>
</filter-mapping>
</web-app>
Then, you will need to use the path http://localhost:8080/monitoring in your
browser to display reports, instead of http://localhost:8080
I have updated
https://code.google.com/p/javamelody/wiki/UserGuideAdvanced#Customizing_styles,_
icons_and_other_resources_in_the_html_report to redirect here. Thanks.
Original comment by evernat@free.fr
on 14 Jun 2014 at 11:38
Doesn't work for me
the WebApps doesn't start
Original comment by mdelo...@tennaxia.com
on 16 Jun 2014 at 8:46
Strange.
First, why do you say "the webappS" with a "S"? Is there one or several webapps?
And more important, why it doesn't start?
Original comment by evernat@free.fr
on 16 Jun 2014 at 9:23
if I go to :lynx localhost:8080/monitoring
Then I get a HTTP Status 404 - /monitoring
Then in the Tomcat log : nothing special
in the tomcat manager for webapp I see that javamelody is running
Original comment by mdelo...@tennaxia.com
on 20 Jun 2014 at 7:40
if I change back to
<servlet-mapping>
<servlet-name>monitoringServer</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
I can access javamelody with url localhost:8080/javamelody
Original comment by mdelo...@tennaxia.com
on 20 Jun 2014 at 7:44
Original issue reported on code.google.com by
mdelo...@tennaxia.com
on 13 Jun 2014 at 7:45