public class LoginAction extends Action {
public ActionForward execute(ActionMapping actionMapping
ActionForm actionForm
HttpServletRequest servletRequest
HttpServletResponse serveltResponse) {
LoginActionForm loginform = (LoginActionForm) actionForm;
String username = loginform
String userpass = loginform
boolean flag = false;
String actionpath =
if (username
actionpath =
} else {
actionpath =
}
return actionMapping
}
}
在
待我們處理
我們返回的結果將會被ActionFormward對象所包裝
呵呵
Struts的核心是Action
a) actionMapping
b) struts
實現機制
[
From:http://tw.wingwit.com/Article/program/Java/ky/201311/29178.html