Hi , in my system "System.out.println" is not working . But i see this code .
<% System.out.println( "Evaluating date now" );
java.util.Date date = new java.util.Date();
Will system.out.println work in jsp or only out.println will work
As, Bear pointed out, System.out.println will print in the console, means in the server logs, not in the resulting page, out.println, will print in the resulting page, so if you are sure, its not printing in the console, can you tell, are you getting any exception, or its just not working at all..
Joined: Sep 10, 2009
i supposed to print value of a display page . while using out.println(a); means value of a printed in resulting page.
but system.out.println(a); means nothing displayed in resulting page
Christophe Verré wrote:ItDoesntWorkIsUseless. Next time, try to explain your problems more specifically. After reading your first post, we have no idea that you want to print something in the browser page.
@Rajendra: Christopher *was* talking to you. Your question was answered several times, including in Bear's first response. System.out.println writes to the system console. That is *NOT* the same thing as the JSP page. IN a JSP, out.println *does* write to the JSP page, because "System.out" and "out" are two completely different variables, which you'd see if you printed either of them to the JSP. Or the system console. Using the appropriate variable.