what is difference between servlet and cgi?
CGI :
CGI :
- Written in C, C++, Visual Basic and Perl
- Difficult to maintain, non-scalable, non-manageable
- Prone to security problems of programming language
- Resource intensive and inefficient
- Platform and application-specific
- Every time a new process begins each time a request is made to CGI program.
- A CGI program (and probably also an extensive runtime system or interpreter) needs to be loaded and started for each CGI request.
- CGI handles separate request by separate instances.
- Written in Java
- Powerful, reliable, and efficient
- Improves scalability, reusability (component based)
- Leverages built-in security of Java programming language
- Platform independent and portable
- A Servlet does not run in a separate process. This removes the overhead of creating a new process for each request.
- A Servlet stays in memory between requests.
- There is only a single instance which answers all requests concurrently. This saves memory and allows a Servlet to easily manage persistent data.
0 comments:
Post a Comment