📄 login.java
字号:
package com.laoer.bbscs.bbs.action;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import com.laoer.bbscs.servlet.*;
import com.laoer.bbscs.bbs.actionform.*;
public class Login
extends Action {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
ActionErrors errors = new ActionErrors();
LoginActionForm form = (LoginActionForm) actionForm;
if (form.getAct().equals("index")) {
if (form.getTourl() == null) {
form.setTourl("");
}
httpServletRequest.setAttribute("lf", form);
return actionMapping.findForward("login");
}
if (form.getAct().equals("login")) {
CookiesCheck cc = new CookiesCheck(httpServletRequest,
httpServletResponse);
String sid = cc.getSid();
if (sid == null || sid.length() == 0) {
errors.add("error.user.msg4", new ActionError("error.user.msg4"));
errors.add("error.user.insysblackuser",
new ActionError("error.user.insysblackuser"));
saveErrors(httpServletRequest, errors);
return actionMapping.findForward("error");
}
/*
httpServletRequest.setAttribute("aForwardInfo",
new ForwardInfo("",
"mainAction.do?sid=" + sid));
return actionMapping.findForward("forwards");*/
ActionForward f = new ActionForward("mainAction.do?sid=" + sid, true);
return f;
}
return actionMapping.findForward("error");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -