26
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Scriplet Tag</h1>
|
||||
<%
|
||||
String message = "Hello World";
|
||||
out.println(message);
|
||||
for(int i=1;i<=5;i++){
|
||||
out.println(i);
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
||||
21
Eclipse-Workspace/jprg1_b2_38/src/main/webapp/jp1.jsp
Normal file
21
Eclipse-Workspace/jprg1_b2_38/src/main/webapp/jp1.jsp
Normal file
@@ -0,0 +1,21 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%!
|
||||
int num1 = 1485;
|
||||
int num2 = 2545;
|
||||
int add(int a, int b){
|
||||
return a + b;
|
||||
}
|
||||
%>
|
||||
<h1>Declaration Tag</h1>
|
||||
<p>Sum of <%= num1%> and <%= num2%> is <%= add(num1, num2)%></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
15
Eclipse-Workspace/jprg1_b2_38/src/main/webapp/jp2.jsp
Normal file
15
Eclipse-Workspace/jprg1_b2_38/src/main/webapp/jp2.jsp
Normal file
@@ -0,0 +1,15 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Expression Tag</h1>
|
||||
<p>The result of 4 + 3 is <%= 4 + 3 %></p>
|
||||
<p>The current date and time is: <%= new java.util.Date() %></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
20
Eclipse-Workspace/jprg1_b2_38/src/main/webapp/jp3.jsp
Normal file
20
Eclipse-Workspace/jprg1_b2_38/src/main/webapp/jp3.jsp
Normal file
@@ -0,0 +1,20 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Scriplet Tag</h1>
|
||||
<%
|
||||
String message = "Hello World";
|
||||
out.println(message);
|
||||
|
||||
for(int i=1;i<=5;i++){
|
||||
out.println(i);
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user