Weight
Map session= ServletActionContext.getContext().getSession();
session.remove("member");
return "success";
}
//管理员退出
public String adminExit(){
Map session= ServletActionContext.getContext().getSession();
session.remove("admin");
return "success";
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUsertype() {
return usertype;
}
*
* @param block
*/
private void md5Transform(byte block[]) {
long a = state[0], b = state[1], c = state[2], d = state[3];
long[] x = new long[16];
Decode(x, block, 64);
a = FF(a, b, c, d, x[0], S11, 0xd76aa478L);
d = FF(d, a, b, c, x[1], S12, 0xe8c7b756L);
c = FF(c, d, a, b, x[2], S13, 0x242070dbL);
b = FF(b, c, d, a, x[3], S14, 0xc1bdceeeL);
a = FF(a, b, c, d, x[4], S11, 0xf57c0fafL);
d = FF(d, a, b, c, x[5], S12, 0x4787c62aL);
c = FF(c, d, a, b, x[6], S13, 0xa8304613L);
b = FF(b, c, d, a, x[7], S14, 0xfd469501L);
a = FF(a, b, c, d, x[8], S11, 0x698098d8L);
d = FF(d, a, b, c, x[9], S12, 0x8b44f7afL);
c = FF(c, d, a, b, x[10], S13, 0xffff5bb1L);
b = FF(b, c, d, a, x[11], S14, 0x895cd7beL);
a = FF(a, b, c, d, x[12], S11, 0x6b901122L);
private int index=1;
private CommonDAO commonDAO;
private File upFile;
private String upFileContentType;
private String upFileFileName;
private static final int FILE_SIZE=16*1024;
private String bsid;
//文件上传
public void upLoadFile(File source,File target){
InputStream in=null;
OutputStream out=null;
try{
in=new BufferedInputStream(new FileInputStream(source),FILE_SIZE);
out=new BufferedOutputStream(new FileOutputStream(target),FILE_SIZE);
byte[] image=new byte[FILE_SIZE];
while(in.read(image)>0){
out.write(image);
}
}catch(IOException ex){
ex.printStackTrace();
}finally{
try{
运行环境
Java≥8、Tomcat≥7.0、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
技术框架
JSP JavaScript jquery bootstrap Spring Struts2 Hibernate
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
后台管理员:管理各种信息
用户:购买和发布商品,留言,求购等
前台
后台