Suppose I have two jsp pages.The first jsp page contains a text box to enter name and age.On clicking the next button of 1st jsp page we move to the second jsp page
where we have textboxes to enter address informations like city,state,pin.Now on click of the submit button of 2nd jsp page i would like the data provided by user to get copied in a xml file.I will be already having a template xml file on the server.Now for each user based on this template a separate xml file should be created.How do i achieve the same using SAX Parser?
The template xml file(Scenario.xml), with default values, that will be on server will look something like this:-
Whenever a user enters his details,then based on the above template file and with the use of Sax Parser the data should be updated in a new xml file unique to that particular user .The name of the new xml file created can be kept unique by appending the sessionid to the xml file.The template xml file should remain as it is.
It seems that you have already passed info from page1 to page2. When page2 is submitted, the request goes once again to your servlet. Write some helper class to deal with creation of xml file, and invoke this class from the servlet.
subject: Updating data from jsp pages into an xml file