Monday, 3 December 2012

Simple JSP to display Maths Functions


Simple JSP Page 2 :

<html>
<head>
<title> Simple JSP page </title>
</head>
<body>
<h3>Using Expression tag to display the result of the expression </h3>
<p>
<ul>
<li>2*6 = <%=2*6%></li>
<li>sqrt(8)=<%=Math.sqrt(8) %></li>
<li>The Current Date and time = <%=new java.util.Date() %></li>
</ul>
</body>
</html>

****************************Output***************************************

Using Expression tag to display the result of the expression

  • 2*6 = 12
  • sqrt(8)=2.8284271247461903
  • The Current Date and time = Mon Dec 03 15:32:33 CST 2012 
**************************************************************************

No comments:

Post a Comment