【文件属性】:
文件名称: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()
网友评论
- 我服,包都没有
- 不应该要2分,应该免费才对
- 初学者可以看看
- 很不错的资源。
- 还可以,能写出底层执行方法就更好了。
- 非常适合学习用。
- 可惜自己没有J2EE运行环境
- 很不错 比较全面
- 非常不错,非常适合新手学习使用。
- 很好,比较适合初学者
- 不错适合初学者
- 学习一下 还不错
- 刚入手 很有用。谢谢
- 还行,新手学习还可以
- 对于学习servlet适合新手使用借鉴,总体来说不错!