Code Monkey home page Code Monkey logo

simpletomcat's Introduction

Tomcat简易版 V3.0

项目介绍

基于《how tomcat works》(中文版:《深入剖析Tomcat》)每个章节的内容(ZAO LUN ZI)
本版本实现了一个简单的Servlet容器
  • 可以解析并相应静态html、css、图片等资源。
  • 可以解析继承HttpServlet类的自定义Servlet。
  • 能够解析parameter/header/cookie等信息。
  • Session or Servlet init()/destory()等功能也会在以后的版本实现。

实现过程: 跟我一起动手实现Tomcat(三):解析Request请求参数、请求头、cookie

体验DEMO

1.运行Bootstrap#main()启动服务
2.浏览器输入127.0.0.1:8080/register.html
3.输入注册账号密码,即可看到控制台输出执行RegisterServlet的消息。

快速开始

1. 将所需要使用的静态HTML文件放入resources/webroot/路径下
2. 编写简单的Servlet(继承HttpServlet类),编译成class文件后拷贝到resources/webroot/servlet/路径下
3. 运行Bootstrap#main()启动服务
4. 打开浏览器输入127.0.0.1:8080/{你的资源文件}即可访问静态HTML资源
5. 打开浏览器输入127.0.0.1:8080/servlet/{你的serlvet名称}即可访问自定义Servlet

运行流程

process

运行环境

- java 8
- maven 3.0+
- chrome

simpletomcat's People

Contributors

geoffrey-yip 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.