How to jump from first jsp page to another jsp page
In this tutorial we are going to study following:-
☻How to make textfield.
☻How to make textfield.
<input type="text" name="user">☻How to make a password field
<input type="password" name="pass">☻How to make a label.
<label> Username </label> or <label> Username
☻How to make a form.Introducing method "get post"
<form action="Login.jsp" method="get"> </form>☻how to make a submit button.
<input type="submit" name="Submit">
Create a new JSP page
Name to Login
Then finish
Source code for index.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
<form action="Login.jsp" method="get">
<label>Username </label> <input type="text" name="user">
<label>Password</label> <input type="password" name="pass">
<input type="submit" name="Submit">
</form>
</body>
</body>
</html>
Source code for Login.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>My Login Page</h1>
</html>
----------------------------
On click→Submit→








Posted in:
0 Comments:
Post a Comment