Giter Site home page Giter Site logo

how-tomcat-works's Introduction

How-Tomcat-Works

本仓库的代码源于《How Tomcat Works》(《深入剖析Tomcat》)

Why

书中的代码年代较为久远,不能直接在当前的环境下运行。

因此我稍微修改了一部分由于JDK版本变化引起的Bug(enum关键字),同时通过Maven进行依赖管理。

目的只有一个:在JDK8和Maven3.6的环境下可以运行。

Use

环境:JDK8 & Maven3.6

建议:使用IDEA更好,可以方便查看依赖包的源码。

每一章的单个小程序都是独立运行的

每一章的程序Run起来之后,测试的URL和书中一致

Where

修改的地方大致如下(“大致”是因为写到这里的时候距修改代码已经过了一段时间):

第一章:

Response.java----在ResponseMessage中无Response头部信息,在使用Edge浏览器时能接收到服务器响应而Chrome不能显示,增加了头部信息。

第二章:

Pom.xml----引入javax.servlet
同时添加Response的头部(同第一章)

第三章:

Pom.xml----引入catalina
同时添加Response的头部(同第一章)

第四章:

取消添加Response的头部(见第一章),因为使用了catalina的Connector后会自动补充头部

第五章-第七章:

第八章:

具体改动可以对比Old和New文件夹的readme.txt

第九章-第十章:

第十一章:

Pom.xml----引入collection和logging依赖

第十三章-第十四章:

第十五章:

web.xml----见Digester_withTomcat的readme

第十六章:

MySwingApp.java----书上有正确源码,但下载的源码中漏掉了部分,添加了MyShutdownHook类

第12、17、18、19无程序,20章未测试

how-tomcat-works's People

Contributors

tengfeipu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.