JSP复习笔记——第10章 连接数据库 之 jsp+DAO实现留言管理程序
案例-jsp+DAO实现留言管理程序
----------------Note.java------------------------
Java代码
1.package org.sky.darkness.note.vo ;
2.
3.public class Note {
4. private int id ;
5. private String title ;
6. private String author ;
7. private String content ;
8.
9. public void setId(int id) {
10. this.id = id ;
11. }
12. public void setTitle(String title) {
13. this.title = title ;
14. }
15. public void setAuthor(String author) {
16. this.author = author ;
17. }
18. public void setContent(String content) {
19. this.content = content ;
20. }
21.
22. public int getId() {
23. return this.id ;
24. }
25. public String getTitle() {
26. return this.title ;
27. }
28. public String getAuthor() {
29. return this.author ;
30. }
31. public String getContent() {
32. return this.content ;
33. }
34.};
package org.sky.darkness.note.vo ;
public class Note {
private int id ;
private String title ;
private String author ;
private String content ;
public void setId(int id) {
this.id = id ;
}
public void setTitle(String title) {
this.title = title ;
}
public void setAuthor(String author) {
this.author = author ;
}
public void setContent(String content) {
this.content = content ;
}
public int getId() {
return this.id ;
}
public String getTitle() {
return this.title ;
}
public String getAuthor() {
return this.author ;
}
public String getContent() {
return this.content ;
}
};
----------------------Person.java--------------------------
Java代码
1.package org.sky.darkness.note.vo ;
2.
3.public class Person
4.{
5. private String id ;
6. private String name ;
7. private String password ;
8.
9. public void setId(String id) {
10. this.id = id ;
11. }
12. public void setName(String name) {
13. this.name = name ;
14. }
15. public void setPassword(String password) {
16. this.password = password ;
17. }
18.
19. public String