Difference between system. out. println () in java and out. println () in JSP, system. out. println
Out. println () is output to the client. In out. println (), out is a response instance, which outputs a stream with response as the object, that is, the content is outputClient.If System. out. println () is used on the JSP page, only one space is output on the client.System. out. println () is printed on the console. System. out. println () uses the standard output stream, which is output on the console, whereas JSP is not a console program. Whether in JSP or JAVA programs, System. out. println () is printed on the console. If you want to print the content on the page, the simple method is: out. print ("the content to be printed ");In fact, in regular website construction, labels are directly used instead of out. println. Example: Server Platform: tomcat. Client: firefox browser. Source program: // test. jsp file <% @ page contentType = "text/html; charset = gb2312" %> <% @ Page import = "java. util. date "%> <% out. println ("This is printed by out. println. "); System. out. println ("This is printed by System. out. println. "); System. out. println ("This is printed by System. out. println. "); System. out. println ("This is printed by System. out. println. "); out. println ("This is printed by out. println. "); %> </body>
Why does Systemoutprintln () not work in jsp but outprintln ()
You can use System. out. println () in <% ...... %> ~~~
Are you confused ???
In <%... %>, It is a java fragment,
In jsp
The difference between System. out. println () and out. println () is:
The former is printed on the console, while the latter is output to the client, that is, the page.
In java, systemoutprint and systemoutprintln are different.
System. out. println = system. out. print + system. out. print ("\ n ")
Adds a line feed.