What JSP Is and Is Not


Java™ 2 Primer Plus
By Steven Haines, Steve Potts

Table of Contents
Chapter 22.  JavaServer Pages (JSP)

JavaServer Pages are just text files filled with standard HTML code that is interspersed with nuggets of Java-like code. This code is interpreted by a JSP translator and turned into Java code, along with the HTML that it modified. This architecture provides a script language that integrates well with the JVM, but that is simple enough to be learned by anyone capable of writing HTML. You can think of JSP as adding logical constructs to HTML.

The JSP page is translated into a servlet prior to being run. The servlet's output is HTML statements, so authoring JSP pages can be thought of as a fancy form of HTML authoring.

JSP can make calls to Java classes on the server. This is the subject of Chapter 23, "Component-Based JSP Pages." In addition, a programmer can write custom tags to extend JSP functionality. This is the subject of Chapter 24, "Custom Tag Libraries."

JavaServer Pages are not servlets or Java programs, although the syntax resembles Java syntax. They aren't JavaScript programs, which run in the browser instead of the server. JSP can be thought of as shorthand versions of servlets that must be translated into real Java servlets before execution.


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

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net