Servlet
A Servlet is a javaee specification provided by sun micro-system to develop web based application.It came on 1997 with version 1.0,But officially it has been launched in with 2.0 version with some extra feature.It is based on multithreading which is the one of the most important feature of jdk.It is basically a enhancement of the CGI which was the most usable technology prior to servlet.
A servlet specification has been provided by Java Community Process which is a unit of sun microsystem and the specification has been written fully with the help of java language only.
A servlet specification has been implemented by so many vendor like Apache,IBM,WebLogic ,Jboss and so on to provide run time environment for execution of a servlet program.Each vendor has its own implementation for the servlet specification.
Prior to servlet there is a technology called Perl was so much popular for developing web application,But it had been written on Perl language which was platform dependent language.
A language which depends on a particuler operating system is called platform independent language and its vice-versa is called platform independent language.
There are a lot of difference betwen Servlet and CGI whic has been listed below...
CGI
|
Servlet
|
1. CGI are usually executable that are
native to the server’s operating system.
2.CGI programs are platform dependent
while servlets are platform independent
3.CGI programs run as separate
processes on the computer while servlets run on the JVM
4. CGI can be more vulnerable to attacks.
5. CGI can directly process scripts
while it needs to be translated and compiled.
6. CGI technology has been developed by Perl which is a script language.
|
1. Servlet codes are usually not executable
that are independent to the server’s operating system.
2.CGI programs are platform dependent
while servlets are platform independent
3. Servlet programs run as separate thread on the computer as it is
based on the multithreading concept .In other words for each request one
thread will be created and will be giving response respectively.
4. Servlet can provide more security either declaratively or
programmatically.
5. Servlet code does not depend any script for execution. It is only
depend upon jvm for execution.
6. Servlet code has been fully developed on java language.
|
No comments:
Post a Comment