JavaServer Pages enables
the development of dynamic web sites and it is based on Java language.
Introduction to Jsp
To allow server side development JSP
was developed by Sun Microsystem.
Typical different clients connecting via the Internet to a Web
server. e.g. a well popular Apache Web server is execute on Unix platform.
C and Perl are languages which used on web servers to provide dynamic
content. Most languages including Visualbasic,Delphi,C and Java could be
used to write application that provided dynamic content using data from
database requests. These were known as CGI server side applications.
Microsoft developed ASP to allow HTML developers to easily provide
dynamic content supported as standard by Microsoft free Web Server called Internet
Information Server (IIS). A
comparison of ASP and JSP will be given in section below.
JSP source code runs on the web server via JSP Servlet Engine.
JSP files are HTML files with special Tags
containing Java source code that provide the dynamic content.
Why we used JSP?
JSP allow developer to quickly produce web sites and
applications in an open and standard way and it is easy to learn. JSP is Java based an
object-oriented language and offers a robust platform for web development
Reason to use JSP:
Reusability of Components by using Javabeans and EJB.
So you are never depend on one vendor or platform.
HTML and graphics displayed on the web browser are the presentation
layer and the Java code (JSP) on the server is classed as the implementation.
Due to the separation of presentation and implementation,web designers work
only on the presentation and Java developers concentrate on implementing the
Comparison of JSP with ASP,ASP.NET and Servlet
Comparison with ASP
JSP and ASP provide fairly similar functionality.
Both allow embedded code in an HTML
page,session variables and database access and manipulation.
mostly found on Microsoft platform but JSP can operate on any platform that
conforms to the J2EE specification.
JSP allow reusubility of component by using Javabeans
and EJBs but ASP provides the use of COM / ActiveX controls.
Comparison with ASP.NET
ASP.NET is based on the Microsoft .NET framework. By using .NET framework you
developed application with different programming language like
supported on many different platforms and the Java community has many years of
experience in designing and developing Enterprise quality scalable applications.
ASP.NET is quite an improvement over
the old ASP code.
Comparison with Servlets
A Servlet is a Java class that provides special server side service. It is
tough to write HTML code in Servlets. In Servlets you need to have lots of
println statements to create HTML. JSP pages are converted to Servlets so
actually can do the same thing as old Java Servlets.