View Javadoc
1 /* 2 * Demosys. 3 * 4 * Terms of license - http://opensource.org/licenses/apachepl.php 5 */ 6 package org.demosys.task; 7 import javax.servlet.http.HttpServletRequest; 8 import javax.servlet.http.HttpServletResponse; 9 import org.apache.struts.action.Action; 10 import org.apache.struts.action.ActionForm; 11 import org.apache.struts.action.ActionForward; 12 import org.apache.struts.action.ActionMapping; 13 import org.demosys.web.ServiceLocator; 14 15 /*** 16 */ 17 public class CreationTaskAction extends Action { 18 public ActionForward execute(ActionMapping mapping, ActionForm objForm, 19 HttpServletRequest req, HttpServletResponse res) { 20 CreationTaskForm form = (CreationTaskForm)objForm; 21 String result = null; 22 23 try { 24 ServiceLocator.getServiceLocator().getTaskService().newTask(form.toTaskView()); 25 result = "success"; 26 } 27 catch (CreationTaskException e) { 28 e.printStackTrace(); 29 result = "failure"; 30 } 31 32 return mapping.findForward(result); 33 } 34 }

This page was automatically generated by Maven