I am new to jsp and I am having this weird problem of running this emp.jsp
file. I know it's very basic but I am stuck for two days now :P.
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>JSP Page</title>
</head>
<body>
<sql:setDataSource var="connection" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/tutorials" user="root" password="" />
<sql:query var="result" dataSource="${connection }">
select * from registration
</sql:query>
<table border="0" width="75%">
<tr>
<th>id</th>
<th>name</th>
<th>password</th>
<th>usertype</th>
</tr>
<c:forEach var="col" items="${result.rows }">
<tr>
<td><c:out value="${col.id}"></c:out></td>
<td><c:out value="${col.name}"></c:out></td>
<td><c:out value="${col.password}"></c:out></td>
<td><c:out value="${col.usertype}"></c:out></td>
</tr>
</c:forEach>
</table>
</body>
</html>
and error is this
javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/sql/SQLExecutionTag
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:349)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
this is my web.xml file as asked by @rajani
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>Tutorials</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>