What I understand is, you are having a table with list of trains out of which you are selecting one through radio button.
If I am not wrong, then try the following code :
Create two hidden variable inside your form :
Put this structure in your table :
Now in javascript put the following code :
And now on next jsp, try to get parameter 'radioValue'.
The code is as per my needs (it is passing values
servlet & futher).... So modify it to work done
Hope it may work for you ! Best Luck
Thanks