三个需要的程序包:
commons-dbcp-1.2.1.jar
http://apache.linuxforum.net/dist/jakarta/commons/dbcp/binaries/
struts-legacy.jar
http://apache.linuxforum.net/dist/jakarta/struts/struts-legacy/
commons-pool-1.2.jar
http://apache.linuxforum.net/dist/jakarta/commons/pool/binaries/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources>
<data-source type="org.apache.commons.dbcp.BasicDataSource">
<set-property property="autoCommit" value="ture"/>
<set-property property="description" value="MySQL Data Source"/>
<set-property property="driverClassName" value="com.mysql.jdbc.Driver"/>
<set-property property="maxCount" value="20"/>
<set-property property="mixCount" value="5"/>
<set-property property="username" value="root"/>
<set-property property="password" value="jacky"/>
<set-property property="url" value="jdbc:mysql://localhost:3306/ebooklib"/>
</data-source>
</data-sources>
<form-beans >
<form-bean name="logonForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="password" type="java.lang.String" />
<form-property name="username" type="java.lang.String" />
</form-bean>
</form-beans>
<global-exceptions />
<global-forwards />
<action-mappings >
<action
attribute="logonForm"
input="/form/logon.jsp"
name="logonForm"
path="/logon"
scope="request"
type="com.yourcompany.struts.action.LogonAction" />
</action-mappings>
<message-resources parameter="com.yourcompany.struts.ApplicationResources" />
</struts-config>