How to print out text strings on HTML directly ? | |||
| |||
In JSP, you can print out text strings by out.println(). Here's the example.
But above example can be expressed as below. <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 <%= date%> </BODY> </HTML>
Both ways shows the same result, but the second is much faster and have good readability than the first. code, Tags: Display dead code declaration include file | |||
| |||
| |||
Login for comment |
SIMILAR POSTS Put Date Time on HTML |
OTHER POSTS IN THE SAME CATEGORY How to resize image ? |