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

📄 indexaction.java

📁 SSH 开发网上订餐系统。由于SSH相关包太大不方便上传。请自行导入。
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.struts.action;

import java.util.Iterator;
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.web.model.FoodInfo;
import com.web.servic.FoodInfo_Intef;
import com.web.servic.FoodStyle_Intef;
import com.web.servic.FoodInfo_Intef;
import com.web.servic.FoodStyle_Intef;

/** 
 * MyEclipse Struts
 * Creation date: 08-23-2008
 * 
 * XDoclet definition:
 * @struts.action validate="true"
 * @struts.action-forward name="index." path="/index.jsp"
 */
public class IndexAction extends Action {
	/*
	 * Generated Methods
	 */
	private FoodInfo_Intef foodInfo_Intef ;//servic 接口函数
	private FoodStyle_Intef foodStyle_Intef ;
	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {	
		
		List l = foodInfo_Intef.findByFState(1);//查找受欢迎餐品	
		request.getSession().setAttribute("welcomeFood_list",l);
		l = foodInfo_Intef.findByFState(2) ; // 推荐状态
		request.getSession().setAttribute("introFood_list",l);
		l = foodInfo_Intef.findByFState(3) ; // 新出状态
		request.getSession().setAttribute("newFood_list",l);
		l = foodStyle_Intef.findAll() ;
		request.getSession().setAttribute("foodStyle_list",l);
		l = foodInfo_Intef.findAll() ;
		request.getSession().setAttribute("AllfoodInfo_list",l);
		return mapping.findForward("index");
	}



	public FoodInfo_Intef getFoodInfo_Intef() {
		return foodInfo_Intef;
	}

	public void setFoodInfo_Intef(FoodInfo_Intef foodInfo_Intef) {
		this.foodInfo_Intef = foodInfo_Intef;
	}



	public FoodStyle_Intef getFoodStyle_Intef() {
		return foodStyle_Intef;
	}



	public void setFoodStyle_Intef(FoodStyle_Intef foodStyle_Intef) {
		this.foodStyle_Intef = foodStyle_Intef;
	}

}

⌨️ 快捷键说明

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