Macromedia dreamweaver 8-using dreamweaver User Manual
Using JavaBeans (JSP)
953
In the above example, next you would probably create a page with an HTML form so users
could enter record data. The HTML form would contain three text fields (txtCity, txtAddress,
and txtPhone) and a submit button. The form would use the
could enter record data. The HTML form would contain three text fields (txtCity, txtAddress,
and txtPhone) and a submit button. The form would use the
GET
method and submit the text
field values to the page containing your command.
Using JSP prepared statements to modify a database
You can use Dreamweaver to create JSP prepared statements that insert, update, or delete
records in a database. A JSP prepared statement is a reusable server object that contains a SQL
statement. You supply the prepared statement with the SQL that performs the operation on
the database. For more information, see
records in a database. A JSP prepared statement is a reusable server object that contains a SQL
statement. You supply the prepared statement with the SQL that performs the operation on
the database. For more information, see
.
To create a prepared statement that edits a database record:
1.
In Dreamweaver, open the JSP page that will run the command.
2.
Open the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button
and select Prepared (Insert, Update, Delete).
and select Prepared (Insert, Update, Delete).
The Prepared (Insert, Update, Delete) dialog box appears.
3.
Complete the dialog box.
For instructions, click the Help button in the dialog box.
4.
Click OK.
After you close the dialog box, Dreamweaver inserts JSP code in your page that, when run on
the server, creates a prepared statement that inserts, updates, or deletes records in the database.
the server, creates a prepared statement that inserts, updates, or deletes records in the database.
Building pages that restrict access to
your site (ASP and JSP)
your site (ASP and JSP)
You can use Dreamweaver to build a set of pages that restrict access to your site. The method
you use is identical to the one for ColdFusion. For instructions, see
you use is identical to the one for ColdFusion. For instructions, see
Using JavaBeans (JSP)
JavaBeans components are architectural elements of multitier JSP applications. JavaBeans are
typically used as part of a middle “business-logic” layer meant to separate the presentation
logic from data-access logic. In these applications, the JavaBeans, (also referred to as “beans”)
not the JSP pages, contain the logic that directly accesses the database.
typically used as part of a middle “business-logic” layer meant to separate the presentation
logic from data-access logic. In these applications, the JavaBeans, (also referred to as “beans”)
not the JSP pages, contain the logic that directly accesses the database.