1

I have the following table which I'm displaying on my jsp file:

<%@taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "core" %>
    
    <table class="table table-striped">
        <thead>
        <tr>
        <th scope="col">ID</th>
        <th scope="col">UserName</th>
        <th scope="col">Name</th>
        <th scope="col">Phone No</th>
        <th scope="col">Email ID</th>
        <th scope="col">Last login date/time</th>
        </tr>
        </thead>
        <core:forEach items="${userList}" var="u">
        <tr>
            <td scope="row">${u.user_id}</td>
            <td scope="row">${u.username}</td>
            <td scope="row">${u.name}</td>
            <td scope="row">${u.contactNo}</td>
            <td scope="row">${u.email}</td>
            <td scope="row">${u.login_date_and_time}</td>
        </tr>   
        </core:forEach>
    </table>

Now what I want to do is that when I click on ID, it should link to my servlet 'FetchMoreDetails'(this I'll create through a tag), where I'll be fetching data. Actually I'm new to java web dev hence unable to place how I should create the links, and what method in the servlet(doGet or doPost) will it call. Any help is greatly appreciated!

Dhruv Kaushal
  • 201
  • 2
  • 12

0 Answers0