标签:struts
package com.yu;}
<body>
<form action="/Chapter1/login.action" method="post">
账号<input type="text" name="userName" >
密码<input type="password" name="userPassword">
<input type="submit" value="登录">
</form>
</body>
<body>
恭喜${userName},您登陆成功! <br>
您是第${sessionScope.sessionCounter} 次访问本网站!<br>
本网站被访问了${applicationScope.appCounter} 次!<br>
</body>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3
//EN" "http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="logincode" extends="struts-default">
<action name="login" class="com.yu.LoginCounterAction" method="counter">
<result name="success">/Test1/loginSuccess.jsp</result>
<result name="error">/Test1/loginFail.jsp</result>
</action>
</package>
</struts>
标签:struts
原文地址:http://blog.csdn.net/c656285856/article/details/39958497