This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
My current functionality is to send the form values as request parameteres to server where it will be first validated using xml and then Action will process the request to save the values in the database.
Now i want to add the 'download to excel' functionality.User can key in the values in form and can click on this download button to get the data in excel sheet.Issue here is that i have to do same validation and saving in this case also.
So i thought of using ajax to send the request as usual to the server and if i recieve the error show it on the jsp else on successfully saving the form values.open a window popup to download the excel sheet.
Is my approach correct.IF so please provide me some details or pointer so that i can implement this.In case if there is better appraoch then this,i will love to hear from you.