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

📄 u05forwarda201action.java

📁 持久层hibernate技术使用的一个例子
💻 JAVA
字号:
package cn.hope.mana.action;

import java.util.Iterator;
import java.util.List;

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

import org.apache.commons.lang.StringUtils;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import cn.hope.mana.bo.U05BO;
import cn.hope.mana.pojo.TQuestion;
import cn.hope.mana.pojo.U07CommonListVO;

public class U05ForwardA201Action extends Action {

	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		U05BO u05bo = new U05BO();

	    Integer SSid = new Integer(request.getParameter("SSid"));
	    request.getSession().setAttribute("SSid",SSid);
	    
		String aaa= "2";
		request.getSession().setAttribute("abcdefg",aaa); 
		
		String tqtId = "0";
		request.getSession().setAttribute("U05TypeId",tqtId);
		
		String a = "1";
		request.getSession().setAttribute("U05AAAA",a);
		
        //分页
		
		U07CommonListVO cl_vo = new U07CommonListVO();
		int start = 0;
		boolean isEq = false;
		
		if (StringUtils.isNotEmpty(request.getParameter("start"))) {
			start = Integer.parseInt(request.getParameter("start"));
		}
		if (StringUtils.isNotEmpty(request.getParameter("isEq"))) {
			isEq = true;
		}
		cl_vo = u05bo.serach(SSid , start, isEq);
		
		List list = cl_vo.getRs();
		
		Iterator it = list.iterator();
		
		while(it.hasNext()){
			TQuestion tQuestion = (TQuestion)it.next();
			String name = tQuestion.getTqName();
			if(name.length()>11){
				name = name.substring(0,10);
				tQuestion.setTqName(name);
			}
		}
		
		request.getSession().setAttribute("fenye1",cl_vo);
		
		return mapping.findForward("success");
	}
}

⌨️ 快捷键说明

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