Integrating Custom Database Actions
The JSTL database access actions look for the default values set by the configuration settings described in Tables Table 23-5 and Table 23-6.
|
Variable name: |
javax.servlet.jsp.jstl.sql.dataSource |
|
Java constant: |
Config.SQL_DATA_SOURCE |
|
Java type: |
|
|
Set by: |
|
|
Used by: |
|
|
Variable name: |
javax.servlet.jsp.jstl.sql.maxRows |
|
Java constant: |
Config.SQL_MAX_ROWS |
|
Java type: |
|
|
Set by: |
Context parameter or custom code |
|
Used by: |
<sql:query> |
The data-source setting can be set as a String in
this format, in which optional parts are shown between brackets:
url [, [driver] [, [user] [, [password]]]
Commas separate the parts, so if the value for any part contains a
comma, it must be escaped with a backslash. This type of value
creates a simple DataSource without any pooling
capabilities, and is intended only for prototype and low-end
applications, as described in Chapter 12. It can
also be set to a JNDI path for a DataSource made
available by the container or to a DataSource
created by custom code, such as a servlet or listener. These options
are described in detail in Chapter 24.
The maximum rows setting can be set as a String
value for a context parameter or as an Integer by custom code. It can be used to prevent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access