-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.jsp
More file actions
54 lines (48 loc) · 1018 Bytes
/
Copy pathtest.jsp
File metadata and controls
54 lines (48 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Jsp</title>
</head>
<body>
<h3>Testing Jsp</h3>
<%!
public int add( int a , int b) {
return a + b;
}
%>
<!-- ----------------------------------------------- -->
<br>
<%
int i = 1;
int j = 2;
int k = i+j;
%>
the value of k is : <%=k %>
<!-- ----------------------------------------------- -->
<br>
<%
int m=add(123 , 321);
%>
the value of sum of 123 + 321 is : <%=m %>
<!-- ----------------------------------------------- -->
<br>
<%
for ( int x= 0; x < 5; x++) {
out.println("<br> value of x is" + x);
}
%>
<!-- ----------------------------------------------- -->
<br>
<%
for ( int y= 0; y < 5; y++) {
%>
<br> New value of y is : <%=y %>
<%
}
%>
<!-- ----------------------------------------------- -->
</body>
</html>