jwebap应用

本文介绍了一款名为jwebap的监控系统,并详细记录了其在本地环境下的部署过程及配置方法。主要内容包括jwebap.xml配置文件的设置、web.xml中的监听器和过滤器配置,以及访问路径。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

jwebap是一个监控的东东,具体的还不太清楚,在本地部署了一下,测试成功,具体的还有待应用。。。。。
增加jwebap.xml配置文件

<?xml version="1.0" encoding="UTF-8"?>
<jwebap>
<!--component-->
<component name="HttpComponent" type="org.jwebap.plugin.http.HttpComponent">
<!--(ms) timings filter‘s over time -->
<property name='trace-filter-active-time'>-1</property>
<!-- max over-time trace size -->
<property name='trace-max-size'>1000</property>
</component>
<component name="MethodComponent" type="org.jwebap.plugin.method.MethodComponent">
<property name='trace-filter-active-time'>-1</property>
<property name='trace-max-size'>1000</property>
<!--
package name and class name that monitored by MethodComponent,
e.g.: 'test.*;test.Test' , divided by ';'
-->
<property name='detect-clazzs'>test.*;</property>
</component>
<component name="JdbcComponent" type="org.jwebap.plugin.jdbc.JdbcComponent">
<property name='trace-filter-active-time'>-1</property>
<property name='trace-max-size'>1300</property>
<property name='connection-listener'><!--Connection Listener-->
org.jwebap.plugin.http.ServletOpenedConnectionListener;org.jwebap.plugin.method.MethodOpenedConnectionListener
</property>
<!--
1) Local datasource: jdbc driver class ,like
oracle.jdbc.driver.OracleDriver;com.mysql.jdbc.Driver,
divided by ';'.
2) JNDI datasource: If your application uses jndi datasource,
you can set the class which manages connections in your
application as driver, e.g.: 'com.china.telecom.ConnectionManager'.
DBComponent will inject this class to proxy all connection
the class’s method return.

-->
<property name='driver-clazzs'></property>
</component>

<!--dispatcher-->
<dispatcher name="RedirectDispatcher" mapping="" type="org.jwebap.ui.controler.DefaultRedirectDispatcher" />
<dispatcher name="ActionDispatcher" mapping="/console/*" type="org.jwebap.ui.controler.ActionDispatcher" />
<dispatcher name="ResourceDispatcher" mapping="/resources/*" type="org.jwebap.ui.controler.ResourceDispatcher" />

<!--action-mapping-->
<action-mapping>
<action path="/" type="org.jwebap.ui.action.ConsoleAction" template="resources/view/index.ctl" />

<!--HttpComponent-->
<action path="/http/tracer" component="HttpComponent" type="org.jwebap.plugin.http.TracerAction" template="resources/view/http_tracer.ctl" />
<action path="/http/tracer/datas" component="HttpComponent" type="org.jwebap.plugin.http.TraceDatasAction" />
<action path="/http/tracer/clear" component="HttpComponent" type="org.jwebap.plugin.http.TracesClearAction" />
<action path="/http/stat" component="HttpComponent" type="org.jwebap.plugin.http.StatAction" template="resources/view/http_stat.ctl" />
<action path="/http/stat/datas" component="HttpComponent" type="org.jwebap.plugin.http.StatDatasAction" />
<!--MethodComponent-->
<action path="/method/tracer" component="MethodComponent" type="org.jwebap.plugin.method.TracerAction" template="resources/view/method_tracer.ctl" />
<action path="/method/tracer/datas" component="MethodComponent" type="org.jwebap.plugin.method.TraceDatasAction" />
<action path="/method/tracer/clear" component="MethodComponent" type="org.jwebap.plugin.method.TracesClearAction" />
<action path="/method/stat" component="MethodComponent" type="org.jwebap.plugin.method.StatAction" template="resources/view/method_stat.ctl" />
<action path="/method/stat/datas" component="MethodComponent" type="org.jwebap.plugin.method.StatDatasAction" />
<!--JdbcComponent-->
<action path="/jdbc/tracer" component="JdbcComponent" type="org.jwebap.plugin.jdbc.TracerAction" template="resources/view/jdbc_tracer.ctl" />
<action path="/jdbc/tracer/datas" component="JdbcComponent" type="org.jwebap.plugin.jdbc.TraceDatasAction" />
<action path="/jdbc/tracer/clear" component="JdbcComponent" type="org.jwebap.plugin.jdbc.TracesClearAction" />


</action-mapping>
</jwebap>



在web.xml配置文件中增加:

<context-param>
<param-name>config</param-name>
<param-value>/WEB-INF/jwebap.xml</param-value>
</context-param>
<listener>
<listener-class>org.jwebap.core.JwebapListener</listener-class>
</listener>
<filter>
<filter-name>PageDetectFilter</filter-name>
<filter-class>org.jwebap.plugin.http.DetectFilter</filter-class>
<init-param>
<param-name>excludeUrls</param-name>
<param-value>/detect;/detect/*;*.js;*.jpg;*.htm;*.html;*.gif;*.png;*.css;*.swf</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>PageDetectFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<servlet>
<servlet-name>detect</servlet-name>
<servlet-class>org.jwebap.ui.controler.JwebapServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>detect</servlet-name>
<url-pattern>/detect/*</url-pattern>
</servlet-mapping>

最后通过http://localhost/detect/进行访问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值