This is a very common scenario in a
Struts application. Since you posted this in the Struts forum, I'm assuming you want to do this within the Struts framework. If so, the best way to start is by working through one of the many good tutorials available.
Here is a list of some good ones.