`
性格决定命运-专注成就人生
  • 浏览: 17588 次
社区版块
存档分类
最新评论

logib.jsp

    博客分类:
  • JSP
jsp 
阅读更多

login.html

<!DOCTYPE html>
<html>
<head>
<title>登陆</title>

<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=GBK">

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

</head>

<body>
	<form name=form1 method=post action=Login.jsp>
		用户名:<input type=text name=txtname><br /> 
		密码    :<input type=password name=password><br /> 
			<input type=submit name=ok
			value=登陆> <input type=reset name=reset value=重置>
	</form>
</body>
</html>

 login.jsp

<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
request.setCharacterEncoding("gbk");
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>提取登陆信息</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<%
		String content = request.getParameter("txtname");
		String pwd = request.getParameter("password");
	%>
	<h2>
		用户名:<%=content%></h2>
	<h2>
		密码 :<%=pwd%></h2>
</body>
</html>

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics