Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

println in grails gsp file

Tags:

grails

gsp

I know this is simple thing, but i was not aware.

I used println in gsp file and expected to print output in console. But this is showing on page.

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

thanks.

like image 325
Srinath Avatar asked Apr 27 '10 07:04

Srinath


1 Answers

You can use

<%
   System.out.println i 
%>

But why use sniplets in a GSP page?

If you want console debug output from your GSP i suggest using this plugin: https://grails.org/plugin/debug

like image 57
sbglasius Avatar answered Oct 18 '22 13:10

sbglasius