KickJava   Java API By Example, From Geeks To Geeks.

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


1 package servletunit.struts.tests;
2
3 import org.apache.struts.action.*;
4 import javax.servlet.http.HttpServletRequest JavaDoc;
5 import javax.servlet.http.HttpServletResponse JavaDoc;
6
7 public class CustomMappingAction extends Action {
8
9     public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest JavaDoc servletRequest, HttpServletResponse JavaDoc servletResponse) throws Exception JavaDoc {
10         if (actionMapping instanceof RequestActionMapping) {
11             return actionMapping.findForward("success");
12         }
13         else
14             return actionMapping.findForward("failure");
15     }
16
17 }
18
19
Popular Tags