Contents

Image About the Author

Image About the Technical Reviewers

Image Chapter 1: Introducing JSP and Tomcat

Installing Java

Java Test

Installing Tomcat

Simple Tomcat Test

What Is JSP?

Viewing a JSP Page

Hello World!

Listing the HTML-Request Parameters

Summary

Image Chapter 2: JSP Elements

Introduction

Scripting Elements and Java

Scriptlets

Expressions

Declarations

Data Types and Variables

Objects and Arrays

Operators, Assignments, and Comparisons

Selections

Iterations

Implicit Objects

The application Object

The config Object

The exception Object

The out Object

The pageContext Object

The request Object

The response Object

The session Object

Directive Elements

The page Directive

The include Directive

The taglib Directive

Summary

Image Chapter 3: JSP Application Architectures

The Model 1 Architecture

The Model 2 Architecture

The E-bookshop Home Page

The E-bookshop Servlet

More on E-bookshop

E-bookshop’s Folder Structure

Eclipse

Creating a New Web Project

Importing a WAR file

Eclipse Occasional Bugs

A Better Online Bookshop

Objects and Operations

The Customer Interface

The E-shop Architecture

The Model

The Controller

The View

Summary

Image Chapter 4: JSP in Action

JSP Standard Actions

Actions: forward, include, and param

Action: useBean

Actions: setProperty and getProperty

Action: text

Actions: element, attribute, and body

Actions: plugin, params, and fallback

Comments and Escape Characters

JSP’s Tag Extension Mechanism

Bodyless Custom Actions

Bodied Custom Actions

Tag Files

JSTL and EL

JSP Expression Language

JSP Standard Tag Library

The Core Library

The i18n Library: Writing Multi-Lingual Applications

Summary

Image Chapter 5: XML and JSP

The XML Document

Defining Your Own XML Documents

XML DTDs

XML Schemas

Validation

JSTL-XML and XSL

XPath

An XPath Example

x:parse

XSLT: Transformation from One XML Format to Another

XSLT: Transformation from XML to HTML

XSL Transformation: Browser Side vs. Server Side

x:transform and x:param

JSP in XML Syntax

Summary

Image Chapter 6: Databases

MySQL

MySQL Test

MySQL/Tomcat Test

Database Basics

SQL Scripts

Java API

Connecting to the Database

Accessing Data

Transactions

DB Access in E-shop

What about the XML Syntax?

Possible Alternatives to MySQL

Summary

Image Chapter 7: JavaServer Faces 2.2

The simplef Application

An Alternative to <managed-bean>

The simplefx and simpleh Applications

The JSF Life Cycle

Event Handling

The JSF Tag Libraries

The html Library

The core Library

The facelet Library

The composite Library

Summary

Image Chapter 8: JSF and eshop

eshopf

The Top Menu

The Left Menu (part 1)

The Shop Manager

The Left Menu (part 2)

The Checkout Page

web.xml

Using and Creating Converters

Writing the Converter in Java

Registering the Converter with the Application

Using the Converter

Using and Creating Validators

Built-In Validators

Application-Level Validation

Custom Validators

Validation Methods in Backing Beans

Creating Custom Components

Component

Renderer

Tag

Inline Renderer

faces-config.xml

Summary

Image Chapter 9: Tomcat

Tomcat’s Architecture and server.xml

Context

Connector

Host

Engine

Service

Server

Listener

Global Naming Resources

Realm

Cluster

Valve

Loader and Manager

Directory Structure

conf

lib

logs

webapps

work

Logging the Requests

Tomcat on Port 80

Creating a Virtual Host

HTTPS

Application Deployment

Summary

Image Chapter 10: eshop*

The eshop Application

What Happens When the Application Starts

Handling Requests for Book Selection and Book Search

Displaying the Book Details

Managing the Shopping Cart

Accepting an Order

Providing the Payment Details

The eshopx Application

Style Sheet

web.xml

JSP Documents

Custom Tags and TLD

The eshopf Application

web.xml and context.xml

Style Sheet

JSP Documents

Java Modules

Summary

Image Appendix A: The Web Page

The WWW Network

URLs, Hosts, and Paths

XHTML vs HTML

XHTML/HTML Elements

HTML5

HTML Documents

Standard Attributes

Core Attributes

Language Attributes

Keyboard Attributes

Event Attributes

Object Event Attributes

Form Event Attributes

Keyboard Event Attributes

Mouse Event Attributes

Tables

Table Structure

Table Width

Table Borders

Row and Cell Alignment

Columns

Column Groups

Table Header, Body, and Footer

Input Forms

Buttons and Images

Lists

Image Maps

Splitting an Image with a Table

Using an Image Map with a Table or a List

Using an Image Map with Areas

The Bottom Line

Cascading Style Sheets

Style Syntax

Placing Styles

HTML Elements div and span

Using a Style Sheet to Implement Tabs

JavaScript

Placing JavaScript Inside a Web Page

Responding to Events

Checking and Correcting Dates

Animation: Ticker Tape

Animation: Bouncing Balls

Image Appendix B: SQL Practical Introduction

SQL Terminology

Transactions

Conventions

Statements

The WHERE Condition

Data Types

SELECT

CREATE DATABASE

CREATE TABLE

CREATE INDEX

CREATE VIEW

INSERT

DROP

DELETE

ALTER TABLE

UPDATE

SET TRANSACTION and START TRANSACTION

COMMIT and ROLLBACK

Reserved SQL Keywords

Image Appendix C: Abbreviations and Acronyms

Image Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.74.211