日期:2014-05-17 浏览次数:20758 次
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <form method="POST"action="login.do"> <input type="text" name="loginName"> <input type="password" name="loginPass"> <input type="submit" value="submit" > </body> </html>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config SYSTEM "http://struts.apache.org/dtds/struts-config_1_3.dtd" > <struts-config> <form-beans> <form-bean name="LoginForm" type="app.LoginForm" /> </form-beans> <action-mappings> <action path="login" type="app.LoginAction" name="LoginForm" validate="false" scope="request"> <forward name="success" path="/success.html" /> <forward name="failure" path="/failure.html" /> </action> </action-mappings> </struts-config>
<action-mappings> <action path="/login" type="app.LoginAction" name="LoginForm" validate="false" scope="request"> <forward name="success" path="/success.html" /> <forward name="failure" path="/failure.html" /> </action> </action-mappings>
------解决方案--------------------
method的post可以大写?