A Guide to Developing Your Own Java Servlet Container
作者简介
· · · · · ·
Budi Kurniawan是《Java for Web With Servlets, JSP and EJB》的作者,同时也是一位IT咨询师,主要研究方向包括互联网与面向对象程序设计。除了其他一些计算机图书,他已经在10多种出版物上发表了约100篇文章,其中包括一些享有盛誉的Java杂志,如《Java.net》、《JavaPro》、《JavaWorld》等。Budi也是Brainysoftware.com的应用程序File Upload Bean的作者,在世界范围内很多公司都获得授权并使用该应用程序。
Paul Deck是一个有15多年经验的IT架构师,参与了很多项目的开发,这些项目遍布在美国、加拿大、中国和澳大利亚。他喜欢旅行,对网络、互联网编程、设计模式和用户界面交互设计非常感兴趣。
A loader does not do the reloading itself, however. Instead, it calls the Context interface's reload method.
By default, in the standard implementation of Context (the org.apache.catalina.core.StandardContext class, which is discussed in Chapter 12), reloading is not enabled. Therefore, to enable reloading of a context, you need to add a Context element for that context in your server.xml file, such as the following: <Context path="/myApp" docBase="myApp" debug="0" reloadable="true"/> (查看原文)
If a servlet implements this interface, you are guaranteed that no two threads will execute concurrently in a servlet's service method. The servlet container can guarantee this by synchronizing access to a single instance of the servlet, or by maintaining a pool of servlet instances and dispatching each new request to a free servlet. This interface does not prevent synchronization problems that result from servlets accessing shared resources such as static class variables or classes outside the scope of the servlet.
It is true that by implementing SingleThreadModel no two threads will execute a servlet's service method at the same time. However, to enhance performance the servlet container can create multiple instances of an STM servlet. That means, the STM servlet's service method can be ... (查看原文)
1 有用 libisthanks 2011-12-27 21:42:28
因为功力尚浅,代码量太大,所以没有完整的读完此书。但是本书确实是一本难得的好书,讲解深入,示例具有代表性,也学到了很多知识,对tomcat的框架有了大体的了解,同时了解了系统中用到的很多设计模式。有点缺陷就是书中讲解的tomcat是低版本的,现在已经有了很多的更新。
0 有用 许仙儿 2025-09-06 16:19:19 陕西
历久弥新
0 有用 蝴蝶来过这世界 2013-07-12 10:28:58
a brief read
0 有用 adam 2020-04-28 22:09:23
中文版大致过了下,代码比较多
0 有用 佚名 2012-04-22 11:04:47
看了一半,有些收获;开启了自己动手写的步伐;不过现在要是再看的话,肯定不是这个步骤了,结合jetty和tomcat