Cześć.
Na wstępie jestem zielony w Jave EE i dopiero się uczę ale czas mnie goni i dlatego postawiłem utworzyć ten temat. Szukałem już rozwiązania tego problemu ale bez skutecznie.
A Problem jest następujący mam tabelkę zbudowana w JSP .
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Zalogowano sie :
<%
String Login = request.getAttribute("NameUser").toString();
out.print(Login);
%>
</h1>
<sql:setDataSource
var="myDS"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://db4free.net:3306/nameBase2020"
user="user1111" password="T5rvm"
/>
<sql:query var="listUsers" dataSource="${myDS}">
SELECT `Id`,`Login`,`Password`,`FirstName` FROM `Users`;
</sql:query>
<div align="center">
<table border="1" cellpadding="5">
<caption><h2>List of users</h2></caption>
<tr>
<th>ID</th>
<th>Login</th>
<th>Password</th>
<th>First Name</th>
</tr>
<c:forEach var="Users" items="${listUsers.rows}">
<tr>
<td><c:out value="${Users.Id}" /></td>
<td><c:out value="${Users.Login}" /></td>
<td><c:out value="${Users.Password}" /></td>
<td><c:out value="${Users.FirstName}" /></td>
</tr>
</c:forEach>
</table>
</div>
</body>
</html>
I jak dodać do tego kod możliwość obsługi event , czyli jak dodać możliwość kliknięcia w pozycje w tabeli i obsługę tego kliknięcia.
Za wszelka pomoc dziękuje ,zdaje tego sprawę ze problem jest blachy ale czas mię goni a w internecie nie znalazłem pomocnego materiału