Advertisement
<%@ include file = " relative URL of the file " %>
<html>
<head>
<title>Display Date</title>
</head>
<body>
<%@page import="java.util.*" %>
Current Date and Time : <%= new Date() %>
</body>
</html>
<html>
<head>
<title>Display Date</title>
</head>
<body>
Including the content of another page using include directive :
<%@ include file="Date.jsp" %>
</body>
</html>
Advertisement
<html>
<head>
<title>Login Form</title>
</head>
<body>
<form action="login.jsp" method="post">
<b>Username</b>
<input type="text" name="username">
<b>Password</b>
<input type="password" name="password">
<button type="submit">Login</button>
</form>
</body>
</html>
<html>
<head>
<title>Using include directive</title>
</head>
<body>
Including the content of another page using include directive :
<%@ include file="login1.jsp" %>
</body>
</html>
Advertisement
Advertisement
Please check our latest addition
C#, PYTHON and DJANGO
Advertisement