You can use javascript to call your function(I suggest you put the table in a form).
<tr>
<td><%=rs.getString(7)%></td>
<% if (rs.getString(3).contains("s")) {%>
<%request.getSession().setAttribute("PassFID", rs.getString(7));%>
<td><input type="button" value='Generate Key' onclick="onclick="somefunction(<%=rs.getString(7)%>);"></input></td>
<%}
else {%>
<td></td>
<%}%>
and then use a JS like below to pass the value to another jsp page. There on you can do whatever you like with this value.
<script type="text/javascript">
function somefunction(id){
var f = document.form;
f.method="post";
f.action='somepage.jsp?id='+id;
f.submit();
}
</script>