1.0
1.1
jdbc
http://jakarta.apache.org/taglibs/jdbc
The JDBC custom tag library contains tags that can retrieve data from
and insert data into databases.
connection
org.apache.taglibs.jdbc.connection.ConnectionTag
JSP
org.apache.taglibs.jdbc.connection.ConnectionTEI
Opens a connection based on either a url in the body of the tag
or by using the "datasource" tag attribute to reference to a
javax.sql.DataSource page attribute. driver (optional),
userid (optional), and password (optional) are also set in the
body of the tag.
id
true
false
dataSource
false
false
url
org.apache.taglibs.jdbc.connection.DatabaseURLTag
JSP
Sets the database URL of the enclosing connection tag
according to the initParameter, if specified, or the body of
the tag. The tag body will be trimmed.
initParameter
false
false
driver
org.apache.taglibs.jdbc.connection.DriverTag
JSP
Sets the java.sql.Driver class name for the enclosing
connection tag according to the initParameter, if specified, or the
body of the tag. The tag body will be trimmed.
initParameter
false
false
userId
org.apache.taglibs.jdbc.connection.UserIdTag
JSP
JSP tag userid, sets the database user id for the
enclosing connection tag. This tag is optional if the user name has
been encoded inside the database URL, or if the database does not
require a user name. The user name is read from the indicated
initParameter, if the attribute is set, or from the body of the tag
if it is not. The tag body will be trimmed.
initParameter
false
false
password
org.apache.taglibs.jdbc.connection.PasswordTag
JSP
JSP tag password, sets the password for the
enclosing connection tag. This tag is optional if the password has
been encoded inside the database URL, or if the database does not
require a password. The password is read from the indicated
initParameter, if the parameter is set, or from the body of the tag
if it is not. The tag body will be trimmed.
initParameter
false
false
closeConnection
org.apache.taglibs.jdbc.connection.CloseConnectionTag
empty
Close the specified connection. The "conn" attribute is the name of a
connection object in the page context.
conn
true
false
statement
org.apache.taglibs.jdbc.statement.StatementImplTag
org.apache.taglibs.jdbc.connection.StatementTEI
JSP
JSP tag statement, uses the enclosed query, resultset or
execute tags to perform a database operation.
id
true
false
conn
true
false
escapeSql
org.apache.taglibs.jdbc.statement.EscapeSQLTag
JSP
Replaces each single quote in the tag body
with a pair of single quotes. Body content will not be trimmed.
query
org.apache.taglibs.jdbc.statement.QueryTag
JSP
Sets the SQL query for the enclosing statement or
preparedstatement tag.
execute
org.apache.taglibs.jdbc.statement.ExecuteTag
JSP
Executes the query for the enclosing statement or
preparedstatement tag.
ignoreErrors
false
true
preparedStatement
org.apache.taglibs.jdbc.preparedstatement.PreparedStatementImplTag
org.apache.taglibs.jdbc.connection.PreparedStatementTEI
JSP
JSP tag preparedstatement, used the enclosed query,
resultset/execute, and set* tags to perform a database operation.
id
true
false
conn
true
false
setArray
org.apache.taglibs.jdbc.preparedstatement.SetArrayTag
empty
Setter for the enclosing preparedstatement tag. This tag is
empty and requires that the name of a java.sql.Array page attribute
object is passed into the "array" tag attribute.
position
true
false
name
true
false
setAsciiStream
org.apache.taglibs.jdbc.preparedstatement.SetAsciiStreamTag
empty
Setter for the enclosing preparedstatement tag. This tag is empty
and requires that the name of a java.io.InputStream page attribute
is passed into the "asciiStream" tag attribute.
position
true
false
name
true
false
length
true
true
setBigDecimal
org.apache.taglibs.jdbc.preparedstatement.SetBigDecimalTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of a java.math.BigDecimal page attribute into the "bigDecimal"
tag attribute, or represent it as a String inside the tag body.
Body content will be trimmed.
position
true
false
name
false
false
setBinaryStream
org.apache.taglibs.jdbc.preparedstatement.SetBinaryStreamTag
empty
Setter for the enclosing preparedstatement tag. This tag is empty
and requires that the name of a java.io.InputStream page attribute is
passed into the "binaryStream" tag attribute.
position
true
false
name
true
false
length
true
true
setBlob
org.apache.taglibs.jdbc.preparedstatement.SetBlobTag
empty
Setter for the enclosing preparedstatement tag. This tag is empty
and requires that the name of a java.sql.Blob page attribute is
passed into the "blob" tag attribute.
position
true
false
name
true
true
setBoolean
org.apache.taglibs.jdbc.preparedstatement.SetBooleanTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of a Boolean page attribute into the "boolean" tag attribute, or
represent it as a String inside the tag body. Body content
will be trimmed.
position
true
false
name
false
false
setBytes
org.apache.taglibs.jdbc.preparedstatement.SetBytesTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of a byte array page attribute into the "bytes" tag attribute, or
represent it as a String inside the tag body. Body content
will not be trimmed.
position
true
false
name
false
false
setByte
org.apache.taglibs.jdbc.preparedstatement.SetByteTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of a Byte page attribute into the "byte" tag attribute, or
represent it as a String inside the tag body. Body content will
be trimmed.
position
true
false
name
false
false
setCharacterStream
org.apache.taglibs.jdbc.preparedstatement.SetCharacterStreamTag
empty
Setter for the enclosing preparedstatement tag. This tag is empty
and requires that the name of a java.io.Reader page atttribute is
passed into the "characterStream" tag attribute.
position
true
false
name
true
false
length
true
true
setClob
org.apache.taglibs.jdbc.preparedstatement.SetClobTag
empty
Setter for the enclosing preparedstatement tag. This tag is empty
and requires that the name of a java.sql.Clob page attribute is passed
into the "clob" tag attribute.
position
true
false
name
true
false
setDate
org.apache.taglibs.jdbc.preparedstatement.SetDateTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of a java.sql.Date page attribute into the "date" tag attribute, or
represent it as a String inside the tag body. Body content will
be trimmed. Optionally, you may set the name of a
java.util.Calendar page attribute in the "calendar" attribute.
position
true
false
name
false
false
calendar
false
false
setDouble
org.apache.taglibs.jdbc.preparedstatement.SetDoubleTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the name
of a Double page attribute into the "double" tag attribute, or
represent it as a String inside the tag body. Body content will
be trimmed.
position
true
false
name
false
false
setFloat
org.apache.taglibs.jdbc.preparedstatement.SetFloatTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the name
of a Float page attribute into the "float" tag attribute, or
represent it as a String inside the tag body. Body content will
be trimmed.
position
true
false
name
false
false
setInt
org.apache.taglibs.jdbc.preparedstatement.SetIntTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of an Integer page attribute into the "int" tag attribute, or
represent it as a String inside the tag body. Body content will
be trimmed.
position
true
false
name
false
false
setLong
org.apache.taglibs.jdbc.preparedstatement.SetLongTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of the Long page attribute into the "long" tag attribute, or
represent it as a String inside the tag body. Body content will
be trimmed.
position
true
false
name
false
false
setNull
org.apache.taglibs.jdbc.preparedstatement.SetNullTag
empty
Setter for the enclosing preparedstatement tag. This tag is
empty and requires that you set the "sql type" of the null. The valid
SQL types are the field names of the java.sql.Types class
(ARRAY, BIGINT, BINARY, BIT, BLOB, CHAR, etc.). Optionally you
may include a "type name". See the jdbc tag library documentation
for more details.
position
true
false
sqlType
true
true
typeName
false
true
setObject
org.apache.taglibs.jdbc.preparedstatement.SetObjectTag
empty
Setter for the enclosing preparedstatement tag. This tag is empty
and requires that the name of an Object page page attribute is set in
the "object" tag attribute. Optionally, you may set the "sqlType"
and "scale" of DECIMAL and NUMERIC objects. See JDBC tag
documentation for more information.
position
true
false
name
true
false
sqlType
false
true
scale
false
true
setRef
org.apache.taglibs.jdbc.preparedstatement.SetRefTag
empty
Setter for the enclosing preparedstatement tag. This tag is empty
and requires that the name of a java.sql.Ref page attribute is passed
into the "ref" tag attribute.
position
true
false
name
true
false
setShort
org.apache.taglibs.jdbc.preparedstatement.SetShortTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of the Short page attribute into the "short" tag attribute, or
represent it as a String inside the tag body. Body content will
be trimmed.
position
true
false
name
false
false
setString
org.apache.taglibs.jdbc.preparedstatement.SetStringTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of the String page attribute into the "short" tag attribute, or
represent it as a String inside the tag body. Body content will
not be trimmed.
position
true
false
name
false
false
setTimestamp
org.apache.taglibs.jdbc.preparedstatement.SetTimestampTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of a java.sql.Timestamp page attribute into the "timestamp" tag attribute, or
represent it as a String inside the tag body. Body content will
be trimmed. Optionally, you may set the name of a
java.util.Calendar page attribute in the "calendar" attribute.
position
true
false
name
false
false
calendar
false
false
setTime
org.apache.taglibs.jdbc.preparedstatement.SetTimeTag
JSP
Setter for the enclosing preparedstatement tag. Either pass the
name of a java.sql.Time page attribute into the "time" tag attribute, or
represent it as a String inside the tag body. Body content will
be trimmed. Optionally, you may set the name of a
java.util.Calendar page attribute in the "calendar" attribute.
position
true
false
name
false
false
calendar
false
false
resultSet
org.apache.taglibs.jdbc.resultset.ResultSetTag
org.apache.taglibs.jdbc.connection.ResultSetTEI
JSP
JSP tag resulset, executes the query and loops through the results
for the enclosing statement or preparedstatement tag. The body of
this tag is executed once per row in the resultset. The optional
"loop" attribute, which default to true, specifies whether to execute
the tag body once per row "true", or to simply assign the ResultSet
to the page attribute specified by "id".
id
true
false
loop
false
false
wasNull
org.apache.taglibs.jdbc.resultset.WasNullTag
JSP
Executes its body if the last get* tag received a null value
from the database. Setting the "value" attribute to false will
execute the tag body if the last get* tag did not
return a null. You must be inside a resultset tag and there must
be a previous get* tag, or an error will be generated.
value
false
false
getArray
org.apache.taglibs.jdbc.resultset.GetArrayTag
empty
Gets the value, as a java.sql.Array, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the Array to a serlvet attribute with the "to" attribute. The scope of the servlet
attribute is specified by the "scope" XML attribute (default = page).
position
true
false
to
true
false
scope
false
false
getAsciiStream
org.apache.taglibs.jdbc.resultset.GetAsciiStreamTag
empty
Gets the value, as a java.io.InputStream, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the Inputstream to a serlvet attribute with the "to"
attribute. The scope of the servlet attribute is specified by the
"scope" XML attribute (default = page).
position
true
false
to
true
false
scope
false
false
getBigDecimal
org.apache.taglibs.jdbc.resultset.GetBigDecimalTag
empty
Gets the value, as a java.math.BigDecimal, of a coulmn in the
enclosing resultset. The column number is set via the "position"
attribute. You can optionally set the BigDecimal to a serlvet attribute
instead of the tag body with the "to" attribute. The scope of the
servlet attribute is specified by the "scope" XML attribute
(default = page).
position
true
false
to
false
false
scope
false
false
getBinaryStream
org.apache.taglibs.jdbc.resultset.GetBinaryStreamTag
empty
Gets the value, as a java.sql.Inputstream, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the Inputstream to a serlvet attribute with the "to"
attribute. The scope of the servlet attribute is specified by the
"scope" XML attribute (default = page).
position
true
false
to
true
false
scope
false
false
getBlob
org.apache.taglibs.jdbc.resultset.GetBlobTag
empty
Gets the value, as a java.sql.Blob, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the Blob to a serlvet attribute with the "to"
attribute. The scope of the servlet attribute is specified by the
"scope" XML attribute (default = page).
position
true
false
to
true
false
scope
false
false
getBoolean
org.apache.taglibs.jdbc.resultset.GetBooleanTag
empty
Gets the value, as a Boolean, of a coulmn in the
enclosing resultset. The column number is set via the "position"
attribute. You can optionally set the Boolean to a serlvet attribute
instead of the tag body with the "to" attribute. The scope of the
servlet attribute is specified by the "scope" XML attribute
(default = page).
position
true
false
to
false
false
scope
false
false
getBytes
org.apache.taglibs.jdbc.resultset.GetBytesTag
empty
Gets the value, as a byte[] array, of a coulmn in the
enclosing resultset. The column number is set via the "position"
attribute. You can optionally set the byte[] array to a serlvet attribute
instead of the tag body with the "to" attribute. The scope of the
servlet attribute is specified by the "scope" XML attribute
(default = page).
position
true
false
to
false
false
scope
false
false
getByte
org.apache.taglibs.jdbc.resultset.GetByteTag
empty
Gets the value, as a Byte, of a coulmn in the
enclosing resultset. The column number is set via the "position"
attribute. You can optionally set the Byte to a serlvet attribute
instead of the tag body with the "to" attribute. The scope of the
servlet attribute is specified by the "scope" XML attribute
(default = page).
position
true
false
to
false
false
scope
false
false
getCharacterStream
org.apache.taglibs.jdbc.resultset.GetCharacterStreamTag
empty
Gets the value, as a java.io.Reader, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the java.io.Reader to a serlvet attribute with the "to"
attribute. The scope of the servlet attribute is specified by the
"scope" XML attribute (default = page).
position
true
false
to
true
false
scope
false
false
getClob
org.apache.taglibs.jdbc.resultset.GetClobTag
empty
Gets the value, as a java.sql.Clob, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the Clob to a serlvet attribute with the "to"
attribute. The scope of the servlet attribute is specified by the
"scope" XML attribute (default = page).
position
true
false
to
true
false
scope
false
false
getDate
org.apache.taglibs.jdbc.resultset.GetDateTag
empty
Gets the value, as a java.sql.Date, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the Date to a serlvet attribute instead
of the tag body with the "to" attribute. The scope of the servlet
attribute is specified by the "scope" XML attribute (default = page).
You may also optionally specify the name of a java.util.Calendar page
attribute.
position
true
false
to
false
false
scope
false
false
calendar
false
false
getDouble
org.apache.taglibs.jdbc.resultset.GetDoubleTag
empty
Gets the value, as a Double, of a coulmn in the
enclosing resultset. The column number is set via the "position"
attribute. You can optionally set the Double to a serlvet attribute
instead of the tag body with the "to" attribute. The scope of the
servlet attribute is specified by the "scope" XML attribute
(default = page).
position
true
false
to
false
false
scope
false
false
getFloat
org.apache.taglibs.jdbc.resultset.GetFloatTag
empty
Gets the value, as a Float, of a coulmn in the
enclosing resultset. The column number is set via the "position"
attribute. You can optionally set the Float to a serlvet attribute
instead of the tag body with the "to" attribute. The scope of the
servlet attribute is specified by the "scope" XML attribute
(default = page).
position
true
false
to
false
false
scope
false
false
getInt
org.apache.taglibs.jdbc.resultset.GetIntTag
empty
Gets the value, as a Integer, of a coulmn in the
enclosing resultset. The column number is set via the "position"
attribute. You can optionally set the Integer to a serlvet attribute
instead of the tag body with the "to" attribute. The scope of the
servlet attribute is specified by the "scope" XML attribute
(default = page).
position
true
false
to
false
false
scope
false
false
getLong
org.apache.taglibs.jdbc.resultset.GetLongTag
empty
Gets the value, as a Long, of a coulmn in the
enclosing resultset. The column number is set via the "position"
attribute. You can optionally set the Long to a serlvet attribute
instead of the tag body with the "to" attribute. The scope of the
servlet attribute is specified by the "scope" XML attribute
(default = page).
position
true
false
to
false
false
scope
false
false
getObject
org.apache.taglibs.jdbc.resultset.GetObjectTag
empty
Gets the value, as a Object, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the Object to a serlvet attribute instead
of the tag body with the "to" attribute. The scope of the servlet
attribute is specified by the "scope" XML attribute (default = page).
You may also optionally specify the name of a java.util.Map page
attribute, in order to pass in a mapping of custom SQL types.
position
true
false
to
false
false
scope
false
false
map
false
false
getRef
org.apache.taglibs.jdbc.resultset.GetRefTag
empty
Gets the value, as a java.sql.Ref, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the Ref to a serlvet attribute with the "to"
attribute. The scope of the servlet attribute is specified by the
"scope" XML attribute (default = page).
position
true
false
to
true
false
scope
false
false
getShort
org.apache.taglibs.jdbc.resultset.GetShortTag
empty
Gets the value, as a Short, of a coulmn in the
enclosing resultset. The column number is set via the "position"
attribute. You can optionally set the Short to a serlvet attribute
instead of the tag body with the "to" attribute. The scope of the
servlet attribute is specified by the "scope" XML attribute
(default = page).
position
true
false
to
false
false
scope
false
false
getString
org.apache.taglibs.jdbc.resultset.GetStringTag
empty
Gets the value, as a String, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You can optionally set the String to a serlvet attribute instead
of the tag body with the "to" attribute. The scope of the servlet
attribute is specified by the "scope" XML attribute (default = page).
position
true
false
to
false
false
scope
false
false
getTimestamp
org.apache.taglibs.jdbc.resultset.GetTimestampTag
empty
Gets the value, as a java.sql.Timestamp, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the Timestamp to a serlvet attribute instead
of the tag body with the "to" attribute. The scope of the servlet
attribute is specified by the "scope" XML attribute (default = page).
You may also optionally specify the name of a java.util.Calendar page
attribute.
position
true
false
to
false
false
scope
false
false
calendar
false
false
getTime
org.apache.taglibs.jdbc.resultset.GetTimeTag
empty
Gets the value, as a java.sql.Time, of a coulmn in the enclosing
resultset. The column number is set via the "position" attribute.
You must set the Time to a serlvet attribute instead
of the tag body with the "to" attribute. The scope of the servlet
attribute is specified by the "scope" XML attribute (default = page).
You may also optionally specify the name of a java.util.Calendar page
attribute.
position
true
false
to
false
false
scope
false
false
calendar
false
false