can we write servlet engine

Posted on 2004-11-24
Last Modified: 2010-04-01
can we write servlet engine?if yes How?
Question by:chaitu chaitu
    LVL 7

    Expert Comment

    you don't need to write one.  download tomcat and run some examples to better understand it:
    LVL 35

    Assisted Solution


    shows you the principals of it...

    Though it will be a LOT of work (to include security, etc), and you are probably better off using Tomcat (which is free)

    it also has the full source code :-)

    There are also smoe other open source alternatives you could look at:
    LVL 20

    Author Comment

    by:chaitu chaitu
    i know i dont need to write servlet engine i can sue any of servlet engine currently available;

    but if  i want to write a simple servlet engine(leave security etc aspects) who can handle my request and response;how can i write

    LVL 35

    Expert Comment

    Have a look at tjws...

    That seems to be a 50k java implementation of a servlet container...  You should be able to learn a lot from the source code...
    LVL 35

    Expert Comment

    Basically, the flow goes something like this:


    1) Create Servlet instance
    2) call init(), passing ServletConfig (if any)
    3) map servlet to url pattern

    then, when you get a connection on a socket

    1) build up request object
    2) create response object
    3) call servlet.service with request and response
    4) check error codes in response
    LVL 35

    Expert Comment

    any help?
    LVL 6

    Accepted Solution


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Running Java Servlet inside Eclipse Luna 6 127
    JSP + json + data structure 10 376
    loop through list of objects 14 178
    session bean client machine 9 46
    For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now