Grails : Generate text file for GSP -


i working grails 2.3.6 application.

i tried many different things generate pdf, of them failed.

is possible generate text file of contents of gsp file? have button called export , when user clicks on that, text file download there system.

will possible passing url of gsp file?

this quite straightforward. need specify response type (text/plain) in render method controller. can have plain text in gsp file , use tags needed.

def textfile = {     response.setheader('content-disposition', 'attachment;filename="textfile.txt"')      render view: 'textfile', contenttype: 'text/plain' } 

textfile.gsp:

dear ${name}, text file.

as pdf, recommend amazingly grails rendering plugin.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -