View Javadoc

1   /*
2    * Created on 2004/10/22
3    */
4   package org.ieee.shinobu.demo.velocity.anthony;
5   
6   import javax.servlet.http.HttpServletRequest;
7   import javax.servlet.http.HttpServletResponse;
8   
9   import org.apache.struts.action.Action;
10  import org.apache.struts.action.ActionForm;
11  import org.apache.struts.action.ActionForward;
12  import org.apache.struts.action.ActionMapping;
13  import org.apache.struts.action.ActionMessage;
14  import org.apache.struts.action.ActionMessages;
15  
16  /***
17   * @author shinobu
18   */
19  public class AnthonyAction extends Action {
20  
21      public ActionForward execute(ActionMapping mapping, ActionForm form,
22              HttpServletRequest request, HttpServletResponse response) {
23          ActionMessages messages = new ActionMessages();
24          ActionMessage m1 = new ActionMessage("status.notLoggedIn"); // Here's the key-
25          messages.add(ActionMessages.GLOBAL_MESSAGE, m1);
26          saveMessages(request, messages);
27          return mapping.findForward("success");
28      }
29  
30  }