Skip to Content
Beginning JavaServer Pages™
book

Beginning JavaServer Pages™

by Vivek Chopra, Sing Li, Rupert Jones, John T. Bell, Jon Eaves
February 2005
Intermediate to advanced
1296 pages
29h 21m
English
Wrox
Content preview from Beginning JavaServer Pages™

Appendix A. JSP Syntax Reference

This book has covered a lot of ground. Every fundamental concept in JSP was discussed, and the example code presented important programming techniques. However, in order to maintain a reasonable flow in the text, the syntactical details of many JSP elements were not fully explored.

This appendix captures, at one location, all of the JSP elements that are covered in the text, and provides a more detailed syntax description. It should serve as a useful reference resource during your daily JSP programming activities.

JSP pages are text files composed of the following components:

  • Template text: Template text is any text that is not a JSP element. Template text is static and does not change between invocations of the same JSP.

  • JSP elements: Many JSP elements result in the dynamic generation of Web content. Because template text can be any static text, a JSP element can contain template text that is in any format. Two of the most common formats are HTML and XML.

JSP elements can be composed of the following components:

  • Directives

  • Actions

  • Scripting elements

Directives are typically enclosed in <%@ .... %>. For example, a JSP page directive may look like the following:

<%@ page language="java" %>

Actions are specified in standard XML notation. For example, an occurrence of the <jsp:useBean> action with a nested occurrence of the <jsp:setProperty> action may appear as follows:

<jsp:useBean id="newsfeed" class="com.wrox.begjsp.ch2.NewsFeed" scope="request" > <jsp:setProperty ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JavaServer Faces

JavaServer Faces

Hans Bergsten

Publisher Resources

ISBN: 9780764574856Purchase book