Println in grails gsp file

I know this is simple, but I did not know.

I used println in the gsp file and was expecting to print the output in the console. But this is displayed on the page.

<% for(int i =0; i < threads.size();i++) { println i } %> 

thanks.

+4
source share
1 answer

you can use

 <% System.out.println i %> 

But why use sniplets on a GSP page?

If you want to get console debug output from your GSP, I suggest using this plugin: https://grails.org/plugin/debug

+11
source

Source: https://habr.com/ru/post/1308110/


All Articles