项目的整体思路是:数据库模型——dao——service——servlet
一、全部显示实现
1.1根据数据库创建模型,数据类型和名称对应:
package jjxy.model;
public class book {
private String id;
private String name;
private double price;
private int pnum;
private String category;
private String description;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public int getPnum() {
return pnum;
}
public void setPnum(int pnum) {
this.pnum = pnum;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this