Solution:
The files used to run the application are:
1. Include.jsp
2. form.html
3. Welcome.jsp
//Include.jsp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Include Example</title>
<link rel=STYLESHEET
href="My-Style-Sheet.css" type="text/css">
</head>
<body bgcolor="#FDF5E6" text="#000000" link="#0000EE"
vlink="#551A8B" alink="#FF0000"><P>
<jsp:include page="form.htm" flush="true"/>
</body>
</html>
//form.html
<html>
<head>
<style>
body, input { font-family:Tahoma; font-size:10pt; }
</style>
</head>
<body>
<!-- HTML Form -->
<form action="Welcome.jsp" method="post">
            Enter your Account Id:
<input type="text" name="Acc_Id" />        
               
Enter your Pin number:
<input type="text" name="Pin_num"/> <br><br><br><br>
<Center><input type="submit" value="Submit"/><Center>
</form>
</body>
</html>
//Welcome.jsp
<%@ page language = "java" import="java.util.*" %>
<html>
<head>
<title>Welcome to our Website</title>
</head>
<body>
<center>
out.println("Welcome to Online Banking");
</center>
</body>
</html>
The output of the program is as shown in Figure 10.1.
When the user enters the details and clicks on Submit button, the output appears as shown in Figure 10.2.
0 nhận xét:
Post a Comment