httpSessionListener统计在线人数
作者:Fly 日期:2008-05-21
配置log4j写入数据库
作者:Fly 日期:2008-05-05
首先按tomcat +sqlserver 数据连接池 中的方法配置数据连接池。
\WEB-INF\lib文件夹加入包msbase.jar;mssqlserver.jar;msutil.jar;log4j-1.2.8.jar
放在WEB_INF\class文件夹下的log.properties文件的内容如下
#输出到F:/home/example.log
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.File=F:/home/example.log
log4j.appender.A1.MaxBackeupIndex=1
log4j.appender.A1.MaxFileSize=1MB
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=[%-5p][%d]%n%m%n%n
Struts2中相关配置文件
作者:Fly 日期:2008-05-05
1) struts-default.xml
这个文件是struts2框架默认加载的配置文件。它定义struts2一些核心的bean和拦截器。
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!--struts2中工厂bean的定义-->
<bean class="com.opensymphony.xwork2.ObjectFactory" name="xwork" />
<bean type="com.opensymphony.xwork2.ObjectFactory" name="struts" class="org.apache.struts2.impl.StrutsObjectFactory" />
这个文件是struts2框架默认加载的配置文件。它定义struts2一些核心的bean和拦截器。
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!--struts2中工厂bean的定义-->
<bean class="com.opensymphony.xwork2.ObjectFactory" name="xwork" />
<bean type="com.opensymphony.xwork2.ObjectFactory" name="struts" class="org.apache.struts2.impl.StrutsObjectFactory" />
Struts2(XWork)提供的拦截器的功能说明
作者:Fly 日期:2008-05-05
防止表单重复提交的Servlet
作者:Fly 日期:2008-04-29
关于实现序列化的类提示没有定义serialVersionUID域
作者:Fly 日期:2008-04-27
- 1






