JSTL SQL sql:setDataSource Tag

java-ee-thumbnail

The <sql:setDataSource> tag is used to create data source variable directly from JSP and it can be stored in a scoped variable with the help of scoped attribute. It can be used as input to other database actions. Attributes of <sql:setDataSource> Tag datasource: It specify data source name or java.sql.DataSource object. driver: It specifies JDBC […]

JSTL XML x:parse Tag

java-ee-thumbnail

The <x: parse> tag is used to parse the xml content and the result will be stored in specified variable. Syntax Of <x: parse> Tag Attributes Of <x: parse> Tag Attributes Description doc Specifies that source XML document to be parsed. systemId Specifies the system identifier in xml document for parsing. filter Filter object is […]

JSTL XML x:set Tag

java-ee-thumbnail

The <x: set> tag is used to store the result of xml path expression in scoped variable. Syntax of <x: set> Tag Attributes of <x: set> Tag Example Details of the Code <c:set var=”fruit”> tag is used to set the variable name which we want to display in the output. <x:parse xml=”${fruit}” var=”output”/> tag is […]

JSTL XML x:if Tag

java-ee-thumbnail

The <x: if> tag evaluates an XPath expression. If the result is true then the body of the tag is evaluated, otherwise not. It is used to check the conditional value. Syntax of <x: if> Tag Attributes of <x: if> Tag Attributes Description select To evaluate the particular object it specifies xml Xpath expression. var […]

JSTL XML x:forEach Tag

java-ee-thumbnail

The <x: forEach> tag is used for looping a list of elements in an xml document. Syntax of <x: forEach> Tag Attributes of <x: forEach> Tag Example Details of the Code <c:set var=”fruitss”> tag is used to set the variable name which we want to display in the output. <x:parse xml=”${fruitss}” var=”output”/> tag is used […]

JSTL SQL sql:transaction Tag

java-ee-thumbnail

Transaction means handling set of tasks into single execution unit. It provides connection to all data base operations and executes all statements in one transaction. This tag combines both and tags into transactions. We can add and statements into to make single transaction. Attributes of <sql:transaction> Tag dataSource: It specifies datasource for the connection. isolation:It […]

JSTL SQL sql:dateParam Tag

java-ee-thumbnail

The <sql: dateParam> tag is used to add parameter to sql statement to the given java.util.Date value. This tag uses action of both <sql: query> and <sql: update> to provide data and time value for value placeholder. Attributes of <sql: dateParam> Tag value: It is used to add value of the parameter for DATE or […]

JSTL SQL sql:param Tag

java-ee-thumbnail

<sql: param> tag is used to set parameter values for SQL statement. This tag uses action of both <sql: query> and <sql: update> to provide value for value placeholder. Attribute of <sql: param> tag value: It is used to specify value to the parameter. Example of <sql: param> tag Details of the Code <sql: setDataSource […]

JSTL SQL sql:update Tag

java-ee-thumbnail

The <sql: update> tag executes SQL statement specified in the sql attribute or in the tag body, for example SQL INSERT, UPDATE or DELETE statements. Attributes of <sql: setupdate>Tag sql: It specifies SQL command that has to be executed. var: It is used to specify variable name used to store result of query. scope: It […]

JSTL SQL sql:query Tag

java-ee-thumbnail

The <sql:query> tag is used to execute a query specified in sql attribute or in the body. It executes SQL statement and saves in the scoped variable. It executes sql query and stores result in specified variable. Attributes of <sql: query>Tag sql: It specifies SQL command that has to be executed. var: It is used […]