I am trying to create an application using struts2 and using hibernate for database connections. I have used JSP for front end. In one of my page i have several items and a button next to every item created using anchor tag in html. I want that when user clicks any of the button corresponding to its item that item should be inserted in a List in java so that i can add it to my db using hibernate in my action class.Also, as the user selects items, the selected one should be displayed in a box at the bottom of JSP.
Does anyone has any idea how to do it in the best possible way?