Of course, you can't just send template text, but here are a number of approaches you can take.
Put the table in a form and make each td value a read-only text field that is initially disabled. When you want to send a row, enable the fields in that row and submit the form.
Or
Create an invisible form with hidden inputs for each value you want to send. When the row is clicked, copy the td values into the hidden element, and submit the form.
Or
Use Ajax.
All of this requires the use of client-side JavaScript.
And, of course,
you should be submitting the form to a
servlet for processing, not directly to a JSP.