⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.java

📁 华为java接口反编译结果!其中包含其所有接口实现过程
💻 JAVA
字号:
package com.kelefa.sms.action;

import com.opensymphony.xwork.Action;
import com.opensymphony.xwork.ActionContext;
import com.opensymphony.xwork.ActionSupport;

public class Login
    extends ActionSupport
{
  private String account;
  private String password;
  private String errorMsg;

  public Login()
  {
  }

  public String execute()
      throws Exception
  {
    if ( password == null || password.length() == 0 ||
	 account == null || account.length() == 0 )
    {
      errorMsg = ( "帐号和密码不能为空" );
      return Action.LOGIN;
    }


    if ( !"skylink".equals( password ) || !"admin".equals( account ) ) {
      errorMsg = ( "密码错误" );
      return Action.LOGIN;
    }

    ActionContext.getContext().getSession().put( "login", "true" );
    return Action.SUCCESS;

  }

  public void setAccount( String account )
  {
    this.account = account;
  }

  public void setPassword( String password )
  {
    this.password = password;
  }

  public String getAccount()
  {
    return account;
  }

  public String getPassword()
  {
    return password;
  }

  public String getErrorMsg()
  {
    return errorMsg;
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -