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. is the flow output of response as an object, and the content is output toclient. Assuming that System.out.println () is used in a JSP page, the client simply outputs a single space.System.out.println () is printed on the console.

System.out.println () uses the standard output stream, which is output on the console. And 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 a page, the simple point is: Out.print ("What to print"); In fact, in the formal construction of the site, 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."); Results from%> </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.