3

I'm using Javamelody in my application. I need only root users to access the statistics. Javamelody by default you can access

http://localhost/webapp/monitoring

I need to change it to

http://localhost/webapp/monitor/monitoring

I have done the following filter mapping

<filter>
    <filter-name>monitoring</filter-name>
    <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>monitoring</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
    <listener-class>net.bull.javamelody.SessionListener</listener-class>
</listener>
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
Sads
  • 557
  • 6
  • 20

1 Answers1

11
<filter>
        <filter-name>monitoring</filter-name>
        <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
        <init-param>
                <param-name>monitoring-path</param-name>
                <param-value>/admin/monitoring</param-value>
        </init-param>
</filter>
Ruben Trancoso
  • 1,444
  • 5
  • 27
  • 55
  • inside **/monitoring** we write path to monitor. am I right? – gstackoverflow Aug 29 '15 at 13:01
  • @gstackoverflow No, this is a pattern for all the URLs for which the filter should be applied (URLs to be monitored). Path to monitor is specified as in the answer. – Yuriy Apr 13 '17 at 13:58