On a JSP Page I have populated a table with some id's. I have made these ID's as hyperlink. Now i want that if I click on any id it should go to a servlet and that particular id should also be passed to the servlet.
A:
Use this code in your JSP:
<a href="<%=request.getContextPath() %>/servlet-url?id=<%=id %>">...</a>
to create a link which invokes the servlet at /servlet-url
and passes the ID in the request parameter id
.
Aaron Digulla
2010-09-24 13:31:41