1 7 8 package com.acme; 9 10 import javax.servlet.ServletException ; 11 import javax.servlet.http.HttpServletRequest ; 12 import javax.servlet.http.HttpServletResponse ; 13 14 import org.apache.struts.action.ActionError; 15 import org.apache.struts.action.ActionErrors; 16 import org.apache.struts.action.ActionForm; 17 import org.apache.struts.action.ActionForward; 18 import org.apache.struts.action.ActionMapping; 19 20 29 30 public class AcmeAction extends org.apache.struts.actions.DispatchAction { 31 32 33 41 public ActionForward enterName(ActionMapping mapping, 42 ActionForm form, 43 HttpServletRequest request, 44 HttpServletResponse response) 45 throws Exception { 46 47 return mapping.findForward("name"); 48 49 } 50 51 52 public ActionForward enterAddress(ActionMapping mapping, 53 ActionForm form, 54 HttpServletRequest request, 55 HttpServletResponse response) 56 throws Exception { 57 58 return mapping.findForward("address"); 59 60 } 61 62 63 public ActionForward submitAddress(ActionMapping mapping, 64 ActionForm form, 65 HttpServletRequest request, 66 HttpServletResponse response) 67 throws Exception { 68 69 return mapping.findForward("done"); 70 71 } 72 73 74 public ActionForward previous(ActionMapping mapping, 75 ActionForm form, 76 HttpServletRequest request, 77 HttpServletResponse response) 78 throws Exception { 79 80 return mapping.findForward("previous"); 81 82 } 83 84 } 85 86 87 88 89 | Popular Tags |