在程序执行中,
No form found under 'MyFormName' in locale 'en_US'
此行出现异常
<html:javascript formName="MyFormName" htmlComment="false" />
为什么会出现此异常...?
Login.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Bank Maintenance</title>
<link rel="stylesheet" type="text/css" href="/tr4/css/styleTr4.css">
<script src="/tr4/js/scriptTr4.js"></script>
</head>
<body>
<div class="container">
<div class="middle">
<!-- ---------------------------------Login Page Start----------------------------------- -->
<div class="login">
<h1>Login</h1>
<html:html>
<html:form action="/loginFormProcess"
onsubmit="return validateLoginFormTr4(this);">
<html:javascript formName="MyFormName" htmlComment="false" />
<div id="user">
<label>Username</label>
<html:text property="userName"></html:text>
</div>
<div id="pass">
<label>Password</label>
<html:password property="passWord"></html:password>
</div>
<html:submit>Login</html:submit>
<div class="LoginErrorMessgae">
<html:errors />
</div>
</html:form>
</html:html>
</div>
</div>
</div>
</body>
</html>
这是我的登录页面,如果我删除该行,则我的程序运行正常,但验证无效。