package message;

import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.Action;

public class LoginAction
    extends Action {
  public ActionForward execute(ActionMapping actionMapping,
                               ActionForm actionForm,
                               HttpServletRequest servletRequest,
                               HttpServletResponse servletResponse) {
    LoginForm userActionForm = (LoginForm) actionForm;
    String username = userActionForm.getUserName();
    if (username.length()>=6) {
      return actionMapping.findForward("success");
    }
    return null;
  }
}
