Deploying the HTTP Monitor for a Web Module

See Also

To use the HTTP Monitor to assist with debugging a web module, perform the following configuration steps.

Tip If you are using a Tomcat server that is managed by the IDE's Tomcat server plugin, and if the integration mode is set to Full, you do not need to perform these steps. By default, the internal Tomcat server is set to full integration mode.

To use the HTTP Monitor:

  1. Copy IDE-install-directory/modules/schema2beans.jar and IDE-install-directory/modules/ext/httpmonitor.jar to your web module's WEB-INF/lib directory.
  2. Add the following filter declaration to the top of your web module's WEB-INF/web.xml file. Filters and filter mapping entries must come first in a deployment descriptor.

    <filter>
    <filter-name>HTTPMonitorFilter</filter-name>
    <filter-class>org.netbeans.modules.web.monitor.server.MonitorFilter</filter-class>
    <init-param>
    <param-name>netbeans.monitor.ide</param-name>
    <param-value>name-of-host-that-runs-IDE:port-of-internal-HTTP-server</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>HTTPMonitorFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>

Your web module is now ready to use the HTTP Monitor for development and debugging purposes.

Tip You can have more than one IDE monitoring the data records from a web module by adding a second init-param as follows:

<init-param>
<param-name>netbeans.monitor.register</param-name>
<param-value> other-IDE-host:other-HTTP-server-port, another-IDE-host:another-HTTP-server-port</param-value>
</init-param>

Tip When you deploy the web module to a production server, remember to remove the jar files from your WEB-INF/lib directory and remove the filter and filter mapping declarations from the web module's deployment descriptor.
See Also
Viewing HTTP Monitor Data Records
Saving HTTP Monitor Data Records
Deleting HTTP Monitor Data Records
Editing and Replaying Requests

Legal Notices