javaweb.jspp
Posted 哈哈呵
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javaweb.jspp相关的知识,希望对你有一定的参考价值。
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP ‘login.jsp‘ starting page</title>
</head>
<body>
<%String Name=request.getParameter("RdName"); %>
欢迎,<%=Name %>成功登录!
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP ‘Second.jsp‘ starting page</title>
</head>
<body>
<%String Name=request.getParameter("RdName");
String Passwd=request.getParameter("RdPasswd");
if(Name.equals("abcdef")&&Passwd.equals("123456")) %>
<jsp:forward page="login.jsp"/>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP ‘MyJsp.jsp‘ starting page</title>
</head>
<body>
<form action="Second.jsp" method="post">
姓名:<input type="text" name="RdName"><br>
密码:<input type="password" name="RdPasswd"><br><br>
<input type="submit" value="确定">
</form>
</body>
</html>
以上是关于javaweb.jspp的主要内容,如果未能解决你的问题,请参考以下文章