struts1.3 错误 找了 一天了
编的 一个简单的表单提交 可是总是 http400 在java吧 还被删帖 唉
index.jsp
<%@ 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可以大写?