Reputation: 317
I have a table setup like
ID Name Gender
1 John M
2 Jane F
Where the IDs are hyperlinks taking me to a servlet. I want to know was the number of the link the user clicked to get to the servlet, any idea how to achieve that? I tried putting a name inside the tag and then using request.getParameter("name") that but it always returns a null. The table is on a .jsp file.
Upvotes: 0
Views: 39
Reputation: 75356
getParameter("x")
works if the hyperlink clicked had a parameter called x
, like
<a href="..../target.html?x=3">
for row three.
Upvotes: 1