Home  >  Article  >  Database  >  cookie实现自动登陆(2)

cookie实现自动登陆(2)

WBOY
WBOYOriginal
2016-06-07 15:49:461333browse

下面的是对 CookieUtil 工具类各方法的调用演示: User.java 封装用户信息的 JavaBean 对象模型 package com.itcast.bean; public class User { private int id; private String userName; private String password; public String getPassword() { return p

下面的是对CookieUtil工具类各方法的调用演示:

User.java

封装用户信息的JavaBean对象模型

package com.itcast.bean;

public class User {

       private int id;

      

       private String userName;

       private String password;

      

       public String getPassword() {

              return password;

       }

       public void setPassword(String password) {

              this.password = password;

       }

       public String getUserName() {

              return userName;

       }

       public void setUserName(String userName) {

              this.userName = userName;

       }

       public int getId() {

              return id;

       }

       public void setId(int id) {

              this.id = id;

       }

}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn