Ha, interesting
1. You get 0 since your ID is of type int. May be you are not setting the value of Id. Where are you setting the value for this?
2. I guess "./view.action?id=$emp.id" would be taken as a single entity and does not evaluate the value of $emp.id. I didnt work in
struts 2 and hence do not know exact conventions/syntax maybe try single quotes like "...?id='$emp.is'" - again this might work or may not, not sure.
3. ------------not at all important, but your code is very much vulnerable to SQL injection