码迷,mamicode.com
首页 > Windows程序 > 详细

用Windows Live Writer发来

时间:2014-12-03 19:05:29      阅读:254      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   color   sp   on   div   2014   

文字

 

bubuko.com,布布扣

 

package com.myeclipseide.example.myblog.secure;

import com.opensymphony.xwork2.ActionSupport;

public class AuthenticateUser extends ActionSupport {

    private String userName;

    private String password;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

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

    public String execute() {
        // Empty username or password value is not permitted. 
        if (getUserName().equals("") || getPassword().equals("")) {
            addActionError("Invalid username or password. Please try again!");
            return ERROR;
        }
        return SUCCESS;
    }
}

用Windows Live Writer发来

标签:style   blog   http   io   color   sp   on   div   2014   

原文地址:http://www.cnblogs.com/amIurs/p/4140788.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!