OUT.PRINTLN () Differences in System.out.println () and JSPs in Java

Source: Internet
Author: User

out.println () output to the client. In Out.println (), out is an instance of response, which flows output as an object response, and outputs the content toclient. If you use SYSTEM.OUT.PRINTLN () in a JSP page, only one space is printed on the client.System.out.println () is printed in the console. SYSTEM.OUT.PRINTLN () uses the standard output stream, which is output on the console, and the JSP is not a console program. System.out.println () is printed on the console, either in the JSP or in the Java program. If you want to print on the page, the simple point is: Out.print ("What to print");In fact, in the formal construction of the website, is never out.println (), are directly using the label. 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 was printed by out.println."); System.out.println ("This was printed by System.out.println."); System.out.println ("This was printed by System.out.println."); System.out.println ("This was printed by System.out.println."); O Ut.println ("This was printed by out.println."); %> </body>

OUT.PRINTLN () Differences in System.out.println () and JSPs in Java

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.