日期:2014-05-17 浏览次数:20612 次
<title>Index页面</title>
<script type="text/javascript">
function regist(){
targetForm=document.forms[0];
targetForm.action="regist";
}
</script>
</head>
<body>
<form action="login" method="post">
<ul>
<li>用户名:<input name="username"/></li>
<li>密码:<input name="password"/></li>
<li><input type="submit" value="登录"/> <input type="submit" value="注册" onclick="regist();"/></li>
</ul>
</form>
</body>
<package name="default" namespace="/" extends="struts-default">
<global-results>
<result name="error">/error.jsp</result>
</global-results>
<global-exception-mappings>
<exception-mapping exception="java.lang.Exception" result="error"/>
</global-exception-mappings>
<action name="login" class="com.qider.struts.action.LoginAction">
<result name="success">/ok.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="aaa" class="com.qider.struts.action.LoginAction" method="regist">
<result name="reg">/reg.jsp</result>
</action>
</package>