📄 schoolshiprepaction.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.SchoolShipReplyForm;
import com.form.SchoolShipTopicForm;
public class SchoolShipRepAction extends DispatchAction {
private SchoolShipDao schoolShipDao;
public SchoolShipDao getSchoolShipDao() {
return schoolShipDao;
}
public void setSchoolShipDao(SchoolShipDao schoolShipDao) {
this.schoolShipDao = schoolShipDao;
}
// 添加回复信息
public ActionForward execute(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
SchoolShipReplyForm replyForm = (SchoolShipReplyForm) form;
SchoolShipTopicForm topicForm = new SchoolShipTopicForm();
topicForm.setId(new Integer(request.getParameter("topicId")));
replyForm.setTbSchoolShipTopic(topicForm);
schoolShipDao.addSchoolShipReply(replyForm);
return mapping.findForward("addSchoolShipRep");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -