01: /*
02: * User: dxseale
03: * Date: Nov 8, 2002
04: */
05: package servletunit.struts.tests;
06:
07: import org.apache.struts.actions.DispatchAction;
08: import org.apache.struts.action.ActionForward;
09: import org.apache.struts.action.ActionMapping;
10: import org.apache.struts.action.ActionForm;
11:
12: import javax.servlet.http.HttpServletRequest;
13: import javax.servlet.http.HttpServletResponse;
14: import javax.servlet.ServletException;
15: import java.io.IOException;
16:
17: public class MyDispatchAction extends DispatchAction {
18:
19: public ActionForward actionOne(ActionMapping mapping,
20: ActionForm form, HttpServletRequest request,
21: HttpServletResponse response) throws IOException,
22: ServletException {
23: return mapping.findForward("action1");
24: }
25:
26: public ActionForward actionTwo(ActionMapping mapping,
27: ActionForm form, HttpServletRequest request,
28: HttpServletResponse response) throws IOException,
29: ServletException {
30: return mapping.findForward("action2");
31: }
32:
33: public ActionForward actionThree(ActionMapping mapping,
34: ActionForm form, HttpServletRequest request,
35: HttpServletResponse response) throws IOException,
36: ServletException {
37: return new ActionForward(mapping.getInput());
38: }
39:
40: }
|