• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to find which data the user clicked

 
Prasanna RamKumar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iam creating a table in jsp page so that all data inside the table will link to a common
servlet
is there any way to find which data the user clicked
please help me
prasanna
 
Cm Ananth
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While creating the table, you need to put an identifier to differentiate rows. and that identifier needs to be passed to the common servlet to idntify which row of the table is selected..
take for example, while construting the URL itself, you can append an identifier at the end, in that way you can reuse that in the common servlet.

let me know if you need any sample code for that.
 
Prasanna RamKumar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please send me the sample code
 
Prasanna RamKumar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my jsp page
<html>
<head><title>JSP Page</title></head>
<body>
<table border="1">
<tr>
<th> index </th>
</tr>
<tr>
<td><a href ="hello" >one</a></td>
</tr>
<tr>
<td><a href ="hello ">two</a></td>
</tr>
<tr>
<td><a href ="hello ">three</a></td>
</tr>
</table>
</body>
</html>


hello is the servelt name
when the user clicks on hyperlinks
i want to know which one he clicks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic