Advantages of JSP


Java™ 2 Primer Plus
By Steven Haines, Steve Potts

Table of Contents
Chapter 22.  JavaServer Pages (JSP)

The advantages of JSP compared to servlets are shown in Table 22.1.

Table 22.1. Advantage of JSP Compared to Servlets

JSP is simpler to read and understand. The JSP syntax is a small subset of the Java language that you find in most Java programs.

JSP removes the presentation logic from the communication logic. Servlets contain logic to manage the communication as well as that of the presentation. Normally, JSP contains only presentation logic.

JSP can separate the presentation from the business logic if component-based techniques are used.

JSP supports a division of labor between the presentation person and the Web server programmer. An HTML programmer can become proficient in JSP in less than half the time that it would take to learn how to program servlets. This enables the team to be separated into the presentation programmers using JSP, and the business-layer programmers who write components in Java to be used by the JSP programmers.

The only disadvantage of JSP versus Java is that JSP syntax is a dialect of Java, but not the entire language. This introduces a learning curve for the heavyweight Java developer. The advantages of JSP over other Web languages are shown in Table 22.2

Table 22.2. Advantages of JSP over ASP, ColdFusion, and PHP Tools

JSP is a dialect of Java, which means that the entire solution from presentation and business logic to database access can be done using only one programming language.

JSP is operating system neutral. It is not tied to one tool vendor or operating system vendor.

These advantages are primarily responsible for the tremendous popularity that JSP has enjoyed since its introduction. The primary disadvantage of JSP compared to the proprietary languages such as ASP and ColdFusion is that JSP tools might not be as rich as the ones available for the single-vendor tools.


    Java 2 Primer Plus
    Java 2 Primer Plus
    ISBN: 0672324156
    EAN: 2147483647
    Year: 2001
    Pages: 332

    Similar book on Amazon © 2008-2017.
    If you may any questions please contact us: