实体类LyTable也就是说model.vo下的2个类:
import java.sql.Date;
public class LyTable{
//Fields
private Integer id;
private Integer userId;
private Date date;
private String title;
private String content;
//Property accessors
//属性 id 的 get/set 方法
public Integer getId(){
return this.id;
}
public void setId(Integer id){
this.id=id;
}
//属性 userId 的 get/set 方法
public Integer getUserId(){
return this.userId;
}
public void setUserId(Integer userId){
this.userId=userId;
}
//属性 date 的 get/set 方法
public Date getDate(){
return this.date;
}
public void setDate(Date date){
this.date=date;
}
//属性 title 的 get/set 方法
public String getTitle(){
return this.title;
}
public void setTitle(String title){
this.title=title;
}
//属性 content 的 get/set 方法
public String getContent(){
return this.content;
}
public void setContent(String content){
this.content=content;
}
@Override
public String toString() {
return "LyTable [id=" + id + ", userId=" + userId + ", date=" + date + ", title=" + title + ", content="
+ content + "]";
}
}
第二个类:
public class UserTable {
//Fields
private Integer id;
private String username;
private String password;
//Property accessors
//属性 id 的 get/set 方法
public Integer getId(){
return this.id;
}
public void setId(Integer id){
this.id=id;
}
//属性 username 的 get/set 方法
public String getUsername(){
return this.username;
}
public void setUsername(String username){
this.username=username;
}
//属性 password 的 get/set 方法
public String getPassword(){
return this.password;
}
public void setPassword(String password){
this.password=password;
}
}
关于项目的jsp页面之登录页面(同注册页面,只不过需要稍微改一下):
<%@ page language="java" pageEncoding="utf-8"%>
如果没注册单击这里注册!
留言页面liuyan.jsp:
<%@ page language="java" pageEncoding="utf-8"%>
展示留言内容的页面main.jsp:
<%@ page language="java" pageEncoding="utf-8" import="java.util.*,java.sql.*,org.easybooks.test.model.vo.*,org.easybooks.test.jdbc.*"%>
最后建议在下一个登录出错页面!!!



