Industrial Training

Jsp

JavaServer Pages (JSP) is a technology based on the Java language and enables the development of dynamic web sites. JSP was developed by Sun Microsystems to allow server side development. JSP files are HTML files with special Tags containing Java source code that provide the dynamic content. The following shows the Typical Web server,different clients connecting via the Internet to a Web server. In this example,the Web server is running on Unix and is the very popular Apache Web server


jsp-1

First static web pages were displayed. Typically these were people,s first experience with making web pages so consisted of My Home Page sites and company marketing information. Afterwards Perl and C were languages used on the web server to provide dynamic content. Soon most languages including Visualbasic,Delphi,C and Java could be used to write applications that provided dynamic content using data from text files or database requests. These were known as CGI server side applications. ASP was developed by Microsoft to allow HTML developers to easily provide dynamic content supported as standard by Microsoft?s free Web Server,Internet Information Server (IIS).

The following diagram shows a web server that supports JSP files. Notice that the web server also is connected to a database.



jsp-2

JSP source code runs on the web server in the JSP Servlet Engine. The JSP Servlet engine dynamically generates the HTML and sends the HTML output to the client’s web browser.
Why use JSP?

JSP is easy to learn and allows developers to quickly produce web sites and applications in an open and standard way. JSP is based on Java,an object-oriented language. JSP offers a robust platform for web development.

Main reasons to use JSP:
1. Multi platform
2. Component reuse by using Javabeans and EJB.
3. Advantages of Java.
4. You can take one JSP file and move it to another platform,web server or JSP Servlet engine.



jsp-3

This means you are never locked into one vendor or platform.

HTML and graphics displayed on the web browser are classed as the presentation layer. The Java code (JSP) on the server is classed as the implementation.

By having a separation of presentation and implementation,web designers work only on the presentation and Java developers concentrate on implementing the application.

JSP compared to ASP
JSP and ASP are fairly similar in the functionality that they provide. JSP may have slightly higher learning curve. Both allow embedded code in an HTML page,session variables and database access and manipulation. Whereas ASP is mostly found on Microsoft platforms i.e. NT,JSP can operate on any platform that conforms to the J2EE specification. JSP allow component reuse by using Javabeans and EJBs. ASP provides the use of COM / ActiveX controls.

JSP compared to ASP.NET
ASP.NET is based on the Microsoft .NET framework. The .NET framework allows applications to be developed using different programming languages such as Visual Basic,C# and JavaScript. JSP and Java still has the advantage that it is supported on many different platforms and the Java community has many years of experience in designing and developing Enterprise quality scalable applications. This is not to say that ASP.NET is bad,actually it is quite an improvement over the old ASP code.

JSP compared to Servlets
A Servlet is a Java class that provides special server side service. It is hard work to write HTML code in Servlets. In Servlets you need to have lots of println statements to generate HTML. JSP pages are converted to Servlets so actually can do the same thing as old Java Servlets.

JSP architecture
JSPs are built on top of SUN Microsystems' servlet technology. JSPs are essential an HTML page with special JSP tags embedded. These JSP tags can contain Java code. The JSP file extension is .jsp rather than .htm or .html. The JSP engine parses the .jsp and creates a Java servlet source file. It then compiles the source file into a class file,this is done the first time and this why the JSP is probably slower the first time it is accessed. Any time after this the special compiled servlet is executed and is therefore returns faster.This means you are never locked into one vendor or platform.

HTML and graphics displayed on the web browser are classed as the presentation layer. The Java code (JSP) on the server is classed as the implementation.

By having a separation of presentation and implementation,web designers work only on the presentation and Java developers concentrate on implementing the application.

JSP compared to ASP
JSP and ASP are fairly similar in the functionality that they provide. JSP may have slightly higher learning curve. Both allow embedded code in an HTML page,session variables and database access and manipulation. Whereas ASP is mostly found on Microsoft platforms i.e. NT,JSP can operate on any platform that conforms to the J2EE specification. JSP allow component reuse by using Javabeans and EJBs. ASP provides the use of COM / ActiveX controls.
JSP compared to ASP.NET

Hi I am Pluto.