KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > hero > struts > actions > AbstStrutsActionBase


1 package hero.struts.actions;
2
3 import java.io.IOException JavaDoc;
4 import javax.servlet.ServletException JavaDoc;
5 import javax.servlet.http.HttpServletRequest JavaDoc;
6 import javax.servlet.http.HttpServletResponse JavaDoc;
7 import org.apache.struts.action.Action;
8 import org.apache.struts.action.ActionForm;
9 import org.apache.struts.action.ActionForward;
10 import org.apache.struts.action.ActionMapping;
11 import javax.naming.Context JavaDoc;
12
13
14 /**
15  * This is the base class from which all Action classes that use
16  * Struts can be derived from.
17  *
18  * @author Miguel Valdes Faura
19  *
20  */

21 public abstract class AbstStrutsActionBase extends Action
22 {
23
24     /* Generic typical returns used so that the structs-config.xml can
25      * default global forwards.
26      */

27
28     protected static final String JavaDoc INITIAL = "initial";
29     protected static final String JavaDoc SUCCESS = "success";
30     protected static final String JavaDoc FAILURE = "failure";
31     protected static final String JavaDoc ERROR = "error";
32     protected static final String JavaDoc LOGIN = "login";
33     protected static final String JavaDoc NEWUSER = "newuser";
34     protected static final String JavaDoc CONFIRM = "confirm";
35     protected static final String JavaDoc ACTIVITY = "activity";
36     protected static final String JavaDoc EDITACTIVITY = "editactivity";
37     protected static final String JavaDoc PROJECT = "project";
38     protected static final String JavaDoc ADMIN = "admin";
39     protected static final String JavaDoc USER = "user";
40     protected static final String JavaDoc ADDPROJECT = "addproject";
41     protected static final String JavaDoc CLONEPROJECT = "cloneproject";
42     protected static final String JavaDoc PROJECTDETAILS = "projectdetails";
43     protected static final String JavaDoc USERNOTLOGGED = "usernotlogged";
44     protected static final String JavaDoc WORKLIST = "worklist";
45     protected static final String JavaDoc CONFIGPROJECT = "configproject";
46
47     protected Context JavaDoc jndiContext = null;
48     
49     
50     /**
51      * Default constructor
52      */

53     public AbstStrutsActionBase()
54     {
55     }
56         
57     /**
58      * @param mapping The ActionMapping used to select this instance
59      * @param actionForm The optional ActionForm bean for this request (if any)
60      * @param request The HTTP request we are processing
61      * @param response The HTTP response we are creating
62      * @throws IOException if an input/output error occurs
63      * @throws ServletException if a servlet exception occurs
64      * @return where control will be forwarded to after this request is processed
65      */

66     public abstract ActionForward perform(ActionMapping mapping, ActionForm form,
67         HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) throws IOException JavaDoc,ServletException JavaDoc;
68     {
69     }
70        
71     
72 }
73
Popular Tags