<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
    <display-name>/hyperic-hq</display-name>

    <description>
      Hyperic HQ Servlet Measurement.  Requires JMX.
    </description>

    <!-- The following fragment must be inserted in all apps that needs to be
         measured, in their web.xml. 
         It is required to also include hq-filter.jar in WEB-INF/lib -->
         
    <!-- 
         You can't enable it in both apps and globaly.

    <filter>
        <filter-name>JMXFilter</filter-name>
        <filter-class>org.hyperic.hq.product.servlet.filter.JMXFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>JMXFilter</filter-name>
	<url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>org.hyperic.hq.product.servlet.filter.JMXSessionListener</listener-class>
    </listener>

    <servlet>
        <servlet-name>JMXWebappMetricServlet</servlet-name>
        <servlet-class>org.hyperic.hq.product.servlet.filter.JMXFilterInitServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

     -->

    <!-- End fragment -->
    
    <servlet>
        <servlet-name>JMXServlet</servlet-name>
        <servlet-class>org.hyperic.hq.product.servlet.webapp.JMXServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>




   <!-- Tomcat 4.0 - Uncomment this if running on tomcat4.0.
        You must also: 
          - verify that server/lib/servlets-manager.jar has not been removed ( it should be in the default install )
          - In conf/server.xml, insert 
              <Context path="/manager" docBase="manager" debug="0" privileged="true"/>
    -->
   <!-- START_TOMCAT40 -->

   <!--
   <servlet>
      <servlet-name>Manager</servlet-name>
      <servlet-class>org.apache.catalina.servlets.ManagerServlet</servlet-class>
      <init-param>
        <param-name>debug</param-name>
        <param-value>0</param-value>
       </init-param>
   </servlet>

    <servlet-mapping>
        <servlet-name>Manager</servlet-name>
        <url-pattern>/manager/*</url-pattern>
    </servlet-mapping>

    -->
    <!-- END_TOMCAT40 -->


    <servlet-mapping>
        <servlet-name>JMXServlet</servlet-name>
        <url-pattern>/jmx-attributes/*</url-pattern>
    </servlet-mapping>

    <!-- 

     -->

    <!-- Uncomment this to enable user checking. 
         Make sure you define a user with the role "hyperic-jmx" and 
         the user/pass must match the plugin configuration.

         In tomcat default realm this is done by editing conf/tomcat-users.xml

    <security-constraint>
      <display-name>Hyperic resource constraint</display-name>
      <web-resource-collection>
         <web-resource-name>Hyperic  resources</web-resource-name>
         <url-pattern>/*</url-pattern>
      </web-resource-collection>
      <auth-constraint>
         <role-name>hyperic-jmx</role-name>
      </auth-constraint>
    </security-constraint>
     
    <login-config>
      <auth-method>BASIC</auth-method>
      <realm-name>Hyperic JMX</realm-name>
    </login-config>

    <security-role>
      <role-name>hyperic-jmx</role-name>
    </security-role>

    -->

</web-app>
