How to Use Jstl(JSP Standard Tag Library) Sql tag


Using   Tag Library To Retrieve Data From The Data Base   

  Before Implementing Import Jstl.jar                            


<%@ page import=”*,java.util.*,java.sql.*”%>
<%@ page import=”javax.servlet.http.*,javax.servlet.*” %>
<%@ taglib uri=”; prefix=”c”%>
<%@ taglib uri=”; prefix=”sql”%>
<title>Retrieving Using Sql Tag </title>
<sql:setDataSource  driver=”com.mysql.jdbc.Driver” url=”jdbc:mysql://localhost:3306/LOGIN” user=”root”  password=”root”   />

<sql:query var=”result”  >
   SELECT * from register;
<table border=”1″ width=”100%”>
<c:forEach var=”row” items=”${result.rows}”  >
   <td><c:out value=”${row.userid}”/></td>
   <td><c:out value=”${row.username}”/></td>
   <td><c:out value=”${row.phoneno}”/></td>
   <td><c:out value=”${}”/></td>




Thanks & Regards


(software Developer )



This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s