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

📄 u04c10action.java

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

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

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import cn.hope.front.bo.U04C10BO;

import cn.hope.front.pojo.Student;

public class U04C10Action extends DispatchAction {
	
	public ActionForward around(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		Student student = new Student();
		U04C10BO u04C10BO = new U04C10BO();
		//U04C10Form u04C10Form = (U04C10Form)form;
		String id = request.getParameter("id");
		System.out.println(id);
		student = u04C10BO.studentInfo(id);
		student.setUpid(id);
		HttpSession session=request.getSession();
		
		session.setAttribute("studentInfoList",student);
		
		return mapping.findForward("c10");
	}

	public ActionForward copy(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		// TODO process request and return an ActionForward instance, for example:
		// return mapping.findForward("forward_name");
		
		return mapping.findForward("c10");
	}
	public ActionForward back(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		// TODO process request and return an ActionForward instance, for example:
		// return mapping.findForward("forward_name");
		
		return mapping.findForward("c1");
	}


}

⌨️ 快捷键说明

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