开发者

How to use the 'render' method in Grails to render simple txt from an imported java class

开发者 https://www.devze.com 2023-03-27 08:56 出处:网络
I have a java class that prints thousands of lines on the System.out.I am calling a method in that class from a grails controller, passing to it necessary argument and a PrintStream ( System.out of gr

I have a java class that prints thousands of lines on the System.out. I am calling a method in that class from a grails controller, passing to it necessary argument and a PrintStream ( System.out of grails). Doing that, I successfully print whatever the java class prints to the grails output. However, I want to print that output on the website that I am running using render instead of print开发者_高级运维ln. How to I do that?


try using response.outputStream


Or you could just use

render "some text" 
0

精彩评论

暂无评论...
验证码 换一张
取 消