User's Guide
|
  |   |
This manual is intended for application developers who will be using Netscape Application Builder to design and develop Netscape Application Server applications. It provides conceptual sections that will prove useful to anyone working with Netscape Application Builder, as well as task-oriented sections and a tutorial that describe the steps required to build a web application.
|
|
Contents
|
|
|
| |
|
Preface
|
|
About This Guide
|
|
What You Should Already Know
|
|
How This Guide Is Organized
|
|
Part I: Getting Started
|
|
Part II: Building Applications
|
|
Part III:
|
|
Part IV: Testing and Deploying Applications
|
|
Appendixes
|
|
Documentation Conventions
|
|
|
Part 1
|
Getting Started
|
| |
Chapter 1
|
A Quick Tour of Netscape Application Builder
|
|
This chapter summarizes the features and user interface of Netscape
Application Builder.
|
|
About Netscape Application Builder
|
|
Feature Overview
|
|
The Welcome Dialog Box
|
|
The Workspace
|
|
Window Types
|
|
Moving and Resizing
|
|
The Main Menu
|
|
Toolbars
|
|
Repositioning Toolbars
|
|
Showing and Hiding Toolbars
|
|
The Project Window
|
|
Project Folder and File Types
|
|
The Project Map
|
|
Editor Windows
|
|
Arranging Editor Windows
|
|
The Palette
|
|
The Properties Window
|
|
The Messages Window
|
| |
Chapter 2
|
Designing Applications
|
|
This chapter describes the relationships between files used in creating
applications to run on the Netscape Application Server.
|
|
Parts of an Application
|
|
Data Access Layer
|
|
Relational Data Sources
|
|
Nonrelational Data Sources
|
|
Presentation Layer
|
|
About Presentation Logic
|
|
About Presentation Layout
|
|
Business Logic Layer
|
|
Enterprise JavaBeans
|
|
Assembling the Pieces
|
|
Types of Files in a Project
|
|
How Files Relate to Each Other
|
|
Getting Started
|
|
Understand the Netscape Application Server Environment
|
|
Define the Application Environment
|
|
Define the Application Requirements
|
|
Define the User Interface
|
|
Set Up the Data Sources
|
| |
Chapter 3
|
Setting Netscape Application Builder Options
|
|
This chapter describes how to set and change Netscape Application
Builder options.
|
|
About Netscape Application Builder Options
|
|
Setting Project Options
|
|
Setting the Start Page
|
|
Setting Base Classes
|
|
AppResource.java
|
|
BaseServlet.java
|
|
Setting Development Options
|
|
Setting Startup Options
|
|
Setting Code Generation Options
|
|
Setting Java Compiler Options
|
|
Setting HTML Options
|
|
Setting Text Colors
|
|
Setting Source Control Options
|
|
Setting Runtime Options
|
|
Changing the Product Key
|
|
Changing File Pathnames
|
|
Setting Options for Message Logging
|
|
Setting Server IDs
|
|
Configuring Database Drivers
|
|
Configuring Data Sources
|
|
Customizing the Palette
|
| |
Chapter 4
|
Tutorial
|
|
This tutorial introduces features of Netscape Application Builder by
walking you through the creation of a simple application. This sample
application enables users to purchase and sell compact discs.
|
|
Task 1: Starting a New Project
|
|
Launch Netscape Application Builder
|
|
Create a New Project
|
|
Create a Data Model
|
|
Creating Aliases
|
|
Joining Tables
|
|
Clean Up Project File
|
|
Add Any Pre-Existing HTML Files
|
|
Save Your Work
|
|
Task 2: Creating Static Links
|
|
Create and/or Link the Destinations for the Main Menu (index.html)
|
|
Task 3: Creating an Input Form
|
|
Generate a Data Entry Form and Associated Servlet
|
|
Edit the JavaServer Page
|
|
Edit the Query File
|
|
Edit the Servlet File
|
|
Add the Main Menu Link
|
|
Task 4: Creating a Login Sequence
|
|
Create the Login Page and Servlet to Process Login Data
|
|
Modify CalledLogin.java File
|
|
Compile
|
|
Link the Login Page to the Main Menu
|
|
Task 5: Creating a Database Form
|
|
Task 6: Creating Browse Activities
|
|
Create Browse Titles By Artist Activity
|
|
Adding Select Conditions
|
|
Converting a Column to Links
|
|
Create Browse Titles By Price Activity
|
|
Adding Select Conditions
|
|
Converting Columns to Links
|
|
Connect Main Menu Links to the Browse Activities
|
|
Task 7: Creating a Search Activity
|
|
Modifying a SQL Query
|
|
Editing a JavaServer Page
|
|
Task 8: Using Queries and Result Sets
|
|
Create SELECT Query
|
|
Create UPDATE Query
|
|
Create New Database Form
|
|
Edit BuyCD JavaServer Page
|
|
Edit BuyCD Servlet
|
|
Edit BuyCD ResultSet
|
|
Edit DefaultAction Method
|
|
Create Transaction Confirmation Page
|
|
Launch Results Wizard to Create BuyCommit Page
|
|
Link BuyCommit to the BuyCD Confirmation Page
|
|
Link Buy! to BuyCD Servlet
|
|
Task 9: Inserting Form Data Into a Database
|
|
Editing Called Code
|
|
Creating a Custom Query
|
|
Editing Insert Query Properties
|
|
Linking an HTML File
|
|
Task 10: Using Queries With Database Forms
|
|
Create SELECT Query
|
|
Selecting Query Properties
|
|
Specifying Select Conditions
|
|
Create UPDATE Query
|
|
Build Pending Sales Report
|
|
Adding a Required Session Variable
|
|
Converting Fields to Links
|
|
Create AcceptSale Servlet
|
|
Edit Servlet to Load and Execute Update Query
|
|
Create CancelSale Servlet
|
|
Edit Servlet to Load and Execute Update Query
|
|
Connect Links to Servlets
|
|
Connecting the Sold! Link
|
|
Connecting the Cancel Link
|
|
Link View Pending Transactions Activity to User Menu
|
|
Replace the Called Login JSP
|
|
Task 11: Creating Enterprise JavaBeans
|
|
|
Part 2
|
Building Applications
|
| |
Chapter 5
|
Creating and Managing Projects
|
|
This chapter describes the process of creating and managing projects.
|
|
The Development Process
|
|
Creating a Project
|
|
Working with Existing Projects
|
|
Opening a Project
|
|
Saving and Closing Projects
|
|
Adding or Removing Files
|
|
Creating Files
|
|
Adding Existing Files
|
|
Removing Files from a Project
|
|
Displaying File Dependencies
|
|
Editing Files
|
|
Saving, Closing, and Renaming Files
|
|
Viewing and Editing Project File Properties
|
|
Viewing Properties
|
|
Editing Properties
|
|
Using Custom Property Editors
|
|
Editing Data-Bound Properties
|
|
Editing URLs
|
|
Editing List Items
|
|
Editing Colors
|
|
Building a Project
|
|
Deploying the Project
|
|
Testing and Debugging
|
| |
Chapter 6
|
Creating Data Access Logic
|
|
This chapter describes the concepts and tasks for creating a model of
your data source, establishing the specific relationships between those
data, and how to use Netscape Application Builder to create queries
that use a data model and JDBC RowSet calls to allow your application
to access and retrieve information from a data source.
|
|
About Data Models and Queries
|
|
About Data Models
|
|
About Data Access Queries
|
|
Using Data Models and Queries
|
|
Creating a Data Model
|
|
Selecting a Data Source
|
|
Adding Data Source Tables
|
|
Viewing or Editing Data Source Table Properties
|
|
Viewing a Column's Properties or Changing the Column Alias
|
|
Specifying Relationships Between Data Source Tables
|
|
Creating Relationships
|
|
Modifying or Deleting Relationships
|
|
Adding Calculated Fields
|
|
Adding a Built-in Function to a Calculation
|
|
Adding an Operator or Delimiter to a Calculation
|
|
Including Additional Table Columns Within a Calculation
|
|
Importing a Third-Party Data Model
|
|
Creating Queries
|
|
Creating a SELECT Query
|
|
Creating an INSERT Query
|
|
Creating an UPDATE Query
|
|
Creating a DELETE Query
|
|
Testing Queries
|
|
Editing Generated Code: Queries
|
|
Editing Queries via the SQL Tab
|
|
Editing Query Descriptions
|
|
Adding Conditionals to a Query
|
|
Choosing Between Simple and Boolean Conditional Operators
|
|
Simple Conditional Operators
|
|
Boolean Conditional Operators
|
|
Adding a Conditional Operator to a Query
|
|
Using Query Parameters
|
|
Adding Joins to a Query
|
|
Sorting Query Results
|
|
Creating and Editing JDBC RowSet Objects
|
|
Setting Data Connections
|
|
Manipulating Result Sets
|
|
Specifying or Creating a Result Set
|
|
Creating a Result Set Using an Existing Query
|
|
Creating a Result Set Using a New Query
|
|
Creating a User-Defined Result Set
|
| |
Chapter 7
|
Creating Presentation Logic
|
|
This chapter describes the concepts and tasks associated with creating
the presentation logic for web applications and describes how to use
Netscape Application Builder's Java editor and Properties window to
customize servlets..
|
|
About Java Servlets
|
|
How Servlets Control the Presentation Logic
|
|
Servlets Work with Various Types of Components
|
|
Servlet Configuration (NTV) Files
|
|
JDBC RowSet Interface
|
|
Session Management Mechanisms
|
|
Enterprise JavaBeans
|
|
For more information about Enterprise JavaBeans, see Chapter 9, "Creating
|
|
JavaServer Pages
|
|
Standard Servlets
|
|
What the NAS Extended Runtime Servlet Model Provides
|
|
Servlets: A Code Walkthrough Example
|
|
Creating and Editing Servlets
|
|
Creating Servlets via the Add File(s) Dialog Box
|
|
Editing Servlets
|
|
Creating FormActionHandlers to Process Requests
|
|
Importing Servlets
|
|
Registering, Compiling, and Testing Servlets
|
|
Working with BaseServlet Files
|
|
Using a Base Servlet Class
|
|
Working with Session Management
|
|
Using an AppResource Class
|
|
Modifying Session Variables
|
|
Using an appInfo.ntv File
|
|
Inspecting the appInfo.ntv File via the Inspector
|
|
Accessing Data Sources via JDBC
|
|
Validation
|
|
Additional Programming Considerations
|
|
Handling Servlet Output
|
|
About GX Tags
|
|
Calling JavaServer Pages
|
|
Using setDefaultTemplate() to Change the Output JSP
|
| |
Chapter 8
|
Creating Presentation Layout
|
|
This chapter describes how to create the pages that make up your applications's
user interface. This is done by implementing the application's
presentation layout. Users of your application proceed from one
page to another in a sequence.
|
|
About Presentation Layout
|
|
Importing JSP Files
|
|
Testing and Deploying Pages and JSP Files
|
|
Testing HTML Pages and JavaServer Pages
|
|
Deploying HTML Pages and JavaServer Pages
|
|
Components and the Palette
|
|
Editing Pages and JSPs
|
|
Adding HTML Pages
|
|
Displaying Pages Using Different Views
|
|
Using Layout View
|
|
Using Outline View
|
|
Using Source View
|
|
Editing Text with the Format Toolbar
|
|
Adding Components with the Palette
|
|
About the Palette
|
|
Working with Components
|
|
Editing Tags and Components with the Properties Window
|
|
Converting Component Types
|
|
Adding Objects by Dragging and Dropping
|
|
Creating Hyperlinks
|
|
Creating Forms
|
|
Adding Images
|
|
Inserting Calls to Servlets or Enterprise JavaBeans
|
|
Inserting Calls to Servlets
|
|
Inserting Calls to Enterprise JavaBeans
|
|
Validating Data Entered on a Form
|
|
Handling Browser Events
|
|
Editing an Event Handler
|
|
Binding JavaServer Page Components to Dynamic Data
|
|
About GX Tags
|
|
About Row Sets
|
|
About Data-Binding Properties
|
|
Displaying a Single Field of Data
|
|
Displaying Single Columns of Data
|
|
Displaying Multiple Columns of Data
|
|
Displaying Multiple Rows of Data
|
|
Using the Tile Component to Display Rows of Data
|
|
Using Tiles as Table Rows
|
|
Specifying Custom Formatting for a JSP Field
|
|
Using GX Markup Tags
|
|
TextBlock
|
|
TagAttributes
|
|
type=TypeCode
|
|
id=Name
|
|
visible={True | False}
|
|
min=MinVal
|
|
max=MaxVal
|
|
value=ReplaceVal
|
|
Using the Cell Attribute in a GX Markup Tag
|
|
Using Cell with Tile
|
|
Formatting Data in a Cell Tag
|
|
Using the Tile Attribute in a GX Markup Tag
|
|
Repeating for Each Row in a Result Set
|
|
Repeating a Specified Number of Times
|
|
Using the Replace Attribute in a GX Markup Tag
|
|
Using the Include Attribute in a GX Markup Tag
|
| |
Chapter 9
|
Creating Business Logic
|
|
This chapter describes how to create Enterprise JavaBeans (EJBs). EJBs
determine the bulk of your application's actual data and rules processing.
EJBs enable you to partition your business logic, rules, and
objects into discrete, modular, and scalable units. Each EJB encapsulates
one or more application tasks or application objects, including
data structures and the methods that operate on them.
|
|
About Enterprise JavaBeans
|
|
Types of EJBs
|
|
Session EJBs
|
|
Entity EJBs
|
|
Creating Session EJBs
|
|
Creating Entity EJBs
|
|
Importing EJBs
|
|
Adding an EJB From Another Project
|
|
Examining and Changing EJB Properties
|
| |
Chapter 10
|
Using Wizards to Generate Project Files
|
|
This chapter describes the Netscape Application Builder code generation
wizards that help you perform common tasks associated with
building a Netscape application. The wizards provide a quick method
for automatically generating and linking together files needed for advanced
application features.
|
|
About the Wizards
|
|
Using the Data Model Wizard
|
|
Using the Input Wizard
|
|
Using the Results Wizard
|
|
Using the Database Forms Wizard
|
|
Using the Login Wizard
|
|
Using the Query Wizard
|
|
Using the HTML Page Wizard
|
|
Using the JSP Wizard
|
|
Using the Servlet Wizard
|
|
Using the Java File Wizard
|
|
Using the Base Servlet Wizard
|
|
Using the AppResource Wizard
|
|
Using the Session Bean Wizard
|
|
Using the Entity Bean Wizard
|
|
|
Part 3
|
Testing and Deploying Applications
|
| |
Chapter 11
|
Compiling, Testing, and Debugging Applications
|
|
This chapter describes debugging applications as well as deploying the
finished product onto one or more Netscape Application Servers.
|
|
Compiling Applications
|
|
Registering Files
|
|
Compiling Java files
|
|
Starting and Stopping a Test Server
|
|
Building EJB Stub and Skeleton Code
|
|
Testing Applications
|
|
Testing Queries
|
|
Testing HTML Pages and JSPs
|
|
Testing HTML Pages
|
|
Testing JavaServer Pages
|
|
Testing Servlets
|
|
Debugging Applications
|
| |
Chapter 12
|
Deploying and Downloading Applications
|
|
This chapter describes deploying the finished product onto one or
more Netscape Application Server(s).
|
|
Deploying Applications
|
|
About Deploying Applications
|
|
About File Locations
|
|
How to Deploy an Application
|
|
Saving JAR Files
|
|
Downloading a Previously Deployed Application
|
| |
Chapter 13
|
Working with Source Control
|
|
This chapter describes the source control features available within
Netscape Application Builder.
|
|
About Source Control
|
|
Configuring Source Control
|
|
Specifying a Source Control Utility
|
|
Defining Menu Items
|
|
Relationship of Text Fields to Source Control Submenu
|
|
Default Values for Command Lines
|
|
Macro Definitions
|
|
Setting Up the CVS Environment
|
|
Setting Up Visual SourceSafe
|
|
Invoking Commands from the Main Menu
|
|
Sharing Settings Among Programmers
|
| |
|
|
| |
Appendix A
|
Component Reference
|
|
This appendix describes all components available on the palette.
|
|
About Components
|
|
Data-Bound Properties
|
|
Events
|
|
Target Window
|
|
Palette Tabs
|
|
Components
|
|
CheckBox
|
|
Custom Script
|
|
Data-Bound Image Link
|
|
Data-Bound Link
|
|
DropDownLink
|
|
Drop-Down List
|
|
Form
|
|
Horizontal Line
|
|
Image
|
|
Label
|
|
Link Target
|
|
List
|
|
List Box
|
|
PushButton
|
|
Radio Button Group
|
|
Table
|
|
Text Area
|
|
TextField
|
|
Tile
|
| |
Appendix B
|
Using NAB 4.0 with Third-Party Tools
|
|
This appendix describes the interoperability considerations for using
Netscape Application Builder 4.0 with third party tools.
|
|
Using NAB 4.0 with Symantec Visual Café
|
|
Creating a Visual Cafe Project
|
|
Creating a StartEngine Class
|
|
Configuring the Project
|
|
Invoking NAS with a Visual Cafe Project
|
|
Using Visual Cafe
|
|
Manipulating Breakpoints
|
|
Stepping through Code
|
|
Viewing Stack Information
|
|
Examining Variables
|
|
Using NAB 4.0 with Macromedia Dreamweaver
|
|
Using NAB 4.0 with the Visual Cafe Java Editor
|
|
Using NAB 4.0 with the Visual Cafe Java Compiler
|
|
|
| |
Appendix C
|
Using Existing Projects with NAB 4.0
|
|
This appendix describes how you can use projects that run under
Netscape Application Server Netscape 2.1 and 3.0 with Netscape Application
Builder 4.0; for example, to deploy an existing application
without change or to gradually or partially migrate your application
into the NAS 4.0 programming model.
|
|
Opening the Project
|
|
Migrating to NAB 4.0
|
|
Deploying to NAS 4.0
|
|
Glossary
|
|
Index
|
|
|