10.6 Basic Syntax

Here is a quick summary of the various JSP constructs you will see in this book.

HTML Text

  • Description:

    HTML content to be passed unchanged to the client

  • Example:

     
     <H1>Blah</H1> 
  • Discussed in:

    Section 11.1

HTML Comments

  • Description :

    HTML comment that is sent to the client but not displayed by the browser

  • Example:

     
     <!-- Blah --> 
  • Discussed in:

    Section 11.1

Template Text

  • Description:

    Text sent unchanged to the client. HTML text and HTML comments are just special cases of this.

  • Example:

    Anything other than the syntax of the following subsections

  • Discussed in:

    Section 11.1

JSP Comment

  • Description:

    Developer comment that is not sent to the client

  • Example:

     
     <%-- Blah --%> 
  • Discussed in:

    Section 11.1

JSP Expression

  • Description:

    Expression that is evaluated and sent to the client each time the page is requested

  • Example:

     
     <%=  Java Value  %> 
  • Discussed in:

    Section 11.4

JSP Scriptlet

  • Description:

    Statement or statements that are executed each time the page is requested

  • Example:

     
     <%  Java Statement  %> 
  • Discussed in:

    Section 11.7

JSP Declaration

  • Description:

    Field or method that becomes part of class definition when page is translated into a servlet

  • Examples:

     
     <%!  Field Definition  %> <%!  Method Definition  %> 
  • Discussed in:

    Section 11.10

JSP Directive

  • Description :

    High-level information about the structure of the servlet code ( page ), code that is included at page-translation time ( include ), or custom tag libraries used ( taglib )

  • Example:

     
     <%@  directive att  ="  val  " %> 
  • Discussed in:

    page : Chapter 12

    include : Chapter 13

    taglib and tag : Volume 2

JSP Action

  • Description :

    Action that takes place when the page is requested

  • Example:

     
     <jsp:  blah  >...</jsp:  blah  > 
  • Discussed in:

    jsp:include and related : Chapter 13

    jsp:useBean and related: Chapter 14

    jsp:invoke and related: Volume 2

JSP Expression Language Element

  • Description:

    Shorthand JSP expression

  • Example:

     
     ${  EL Expression  } 
  • Discussed in:

    Chapter 16

Custom Tag (Custom Action)

  • Description:

    Invocation of custom tag

  • Example:

     
     <  prefix:name  >  Body  </  prefix:name  > 
  • Discussed in:

    Volume 2

Escaped Template Text

  • Description:

    Text that would otherwise be interpreted specially. Slash is removed and remaining text is sent to the client

  • Examples:

     
     <\% %\> 
  • Discussed in:

    Section 11.1



Core Servlets and JavaServer Pages (Vol. 1.Core Technologies)
Core Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition)
ISBN: 0130092290
EAN: 2147483647
Year: 2002
Pages: 194

Similar book on Amazon

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