Hi all, can anyone please give me a example where i can save the form data in a jsp into an java object on the click of save button
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hi all, can anyone please give me a example where i can save the form data in a jsp into an java object on the click of save button
Its a complete guess without any sort of context...save where? From an HTML form? Have you written a pojo to store all the form data?
I have JSP page where on click of the submit button the data has to be saved in a java object.The JSP page has some of the list variables as well as string variables
Thanks
I have the same problem.
I have a servlet which shows a table full of data and text fields.
I save that current data into a java bean and load another servlet.
I then try and access the data saved into the java bean but it wont access this because when the first servlet closes down the data is lost.
i want to do this so the user can change the data in the text box and i can do i comparison between what was and what is on the data.
Thanks for you help.
Kurt
the JSP form, does that just create the form? if yeah, you might as well change it to html and name the elements so you can use the getParameter method from the button click.I have JSP page where on click of the submit button the data has to be saved in a java object.The JSP page has some of the list variables as well as string variables
Need more information...
Kurt
The answer depends upon how long you wish the data to persist. For session data, just store this as a pojo as a session variable. For longer term, use an EntityBean, persist the data in a database, or serialize the pojo (this all depends upon how you want to save the data and your application data model). To save the data after a button press, you must send the data back to the server either through AJAX or by submitting the form via the webpage.