Forth Lesson on JSP
Now we are going to make "Calculation in Java". We have to create JSP page like ::
Code :
<%--
Document : index
Created on : Nov 1st, 2012, 9:11:23 PM
Author : Nested Code
--%>
<head><title>First Calculation</title></head>
<body>
<h1>Calculation in Java</h1>
We'll do some sums ...<br>
<% int number = 17 ; %>
Here is a <%= number %> times table ... <br>
<table border=1>
<% for (int k=1; k<=6; k++) {
int result = k * number; %>
<tr><td><%= k %></td><td><%= result %></td></tr>
<% } %>
</table><hr>
<br><br>
Page written by Nested Code<br>
<blink><a href="http://nestedcode.blogspot.in" >Visit Our Site</a></blink><br
</body>
Document : index
Created on : Nov 1st, 2012, 9:11:23 PM
Author : Nested Code
--%>
<head><title>First Calculation</title></head>
<body>
<h1>Calculation in Java</h1>
We'll do some sums ...<br>
<% int number = 17 ; %>
Here is a <%= number %> times table ... <br>
<table border=1>
<% for (int k=1; k<=6; k++) {
int result = k * number; %>
<tr><td><%= k %></td><td><%= result %></td></tr>
<% } %>
</table><hr>
<br><br>
Page written by Nested Code<br>
<blink><a href="http://nestedcode.blogspot.in" >Visit Our Site</a></blink><br
</body>
No comments:
Post a Comment