8.write A JSP Program To Demonstrate The Declaration, Scriplets and Expressions. 8.jsp
8.write A JSP Program To Demonstrate The Declaration, Scriplets and Expressions. 8.jsp
8.write A JSP Program To Demonstrate The Declaration, Scriplets and Expressions. 8.jsp
Output:
Second.jsp:
<!DOCTYPE html>
<html>
<head>
<title>Second JSP</title>
</head>
<body>
<h1>Received Parameter</h1>
<p>Parameter value: <%= request.getParameter("param") %></p>
</body>
</html>
Output:
Login.html:
<!DOCTYPE html>
<html>
<head>
<title>Login Form</title>
</head>
<body>
<h2>Login Form</h2>
<form action="login.jsp" method="post">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password"
required><br><br>
Login.jsp:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>Login Status</title>
</head>
<body>
<h2>Login Status</h2>
<%-- Define authorized username and password --%>
<%
String authorizedUsername = "admin";
String authorizedPassword = "password";
Only admin , password ivandi inka emi ichina fail avtadhi code lo by
default declare chesam username, password