⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 searchaction.java

📁 一个管理系统 用java作的
💻 JAVA
字号:
/*
 *  僔僗僥儉丂丂丗 嶳廏HR僔僗僥儉奐敪
 *  僒僽僔僗僥儉丗 WEB僔僗僥儉
 *
 *   VER    丂曄峏擔     丂晹壽      扴摉幰  丂曄峏撪梕
 *  -----------------------------------------------------------------
 *  V1.00 丂丂${date} (ShanXiu丂Soft)  Tuwenjie   弶斉
 *
 *       (C) Copyright SHANXIU CORPORATION 2006
 *                     All Rights Reserved.
 *
 */


package net.shanxiu.HR.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import net.shanxiu.HR.actionform.SearchActionForm;
import net.shanxiu.HR.entity.Constants;
import net.shanxiu.HR.service.SearchActionService;
import net.shanxiu.HR.vo.ResultVo;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 * SearchAction
 */
public class SearchAction extends Action {
    
    public ActionForward execute(ActionMapping mapping,
                                  ActionForm form,
                                  HttpServletRequest request,
                                  HttpServletResponse response)
	throws Exception {
        
        
        //MessageResources messages = getResources(request);
        //ActionMessages errors     = new ActionMessages();
        
        SearchActionForm searchActionForm = new SearchActionForm();
    	searchActionForm 		          = (SearchActionForm)form;
        
        SearchActionService searchActionService = new SearchActionService();
        String strSql                           = searchActionService.logic(searchActionForm);
        
        HttpSession session = request.getSession();
        session.setAttribute(Constants.SQLSTMT_KEY,strSql);
        
        ResultVo  resultVo = new ResultVo();
        resultVo           = searchActionService.search(strSql);
        
        request.setAttribute(Constants.SEARCH_KEY,resultVo);
        
        return (mapping.findForward("show"));

}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -