struts-config代码:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
<data-sources>
<data-source key="GSGL" type="org.apache.commons.dbcp.BasicDataSource">
<set-property value="oracle.jdbc.driver.OracleDriver" property="driverClassName"/>
<set-property value="jdbc:oracle:thin:@192.168.1.56:1521:orcl useUnicode=true&characterEncoding=UTF-8" property="url"/>
<set-property value="gsgl" property="username"/>
<set-property value="gsgl" property="password"/>
<set-property property="autoCommit" value="true" />
<set-property property="maxCount" value="500" />
<set-property property="minCount" value="100" />
</data-source>
</data-sources>
<form-beans>
<form-bean name="LoginForm" type="cn.java.tower.login.LoginForm"/>
</form-beans>
<!-- ========================================= Global Exception Definitions --> <global-exceptions></global-exceptions>
<!-- =========================================== Global Forward Definitions --> <global-forwards></global-forwards>
<!-- =========================================== Action Mapping Definitions --> <action-mappings>
<action path="/login"
type="cn.java.tower.login.LoginAction"
name="LoginForm"
scope="request"
validate="true"
parameter="method"
input="/WebContent/webpages/login.jsp">
<forward name="success" redirect="true" path="/WebContent/webpages/index.jsp" />
<forward name="fail" path="/WebContent/webpages/login.jsp" />
</action> </action-mappings>
</struts-config>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
<data-sources>
<data-source key="GSGL" type="org.apache.commons.dbcp.BasicDataSource">
<set-property value="oracle.jdbc.driver.OracleDriver" property="driverClassName"/>
<set-property value="jdbc:oracle:thin:@192.168.1.56:1521:orcl useUnicode=true&characterEncoding=UTF-8" property="url"/>
<set-property value="gsgl" property="username"/>
<set-property value="gsgl" property="password"/>
<set-property property="autoCommit" value="true" />
<set-property property="maxCount" value="500" />
<set-property property="minCount" value="100" />
</data-source>
</data-sources>
<form-beans>
<form-bean name="LoginForm" type="cn.java.tower.login.LoginForm"/>
</form-beans>
<!-- ========================================= Global Exception Definitions --> <global-exceptions></global-exceptions>
<!-- =========================================== Global Forward Definitions --> <global-forwards></global-forwards>
<!-- =========================================== Action Mapping Definitions --> <action-mappings>
<action path="/login"
type="cn.java.tower.login.LoginAction"
name="LoginForm"
scope="request"
validate="true"
parameter="method"
input="/WebContent/webpages/login.jsp">
<forward name="success" redirect="true" path="/WebContent/webpages/index.jsp" />
<forward name="fail" path="/WebContent/webpages/login.jsp" />
</action> </action-mappings>
</struts-config>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货