If you like to try this in Javascript as Sotirios Delimanolis mentioned, try this
document.getElementById('form_id').action = '/user/{id}'
ie:
Do this on button submit or window.onload or on, any other event handling,
var id = document.getElementById('inputfieldid').value;
document.getElementById('form_id').action = '/user/'+id;
here is another example in SO using struts: Change action attribute of Form for different action methods in Struts2
Note: In your case, you want the id from HTML input field, hence we have to go for javascript