Java Reference
In-Depth Information
Self-Test Exercises
14. What is a major difference between a website implemented with a Java applet
and a website implemented with Java Server Pages?
15. Give the HTML to create a form with two elements: a textbox named
FirstName
that holds a maximum of 50 characters, and a Submit button. The
form should submit its data to a JSP program called
ProcessName.jsp
using
the
POST
method.
16. Identify the following JSP tags:
<% %>, <%@ %>, <%! %>, <%= %>
17. Write a JSP scriptlet that handles the form created in Self-Test Exercise 13 and
outputs the name in a bold heading font.
Chapter Summary
•
A
thread
is a separate computation process. A Java program can have multiple threads.
•
Use the class
Thread
to produce multiple threads.
•
The static method
Thread.sleep
inserts a pause into the thread in which it is invoked.
•
A thread's
join()
method is used to wait for threads to finish. The
synchronized
keyword restricts a critical region of code to a single thread only.
•
A
socket
refers to an endpoint that connects two programs over a network.
•
TCP
refers to a reliable, streaming protocol for network communication. It ensures
that data is received in the same order it was sent.
•
JavaBeans
refers to a framework for producing Java components that are easy to
combine with other JavaBean components to produce new applications.
•
A
relational database
organizes data in related tables. Records are stored as rows in a
table. The fields for each record are stored as columns in a table.
•
Java DB
or
Derby
is a database that runs in client/server or embedded mode.
•
JDBC allows you to insert SQL commands into your Java code to access and
manipulate databases.
•
The SQL
SELECT, UPDATE, CREATE TABLE
, and
INSERT
commands allow data to
be retrieved, modified, created, or inserted into a database.
•
Java Server Pages (JSP)
refers to a framework that allows a programmer to create
Web-based Java applications that run on the server. JSP requires a Web server capable
of compiling and running Java servlets and JSP.