• 大小: 13.81MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-30
  • 语言: Java
  • 标签: jsp  SSH  图书管理  

资源简介

使用SSH框架加上JSP作为后台,boostrap作为前端的响应式图书馆管理系统

资源截图

代码片段和文件信息

package Action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;
import org.hibernate.Query;
import org.hibernate.Session;

import com.opensymphony.xwork2.ActionSupport;

public class delbook extends ActionSupport {
private String bookid;
private int i=1;

public String getBookid() {
return bookid;
}
public void setBookid(String bookid) {
this.bookid = bookid;
}
public int getI() {
return i;
}
public void setI(int i) {
this.i = i;
}
@Override
public String execute() throws Exception {

Session session=HibernateUtil.getSessionFactory().openSession();
session.beginTransaction();
StringBuffer sb=new StringBuffer(“delete from Book b “);
if(bookid!=null)
{
sb.append(“where b.bookid like ?“);
Query query=session.createQuery(sb.toString());
query.setParameter(0bookid);
query.executeUpdate();
}
session.getTransaction().commit();

HttpServletRequest request=ServletActionContext.getRequest();
request.setAttribute(“i“ i);

session.close();
return SUCCESS;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-08-15 09:59  Library\
     文件        3517  2015-11-22 18:23  Library\.classpath
     目录           0  2017-08-15 09:59  Library\.idea\
     文件         882  2015-10-22 00:49  Library\.idea\misc.xml
     文件       12873  2015-10-22 00:49  Library\.idea\workspace.xml
     文件        1040  2015-09-18 23:32  Library\.project
     目录           0  2017-08-15 09:59  Library\.settings\
     文件         503  2015-09-18 23:32  Library\.settings\.jsdtscope
     文件          69  2015-09-19 00:11  Library\.settings\org.eclipse.core.resources.prefs
     文件         364  2015-09-18 23:32  Library\.settings\org.eclipse.jdt.core.prefs
     文件         473  2015-09-18 23:32  Library\.settings\org.eclipse.wst.common.component
     文件         345  2015-09-18 23:32  Library\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2015-09-18 23:32  Library\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2015-09-18 23:32  Library\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-08-15 09:59  Library\build\
     目录           0  2017-08-15 09:59  Library\build\classes\
     目录           0  2017-08-15 09:59  Library\build\classes\Action\
     文件        2295  2015-11-26 06:42  Library\build\classes\Action\delbook.class
     文件        2737  2015-11-26 06:42  Library\build\classes\Action\delbor.class
     文件        2295  2015-11-26 06:42  Library\build\classes\Action\deluser.class
     文件        5141  2015-11-26 06:42  Library\build\classes\Action\DetailAction.class
     文件        1200  2015-11-26 06:42  Library\build\classes\Action\HibernateUtil.class
     文件        3072  2015-11-26 06:42  Library\build\classes\Action\LoginAction.class
     文件        2856  2015-11-26 06:42  Library\build\classes\Action\RenewAction.class
     文件        3060  2015-11-26 06:42  Library\build\classes\Action\RoughAction.class
     文件        2967  2015-11-26 06:42  Library\build\classes\Action\savebook.class
     文件        3791  2015-11-26 06:42  Library\build\classes\Action\savebor.class
     文件        2741  2015-11-26 06:42  Library\build\classes\Action\saveuser.class
     文件        3100  2015-11-26 06:42  Library\build\classes\Action\searchaction.class
     文件        2952  2015-11-26 06:42  Library\build\classes\Action\searchbor.class
     文件        2411  2015-11-26 06:42  Library\build\classes\Action\searchuser.class
............此处省略139个文件信息

评论

共有 条评论