Monday, 3 December 2012

Simple JSP to display Maths Functions


Simple JSP Page 2 :

  1. <html>
  2. <head>
  3. <title> Simple JSP page </title>
  4. </head>
  5. <body>
  6. <h3>Using Expression tag to display the result of the expression </h3>
  7. <p>
  8. <ul>
  9. <li>2*6 = <%=2*6%></li>
  10. <li>sqrt(8)=<%=Math.sqrt(8) %></li>
  11. <li>The Current Date and time = <%=new java.util.Date() %></li>
  12. </ul>
  13. </body>
  14. </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