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

📄 productlistaction.java

📁 JSP开发的完整的网络商店.包含源代码和开发文档等
💻 JAVA
字号:
/*
 * Created on 2005-10-31
 * Author 曹汕
 * Version 1.0
 * Copyright by CS.SSPKU Inc. All rights reserved. 
 */
package com.struts.action;

import java.util.Vector;

import javax.servlet.ServletContext;
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.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.DynaActionForm;

import com.struts.business.Product;
import com.struts.controller.impl.ProductControllerImpl;
import com.struts.controller.impl.ProductTypeControllerImpl;
import com.struts.utils.Constants;

/**
 * @author cs
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class ProductListAction extends  MemberBaseAction {
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
        HttpSession session = request.getSession();
		ServletContext context = servlet.getServletContext();
        Vector vc = ProductControllerImpl.getInstance().getProductInfo();
        Vector proudct_type_list = ProductTypeControllerImpl.getInstance().getProductTypeList();
		session.setAttribute(Constants.Product_List_Key,vc);
		session.setAttribute(Constants.Product_Type_List_Key,proudct_type_list);
	   	return (mapping.findForward("toProductList"));	
		
	}
}

⌨️ 快捷键说明

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