Which library can be used to interact with database in JSP?

JSPJava 8Object Oriented ProgrammingProgramming

The JSTL SQL tag library provides tags for interacting with relational databases (RDBMSs) such as Oracle, MySQL, or Microsoft SQL Server.

Following is the syntax to include JSTL SQL library in your JSP −

<%@ taglib prefix = "sql" uri = "http://java.sun.com/jsp/jstl/sql" %>

Following table lists out the SQL JSTL Tags −

S.No.Tag & Description
1<sql:setDataSource>Creates a simple DataSource suitable only for prototyping
2<sql:query>Executes the SQL query defined in its body or through the sql attribute.
3<sql:update>Executes the SQL update defined in its body or through the sql attribute.
4<sql:param>Sets a parameter in an SQL statement to the specified value.
5<sql:dateParam>Sets a parameter in an SQL statement to the specified java.util.Date value.
6<sql:transaction >Provides nested database action elements with a shared Connection, set up to execute all statements as one transaction.
raja
Published on 25-Mar-2019 05:44:23
Advertisements