standard taglib • implementation of the JSP Standard Tag Library • support   development   comments to JSR-52
Examples     IntroductionGeneral PurposeConditionalsIteratorsImportI18N & FormattingXMLSQLTLVMisc.

SQL Tags Examples

These examples create their own table for demonstration purposes. Every database supports table creation in a slightly different way. For instance, different databases have different types and constraints. The simplest possible table was chosen, however it may still not be supported by your particular database. Check your database documentation or administrator if you have problems creating the table and modify the examples acordingly. Here is the table used in the examples:


    create table mytable (
      nameid int primary key,
      name varchar(80)
    )

Enter your Driver Name and DataBase URL to test the Database Tag Library.

NOTE: You will need to have the DataBase Driver classes available to your server's classloader or in your server's CLASSPATH at startup.

Driver:
URL:

The following two fields are Optional. They are included for convenience.
NOTE: an unsecure form is used.

User Name:
Password:


NOTE: You can access the tags directly here to look at the source. If you do not provide a valid Driver and URL using the above form the tags NOT run properly.

DataBase Tags Examples

Query Iterate  

Example showing how to iterate over the result of a query.

Update  

Example showing several database updates.

Direct Query  

Example showing how the the result of a query can be directly accessed.

Query Parameters  

Example showing how query parameters can be used to create an SQL query.

Transaction  

Example showing how to setup transactions.

Driver Setup  

A sample page showing how a driver can be configured. NOTE: this is meant for prototyping and simple applications.

standard taglib • implementation of the JSP Standard Tag Library • support   development   comments to JSR-52