hi ! i ve just started doing mysql.
i am making a web application in which employees database is reqiured to be shown in the table.
i ve made a database name "educrm" and table name is "info", which i ve done in mysql through xampp(phpMyAdmin).
i am showing u the page in which code is written.
but it is showing me lots of error like full of page...
plz help me regarding this.
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" import=”java.io.*” errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@page contentType=”text/html” pageEncoding=”UTF-8″%>
<%@ page import="java.io.*,java.util.*,java.sql.*"%>
<%@ page import="javax.servlet.http.*,javax.servlet.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>dtabase</title>
</head>
<body>
<%
<sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/educrm"
user="root" password=""/>
<sql:query dataSource="${snapshot}" var="result">
SELECT * from info;
</sql:query>
<table border="1" width="100%">
<tr>
<th>name</th>
<th>Mobile no</th>
<th>Email Add</th>
<th>lead source</th>
<th>preferred college</th>
<th>Qualification</th>
<th>Lead status</th>
<th>street</th>
</tr>
<c:forEach var="row" items="${result.rows}">
<tr>
<td><c:out value="${row.name}"/></td>
<td><c:out value="${row.mobile no}"/></td>
<td><c:out value="${row.Email Add}"/></td>
<td><c:out value="${row.lead source}"/></td>
<td><c:out value="${row.preferred college}"/></td>
<td><c:out value="${row.Qualification}"/></td>
<td><c:out value="${row.Lead status}"/></td>
<td><c:out value="${row.street}"/></td>
</tr>
</c:forEach>
</table>
</body>
</html>