Web module

Reporting module provides web listener/filter to monitor servlet containers.

Installation

Add sirona-web to your webapp.

Monitor requests

Simply add the filter org.apache.sirona.web.servlet.SironaFilter:

<filter>
    <filter-name>monitoring-request</filter-name>
    <filter-class>org.apache.sirona.web.servlet.SironaFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>monitoring-request</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

Note: in a servlet 3 container you can simply configure org.apache.sirona.web.monitored-urls to the servlet pattern you want to match. If you want to register the SironaFilter yourself just set the init parameter org.apache.sirona.web.activated to false.

Monitor sessions

Simply add the listener org.apache.sirona.web.session.SironaSessionListener:

<listener>
  <listener-class>org.apache.sirona.web.session.SironaSessionListener</listener-class>
</listener>

Note: in a servlet 3 container and if org.apache.sirona.web.activated is not set to false it is added by default.

Monitor JSP

JSP can be monitored through standard web monitoring but this includes more than only the JSP. To be more specific you can use JSP monitoring.

For Servlet 3.0 containers just add the init parameter or sirona property:

org.apache.sirona.web.jsp.activated = true

or in web.xml

<context-param>
    <param-name>org.apache.sirona.web.jsp.activated</param-name>
    <param-value>true</param-value>
</context-param>

This will use PageContext to monitor the JSP rendering (so from the JSP servlet and not from a filter).

For Servlet 2.5 containers just declare the Filter org.apache.sirona.web.lifecycle.LazyJspMonitoringFilterActivator:

<filter>
    <filter-name>sirona-jsp-activator</filter-name>
    <filter-class>org.apache.sirona.web.lifecycle.LazyJspMonitoringFilterActivator</filter-class>
</filter>
<filter-mapping>
    <filter-name>sirona-jsp-activator</filter-name>
    <!--
    Any url which will use a jsp.
    If you use req.getRequestDispatcher("....jsp").forward(req, resp);
    ensure to match the original pattern (* in the worse case).
    This filter has an overhead almost null (single test).
    -->
    <url-pattern>*.jsp</url-pattern>
</filter-mapping>

Note: this monitoring wraps default javax.servlet.jsp.JspFactory and therefore sirona needs to be shared accross webapps using JspFactory (if you have a single webapp or an ear no issue).

Accessing results

If you installed the reporting webapp you should be able to get the result under the report tab.