struts-config.xml配置文件: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"> <struts-config> <data-sources> <data-source key="keyOne" type="org.apache.commons.dbcp.BasicDataSource"> <set-property property="driverClassName" value="oracle.jdbc.driver.OracleDriver"/> <set-property property="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/> <set-property property="username" value="liou"/> <set-property property="password" value="oracle10"/> </data-source> </data-sources> <form-beans > <form-bean name="loginForm" type="com.measinfo.struts.form.LoginForm" /> </form-beans> <global-exceptions /> <global-forwards /> <action-mappings > <action attribute="loginForm" input="login.jsp" name="loginForm" path="/Login" scope="request" type="com.measinfo.struts.action.LoginAction" > <forward name="success" path="/success.jsp"></forward> <forward name="no" path="/no.jsp"></forward> </action> <action attribute="loginForm" input="login.jsp" name="loginForm" path="/LoginVal" scope="request" type="com.measinfo.struts.action.LoginValAction" > <forward name="success" path="/success.jsp"></forward> <forward name="no" path="/no.jsp"></forward> </action> </action-mappings> <message-resources parameter="com.measinfo.struts.ApplicationResources" /> </struts-config>