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

📄 mgrkindaction.java

📁 是一个基于java开发的拍卖系统 非常适合初学者看
💻 JAVA
字号:
package com.wish.jhk.action;

import java.util.List;

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

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 com.wish.jhk.entity.Kind;
import com.wish.jhk.service.impl.AuctionManagerImpl;
import com.wish.jhk.util.BeanFactory;

public class MgrKindAction extends Action {
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest req, HttpServletResponse resp) throws Exception {
		ActionForward forward = new ActionForward();
		// AuctionManagerImpl auctionmanager = new AuctionManagerImpl();
		AuctionManagerImpl auctionmanager = (AuctionManagerImpl) BeanFactory
				.getBean("auctionmanager");
		try {
			List<Kind> kinds = auctionmanager.getAllKind();
			req.setAttribute("kinds", kinds);
			forward.setPath("/viewjsp/mgrKind.jsp");
		} catch (Exception e) {
			e.printStackTrace();
			req.setAttribute("exception", e.getMessage());
			forward.setPath("/error.jsp");
		}
		return forward;

	}
}

⌨️ 快捷键说明

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