Skip to content

A simple httpserver like Tomcat, just build some functions

License

Notifications You must be signed in to change notification settings

ChenHaoHu/SimpleHttpServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple httpserver like Tomcat, just build some functions

简单实现一个http服务器

进度

2019/1/14 v1.0 实现静态页面请求处理

2019/1/15 v1.0 实现动态servlet请求

2019/6/11-12 v2.0 实现NIO(参考Doug Lea 大佬的 Scalable IO in Java,ppt在项目根目录)

实现要点

  • 实现静态页面深路径访问

  • 实现Servlet访问

  • 封装了规范 --> 模仿 SUN 公司 ,几个简单的 interface

  • 实现了Servlet实例池

  • 实现了参数解析

  • 多线程处理请求

  • 改成了NIO的形式