文件名称:servlet小型项目
文件大小:19KB
文件格式:RAR
更新时间:2013-08-23 15:46:50
购物车
servlet小项目 public class BookListener implements ServletContextListener { public void contextDestroyed(ServletContextEvent arg0) { // TODO Auto-generated method stub } public void contextInitialized(ServletContextEvent event) { Map map = new TreeMap(); Book b1 = new Book(1,"core java",100); Book b2 = new Book(2,"c++",132); Book b3 = new Book(3,"php",10); Book b4 = new Book(4,"asp",178); map.put(b1.getId(), b1); map.put(b2.getId(), b2); map.put(b3.getId(), b3); map.put(b4.getId(), b4); ServletContext context = event.getServletContext(); context.setAttribute("bookmap",map); } }
【文件预览】:
book
----src()
--------org()
----.classpath(362B)
----.mymetadata(285B)
----.settings()
--------org.eclipse.wst.jsdt.ui.superType.container(49B)
--------org.eclipse.wst.jsdt.ui.superType.name(6B)
--------.jsdtscope(406B)
----.myeclipse()
----.project(1KB)
----WebRoot()
--------META-INF()
--------confirm.jsp(1KB)
--------login.html(800B)
--------Back.jsp(318B)
--------ListBookStore.jsp(1KB)
--------ListCart.jsp(2KB)
--------WEB-INF()