I have a String field in the DB (mySQL) and on click of a button on a JSP page I want to download the contents of that field to a file on the client machine.
The client can give a name or a default name I should be able to give.
My server is tomcat.
I have a String field in the DB (mySQL) and on click of a button on a JSP page I want to download the contents of that field to a file on the client machine.
The client can give a name or a default name I should be able to give.
My server is tomcat.
Basically :
I would just link the JSP to a servlet that sets a content disposition header then just prints out the value of the DB field
response.setHeader("Content-disposition","attachment; filename=something.txt" );