Struts 2 XML Download
In this demo you will see how to create XML report on server side and send XML response back to the client so that he could view/download report in his local system. To keep this demo easy to understand I have created XML using core java API but it is up to you to use any third party or other java API to create XML file write content in response.
Please see previous tutorial to create report in below format:
- Create maven project Struts2XMLDownload in eclipse or you could download from bottom and import in eclipse. Below if final project structure:
- Download and run this project on any server below will be output:
- Fork out your own copy from GitHub
Download Project: Struts2XMLDownload