Saturday, 29 March 2014

Why we use JSP???


Why we use JSP??


JavaServer Pages often serve the same purpose as programs implemented using the Common Gateway Interface (CGI). But JSP offer several advantages in comparison with the CGI.

  1.  Performance is significantly better because JSP allows embedding Dynamic Elements in  HTML Pages itself instead of having a separate CGI files.
  2.  JSP are always compiled before it's processed by the server unlike CGI/Perl which requires the  server to load an interpreter and the target script each time the page is requested.
  3.  JavaServer Pages are built on top of the Java Servlets API, so like Servlets, JSP also has  access to all the powerful Enterprise Java APIs, including JDBC, JNDI, EJB, JAXP etc.
  4.  JSP pages can be used in combination with servlets that handle the business logic, the model  supported by Java servlet template engines.

Finally, JSP is an integral part of J2EE, a complete platform for enterprise class applications. This means that JSP can play a part in the simplest applications to the most complex and demanding.

Advantages of JSP:

Following is the list of other advantages of using JSP over other technologies:

  Active Server Pages (ASP): The advantages of JSP are twofold. First, the dynamic part is written in Java, not Visual Basic or other MS specific language, so it is more powerful and easier to use. Second, it is portable to other operating systems and non-Microsoft Web servers.
 . Pure Servlets: It is more convenient to write (and to modify!) regular HTML than to have plenty of println statements that generate the HTML.
  Server-Side Includes (SSI): SSI is really only intended for simple inclusions, not for "real" programs that use form data, make database connections, and the like.
 JavaScript: JavaScript can generate HTML dynamically on the client but can hardly interact with the web server to perform complex tasks like database access and image processing etc.
  Static HTML: Regular HTML, of course, cannot contain dynamic information.

What is Next?

I would take you step by step to set up your environment to start with JSP. I'm assuming you have good hands on with Java Programming to proceed with learning JSP.

0 comments:

Post a Comment