
I have the following code of a JSP page...........
<blockquote>
<p><%@taglib prefix="c"
uri="http://java.sun.com/jsp/jstl/core"%> <%@taglib prefix="sql"
uri="http://java.sun.com/jsp/jstl/sql"
%> <sql:setDataSource
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/employee"
user="root" password="shubham"/>
<sql:query var="rs" sql="select* from
login"> </sql:query> <html>
<head>
<title>JSP Page</title>
</head>
<body>
<table border="1">
<tr><td>Username </td><td>Password</td><td>Role</td><td>Edit</td><td>Delete</td></tr>
<c:forEach var="data" items="${rs.rows}">
<tr><td>${data.username}</td><td>${data.pass}</td><td>${data.role}</td><td><a
href="edit.jsp">Edit</a></td><td><a
href="delete.jsp">Delete</a></td></tr>
</c:forEach>
</table>
</body> </html></p>
</blockquote>
Now, I want that on clicking on Delete it should delete the particular record from the database and reflect the change on the page..............also if the user clicks on edit then he can change the password and role but not the username.........
please provide the code for this purpose........i.e edit.jsp and delete.jsp in JSTL only........
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.