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.
You could use Java (not only JSP) to backup the contents of your database, by extracting all data from all tables.
You can use DatabaseMetaData to retrieve all table names, then use "SELECT *" for all those tables. The returned ResultSet for each table has a method to retrieve the ResultSetMetaData that contains information on the column names and types. Iterate over the ResultSet, nested iterate over the columns (hint: use ResultSetMetaData.getColumnCount(), start at 1!), calling the appropriate getXXX() methods. You can use getString() to be safe. Just keep one thing in mind: how will you handle NULL? As an empty string, or what?
All in all, I'd forget what I just said and look at the backup opportunities of your database system instead. They are almost always the best way.