commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject cvs commit: jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts LogonAction.java
Date Thu, 08 Apr 2004 23:21:02 GMT
husted      2004/04/08 16:21:02

  Added:       chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts
                        LogonAction.java
  Log:
  Add LogonAction to postcheck state
  
  Revision  Changes    Path
  1.1                  jakarta-commons-sandbox/chain/apps/mailreader/src/java/org/apache/commons/chain/mailreader/struts/LogonAction.java
  
  Index: LogonAction.java
  ===================================================================
  package org.apache.commons.chain.mailreader.struts;
  
  import org.apache.struts.action.*;
  import org.apache.struts.webapp.example.Constants;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  /**
   * Run LogonCommand and confirm success.
   */
  public class LogonAction extends MailReaderAction {
  
      protected ActionForward checkState(ActionMapping mapping,
          ActionForm form,
          HttpServletRequest request,
          HttpServletResponse response) throws Exception {
  
          Object user = request.getSession().getAttribute(Constants.USER_KEY);
          if (user==null) {
              ActionMessages errors = new ActionMessages();
              errors.add(
                 ActionMessages.GLOBAL_MESSAGE,
                 new ActionMessage("error.password.mismatch"));
              saveErrors(request,errors);
              return findInput(mapping);
          }
  
          return null;
  
      }
  
  
  
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message