KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > servletunit > struts > tests > MyDispatchAction


1 /*
2  * User: dxseale
3  * Date: Nov 8, 2002
4  */

5 package servletunit.struts.tests;
6
7 import org.apache.struts.actions.DispatchAction;
8 import org.apache.struts.action.ActionForward;
9 import org.apache.struts.action.ActionMapping;
10 import org.apache.struts.action.ActionForm;
11
12 import javax.servlet.http.HttpServletRequest JavaDoc;
13 import javax.servlet.http.HttpServletResponse JavaDoc;
14 import javax.servlet.ServletException JavaDoc;
15 import java.io.IOException JavaDoc;
16
17 public class MyDispatchAction extends DispatchAction {
18
19     public ActionForward actionOne(ActionMapping mapping,
20                                    ActionForm form,
21                                    HttpServletRequest JavaDoc request,
22                                    HttpServletResponse JavaDoc response)
23             throws IOException JavaDoc, ServletException JavaDoc
24     {
25         return mapping.findForward("action1");
26     }
27
28     public ActionForward actionTwo(ActionMapping mapping,
29                                    ActionForm form,
30                                    HttpServletRequest JavaDoc request,
31                                    HttpServletResponse JavaDoc response)
32             throws IOException JavaDoc, ServletException JavaDoc
33     {
34         return mapping.findForward("action2");
35     }
36
37     public ActionForward actionThree(ActionMapping mapping,
38                                    ActionForm form,
39                                    HttpServletRequest JavaDoc request,
40                                    HttpServletResponse JavaDoc response)
41             throws IOException JavaDoc, ServletException JavaDoc
42     {
43         return new ActionForward(mapping.getInput());
44     }
45
46 }
47
Popular Tags