JSP Hello World !



User Rating:  / 7
PoorBest 
Details
Category: jsp
Created on Tuesday, 31 January 2012 15:11
Last Updated on Wednesday, 04 April 2012 09:25
Published on Tuesday, 31 January 2012 15:11
Written by Administrator
Hits: 6373

Write "Hello World" with JSP

View source
<HEAD>
<TITLE>hello jsp</TITLE>
<!-- the variable, message, is declared and initialized -->
<%!
String message = "Hello, World, from JSP";
%>
</HEAD>
 
<BODY>
 
<!-- the value of the variable, message, is inserted between h2 tags -->
<h2><font color="#AA0000"><%= message%></font></h2>
 
<h3><font color="#AA0000">
<!-- the java.util.Date method is executed and the result inserted between h3 tags -->
<%= new java.util.Date() %> 
</font></h3>
 
</BODY>
 
</HTML>