logib.jsp 博客分类: JSP jsp
程序员文章站
2024-03-21 12:40:10
...
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>
推荐阅读
-
JSP连接MySql数据库 博客分类: JSP jsp
-
No suitable driver found for jdbc:mysql://localhost:3306/test 博客分类: JSP jsp连接数据库
-
JSP连接MySql数据库 博客分类: JSP jsp
-
logib.jsp 博客分类: JSP jsp
-
《JavaWeb项目开发教程》第二章代码 博客分类: 周国烛 jsp
-
GlassFish4.0默认JSP编译版本问题 博客分类: Web Server GlassFishTomcat
-
选择Session还是Cookie 博客分类: jsp 浏览器Google应用服务器GAE互联网
-
关于JSP中的隐式Session 博客分类: Coding
-
jsp自定义标签 博客分类: jsp/servlet jsp自定义标签
-
Servlet 的生命周期图 博客分类: JSP servletlifecycle