Site icon DataFlair

Page Directives in JSP

program 1

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>
    </body>
</html>

Program 2

<%@include file="header.jsp"%>
<%@page  %>
<html>
<head><title>Student Page</title></head>
<body>
<center>
<h2><font color=green>Student Registration Section</font></h2>
<form method=post>
<table border=1>
<tr>
<th>User Name:</th>
<td><input type=text name=txtuser></td>
</tr>
<tr>
<th>Password:</th>
<td><input type=password name=txtpass></td>
</tr>
<tr>
<th>Phone No:</th>
<td><input type=text name=txtphone></td>
</tr>
<tr>
<th>Email:</th>
<td><input type=text name=txtemail></td>
</tr>
<tr><td></td>
<td>
<input type=submit value=submit>
<input type=reset value=reset>
</td>
</tr>
</table>
</form>
<%@include file="footer.jsp"%>
</center>
</body>

Program 3

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>

        <title>JSP Page</title>
    </head>
    <body>
       <center> 
             <A href="Insert.jsp">Insert Student </A> <A href=Delete.jsp>Delete Student</A> <A href="Search.jsp">Search Student</A> <A href>Update Student</A> <A href>About Us</A> <A href>Contact Us</A> 
        </center> 
       </body>
</html>

Program 4

<%@include file="header.jsp"%>
<html>
<head><title>Student Page</title></head>
<body>
<center>
<h2><font color=green>Student Delete Section</font></h2>
<form method=post>
<table border=1>
<tr>
<th>Enter User Name for Delete:</th>
<td><input type=text name=txtuser></td>
</tr>
<tr>
<tr><td></td>
<td>
<input type=submit value=submit>
<input type=reset value=reset>
</td>
</tr>
</table>
</form>
<%@include file="footer.jsp"%>
</center>
</body>

Program 5

<%@include file="header.jsp"%>
<html>
<head><title>Student Page</title></head>
<body>
<center>
<h2><font color=red>Student Search Section</font></h2>
<form method=post>
<table border=1>
<tr>
<th>Enter User Name for Search:</th>
<td><input type=text name=txtuser></td>
</tr>
<tr>
<tr><td></td>
<td>
<input type=submit value=submit>
<input type=reset value=reset>
</td>
</tr>
</table>
</form>
<%@include file="footer.jsp"%>
</center>
</body>

Program 6

<%@include file="user.html" %>
<%@include file="Search.jsp" %>
<%@include file="Delete.jsp" %>

Program 7

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>

        <title>JSP Page</title>
    </head>
    <body>
       <center> 
             <A href="Insert.jsp">About US </A> <A href=Delete.jsp>Contact Us</A> <A href="Search.jsp">About City</A> <A href>Facilities</A> <A href>Contact Us</A> <A href>Contact Us</A> 
        </center> 
       </body>
</html>
Exit mobile version