摘要: 得到ServletContext的方式:public class ServletDemo6 extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) thro... 阅读全文
posted @ 2013-04-21 21:14 魅惑之眼 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Web.xml配置文件: ServletDemo5 cn.itcast.ServletDemo5 data1 xxxxx data2 yyyyy data3 zzzzz charset UTF... 阅读全文
posted @ 2013-04-21 21:03 魅惑之眼 阅读(125) 评论(0) 推荐(0) 编辑
摘要: //线程安全(网页)public class ServletDemo4 extends HttpServlet implements SingleThreadModel{ int i = 0; //子类覆盖父类的方法,不能抛出比父类更多的异常 public void doGet(HttpServl... 阅读全文
posted @ 2013-04-21 20:52 魅惑之眼 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-04-21 20:45 魅惑之眼 阅读(112) 评论(0) 推荐(0) 编辑