MySql dump using java

To take mysql database backup we have Runtime.getRuntime().exec(executeCmd). executeCmd is command that will take backup of mysql database.
String executeCmd contains the mysqldump to backup database.
filePath variable contains the downloaded sql file.

Excel file download in Struts2 using apache POI

Apache POI is project by Apache Software Foundation. It provides the Java API for Microsoft Documents.

You can find more about apache POI . You can also download apache POI from here.

Here we are explaining how to export data from struts2 action to xml file.
For that we are using apache poi.

We have included following jar files in lib folder

In struts.xml

In jsp