Answers to Chapter 10

Reviewing It

1: Explain the purpose of a JAR file.
A1: To put all associated pieces of code together in a single downloadable file
2: Why does the JDeveloper software create a HTML file when saving the Java program?
A2: The HTML file will be accessed by the Web browser. This file contains the necessary HTML code to access the java program
3: Why does the JDBC thin client software prompt for userid and password?
A3: Because the thin drivers maintain connectivity between the client and the database where the thick drivers maintain connectivity between the servlet and the database
4: What is a DAD and why is it important?
A4: This database descriptor is used by servlets to make automatic connections to the database when the DAD name is referenced in the URL
5: What does the java function out.println() do.
A5: Creates output in the HTML file.

Checking It

1: What does JAR stand for?
  1. Java Archive Resource

  2. Java Archive File

  3. Java Active Repository

  4. Java Archive Repository

A1: b
2: The DB Servlet runs on
  1. The client

  2. The database server

  3. he Web server

  4. Any of the above

A2: c
3: You have to FTP the servlet code created to its intended target.

True/False

A3: False, the JDeveloper software can do the deployment.

Applying It

Independent Exercise 1:

  • Build the 'Hello World' example in Listing 10.1.

  • Deploy it and run it.

Independent Exercise 2:

  • Build a master/detail servlet that displays department information then displays the employees and their managers underneath.

  • Deploy and run the servlet.

Independent Exercise 3:

  • Build an applet and a servlet that prompts the user for a valid EMPNO in the EMP table, then displays the correct row from the EMP table.

  • Deploy and run the code.

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

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