src/com/office/action/LogonAction.java
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.office.action;
import java.sql.ResultSet;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.office.actionform.LogonForm;
import com.office.dao.Content;
import com.office.dao.DB;
import com.office.officemenu.Searchtypelist;
import com.office.tools.Change;
import com.office.tools.CheckUser;
public class LogonAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
ActionForward forward=new ActionForward();
String mark=mapping.getParameter();
if(mark.equals("logon_no"))
forward=executeLogonNo(mapping,form,request,response); //在登录模块中单击“登录”按钮时触发该方法
if(mark.equals("index"))
forward=executeIndex(mapping,form,request,response); //在首页index.jsp中单击“首页”链接时触发该方法
return forward;
}
public ActionForward executeLogonNo(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
HttpSession session=request.getSession();
LogonForm logonform=(LogonForm)form;
ActionErrors errors=new ActionErrors();
String username=logonform.getUsername();
String userpassword=logonform.getUserpassword();
boolean mark=true;
if(username==null||username.equals("")){
errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("office.no.username.error"));
mark=false;
}
if(userpassword==null||userpassword.equals("")){
errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("office.no.userpassword.error"));
mark=false;
}
if(!mark){
saveErrors(request,errors);
return mapping.findForward("false");
}
ArrayList personsearchtypelist = Searchtypelist.getpersonsearchtypelist();
ArrayList cartypelist = Searchtypelist.getcarsearchtypelist();
ArrayList thingtypelist = Searchtypelist.getthingsearchtypelist();
ArrayList advicetypelist=Searchtypelist.getadvicesearchtypelist();
session.setAttribute("personsearchtypelist", personsearchtypelist);
session.setAttribute("cartypelist", cartypelist);
后面还有 63 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。