摘要: 1.客户端发送http报文 http协议是建立在TCP/UDP协议之上,封装了socket通信(TCP/UDP需要使用)的细节。即客户端通过实现了TCP或者UDP socket通信的http客户端发送http消息给servlet。图片:暂时不支持2.servlet处理报文httpservlet启动了SocketServerpublic void init(ServletConfig config) throws ServletException { init(config); socket=new SocketServer(); socket.start();} 阅读全文
posted @ 2013-03-24 10:30 一天不进步,就是退步 阅读(398) 评论(0) 推荐(0)
摘要: tomcat 从http 端口接收到一个请求后:1.2.3. Tomcat receives a request on an HTTP port d1) The request is received by a separate thread which is waiting in the PoolTcpEndPoint class. It is waiting for a request in a regular ServerSocket.accept() method. When a request is received, this thre... 阅读全文
posted @ 2013-03-23 07:07 一天不进步,就是退步 阅读(456) 评论(0) 推荐(0)
摘要: 1.Bootstrap.java /** * Start the Catalina daemon. */ public void start() throws Exception { if( catalinaDaemon==null ) init(); Method method = catalinaDaemon.getClass().getMethod("start", (Class [] )null); method.invoke(catalinaDaemon, (Object [])null); }... 阅读全文
posted @ 2013-03-22 17:21 一天不进步,就是退步 阅读(750) 评论(0) 推荐(0)
摘要: 引用网址:http://tomcat.apache.org/tomcat-6.0-doc/architecture/startup/serverStartup.txthttp://tomcat.apache.org/tomcat-6.0-doc/architecture/startup/serverStartup.pdfTomcat启动时序第一步:初始化类: org.apache.catalina.startup.Bootstrap 1 /** 2 * Initialize daemon. 3 */ 4 public void init() 5 ... 阅读全文
posted @ 2013-03-22 15:56 一天不进步,就是退步 阅读(607) 评论(0) 推荐(0)
摘要: 1.策略模式The Strategy Pattern defines a family of algorithms,encapsulates each one,and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it 策略模式UML图2.策略模式组成—抽象策略角色: 策略类,通常由一个接口或者抽象类实现。—具体策略角色:包装了相关的算法和行为。—环境角色:持有一个策略类的引用,最终给客户端调用。3.spring AOP策略模式使... 阅读全文
posted @ 2013-03-21 17:22 一天不进步,就是退步 阅读(1680) 评论(0) 推荐(0)
摘要: 原文地址:http://blog.jobbole.com/34851/不要被我的标题骗了。我可不是来宣扬什么模型驱动开发,或者什么测试驱动开发的,那些都弱爆了。今天我要说的,是几种看起来激动人心、华丽无比,但是可以让程序员们痛苦不堪的开发方式,特别适合那些热衷于折磨虐待程序员的项目经理和产品经理们。当然,掌握以后,偷偷用就好了,请不要来感谢我。进度驱动开发(SDD,Schedule Driven Development)这是在国内最为流行的开发方式,大家心照不宣,口口相交,代代相传,我只是把它写下来而已。它最华丽的地方在于,可以百分之百,甚至百分之二百地压榨程序员的劳动力。需要实现哪些需求?用 阅读全文
posted @ 2013-03-21 12:19 一天不进步,就是退步 阅读(301) 评论(0) 推荐(0)
摘要: 1.resource的前生后世 前生:public interface Resource extends InputStreamSource 后世: 2.Resource辅助工具类ResourceUtils 3.resource的继承关系:(http://www.ibm.com/developerw 阅读全文
posted @ 2013-03-21 11:22 一天不进步,就是退步 阅读(706) 评论(0) 推荐(0)
摘要: http://www.ibm.com/developerworks/cn/java/j-lo-spring-resource/index.html 阅读全文
posted @ 2013-03-21 10:12 一天不进步,就是退步 阅读(140) 评论(0) 推荐(0)
摘要: 转载地址为:http://www.cnblogs.com/finejob/articles/974900.html题目1:====== 为管理岗位业务培训信息,建立3个表: S(S#,SN,SD,SA) S#,SN,SD,SA分别代表学号、学员姓名、所属单位、学员年龄 C(C#,CN) C#,CN分别代表课程编号、课程名称 SC(S#,C#,G) S#,C#,G分别代表学号、所选修的课程编号、学习成绩 1.使用标准SQL嵌套语句查询选修课程名称为 税收基础 的学员学号和姓名SelectSN,SDFROMS Where[S#]IN (Select[S#]FROMC,SC Where... 阅读全文
posted @ 2013-03-19 16:39 一天不进步,就是退步 阅读(453) 评论(0) 推荐(0)
摘要: 1.上节我们谈到拦截器起作用时,实现代码(ReflectiveMethodInvocation.java)如下: 2.前置Advice MethodBeforeAdviceInterceptor.java 3.后置Advice AfterReturningAdviceInterceptor.java 阅读全文
posted @ 2013-03-19 16:38 一天不进步,就是退步 阅读(3535) 评论(1) 推荐(0)