Custom css and js in javaMelody and Collector Server

140 views
Skip to first unread message

ombl...@gmail.com

unread,
Sep 20, 2016, 6:58:04 AM9/20/16
to javamelody

I'm trying persolalizar the js and css JavaMelody. I followed the steps in the manual:https://github.com/javamelody/javamelody/wiki/UserGuideAdvanced#customizing-styles-icons-and-other-resources-in-the-html-reports

This is my web xml:


<filter>
    <filter-name>customResourceFilter</filter-name>
    <filter-class>net.bull.javamelody.CustomResourceFilter</filter-class>

    <init-param>
        <param-name>customizableMonitoring.css</param-name>
        <param-value>/melody-style.css</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>customResourceFilter</filter-name>
    <url-pattern>/monitoring</url-pattern>
</filter-mapping>


But I can not find the melody-style.css file. If I check the code, the link '? Resource = customizableMonitoring.css' does not show my css.

I tried to put in resources, in the webapp, in webapp / WEB-INF, but does not work.

What is the problem? In the case of Collector Server, how do you customize it?


Regards,

Vernat Emeric

unread,
Sep 21, 2016, 7:10:20 AM9/21/16
to javam...@googlegroups.com
Hi omblanco,

Your web.xml is ok if you want to override the customizableMonitoring.css
Your melody-style.css file should be put at the root of your war file.

But in the case of the collector server, it's a bit more difficult, see:
https://github.com/javamelody/javamelody/issues/414

Emeric
--

---
You received this message because you are subscribed to the Google Groups "javamelody" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javamelody+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ombl...@gmail.com

unread,
Sep 21, 2016, 3:06:37 PM9/21/16
to javamelody
This does not work for me.
I put the css file in the root directory of war after deploying on the server but keeps going the same.
The
customizableMonitoring.css file still appears empty.



Regards,

Vernat Emeric

unread,
Sep 21, 2016, 6:48:25 PM9/21/16
to javam...@googlegroups.com
Can you find why ?

Thanks
Emeric
Reply all
Reply to author
Forward
0 new messages