📄 newhotspotaction.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.shandong.struts.action;
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.shandong.business.iface.HotspotAdminService;
import com.shandong.business.imp.HotspotAdminServiceImp;
import com.shandong.struts.form.HotspotForm;
/**
* MyEclipse Struts Creation date: 12-04-2007
*
* XDoclet definition:
*
* @struts.action path="/newhotspot" name="newhotspotForm"
* input="/form/newhotspot.jsp" scope="request" validate="true"
*/
public class NewHotspotAction extends Action {
/*
* Generated Methods
*/
/**
* Method execute
*
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
HotspotForm newHotspotForm = (HotspotForm) form;// TODO
// Auto-generated
// method stub
try {
HotspotAdminService hotspotAdmin = new HotspotAdminServiceImp();
String videoPath = getServlet().getServletContext().getRealPath(
"/video");
if (!hotspotAdmin.newHotspot(newHotspotForm, videoPath))
return mapping.findForward("failed");
return mapping.findForward("success");
} catch (Exception e) {
e.printStackTrace();
return mapping.findForward("failed");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -