output html

a scriptlet does not generate HTML.  If a scriptlet wants to generate HTML, it can use a variable called "out".

 

<HTML>
<BODY>
<%
    // This scriptlet declares and initializes "date"
    System.out.println( "Evaluating date now" );
    java.util.Date date = new java.util.Date();
%>
Hello!  The time is now
<%
    // This scriptlet generates HTML output
    out.println( String.valueOf( date ));
%>
</BODY>
</HTML>
posted @ 2012-01-24 00:37  greencolor  阅读(192)  评论(0编辑  收藏  举报