1. I have a JSP with fields/textboxes where user can enter a new record to the database. user types in the values and clicks submit on my page[1.jsp] 2. After user clicks submit, I have to show 1.jsp to the users with the same values they entered. I am coming back to the page, but the textbox values are empty.
As an example:
1.jsp, I have FirstName: LastName: Address textboxes
My user enters values in these textboxes and clicks submit.
After the record is insrted succesfully, My textboxes should display the values the users typed.
If it is struts, then it should almost take care of matters all by itself. You should be using your Formbean to display the data in the form.
What scope is your formbean being stored in for this action (check struts-config) Are you forwarding or redirecting to this "display" page. If redirecting, you will either need to retain the values in session scope, or read them back from the database in a "display" action.
If you use the <html:text> tag for your input fields, the values of those fields will be tied to the properties of the same name in the ActionForm bean for the page, and the values will automatically be populated when the page is displayed. You don't have to do anything to make this happen. If there's something you still don't understand about this process, let us know. [ August 29, 2006: Message edited by: Merrill Higginson ]