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

📄 schoolshiptopaction.java

📁 java web开发技术方案宝典
💻 JAVA
字号:
package com.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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 com.dao.SchoolShipDao;
import com.form.SchoolShipTopicForm;

public class SchoolShipTopAction extends DispatchAction {

	private SchoolShipDao schoolShipDao;

	public SchoolShipDao getSchoolShipDao() {
		return schoolShipDao;
	}

	public void setSchoolShipDao(SchoolShipDao schoolShipDao) {
		this.schoolShipDao = schoolShipDao;
	}

	// 查询留言信息
	public ActionForward querySchoolShipTopicList(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) {
		List<SchoolShipTopicForm> schoolShipTopicList = schoolShipDao
				.getSchoolShipList("from SchoolShipTopicForm");
		request.setAttribute("schoolShipTopicList", schoolShipTopicList);
		return mapping.findForward("querySchoolShipTopicList");
	}

	// 添加留言信息
	public ActionForward addSchoolShipTopic(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) {
		SchoolShipTopicForm schoolShipTopicForm = (SchoolShipTopicForm) form;
		schoolShipDao.addSchoolShip(schoolShipTopicForm);
		return mapping.findForward("addSchoolShipTopic");
	}

}

⌨️ 快捷键说明

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