代码如下:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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>My JSP 'index.jsp' starting page</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>
     <form action="index.jsp" method="post">
    用户登录:<input type="text" name="user" /><br>
    密码:<input type="password" name="password"/><br>
    <input type="submit">
    </form>
    <hr>
    <%
    if((request.getParameter("user")!=null)&&(request.getParameter("password")!=null)){ %>
    用户参数名为:<%=request.getParameter("user")%><br>
    密码为:<%=request.getParameter("password")%>
   <%} %>
  </body>
</html>

最新文章

  1. 每天一个linux命令(61):wget命令
  2. JQuery AJAX 解析获得的JSON数据
  3. poj1631Bridging signals(最长单调递增子序列 nlgn)
  4. 几个与时间相关的php的函数
  5. block iOS 块
  6. asp.net如何设置数据库连接池的数量
  7. css3 javascript 实现菜单按钮特效
  8. Firefly distributed模块的原理与twisted中PB远程调用协议
  9. 测试最新的log4cplus1.1.2版
  10. 关于STM32 IAP
  11. 福州大学软工 1715 | K 班 - 启航
  12. 容器与Docker简介(一)——微软微服务电子书翻译系列
  13. 使用Myeclipse为数据表创建hibernate实体对象
  14. SSH深度历险(四) Maven初步学习
  15. 第一次使用eclipse出现的问题
  16. Appium 学习三:Appium-Desktop 填坑
  17. JavaScript中调皮的undefined
  18. RocketMQ 部署
  19. Javascript-Object-Definition
  20. Delphi for iOS开发指南(7):在iOS应用程序中使用WebBrowser组件

热门文章

  1. html和css知识总结
  2. ArcGis 统计方法
  3. Wordpress 3.5.1的debug流水账
  4. 理解SQL Server中的权限体系(下)----安全对象和权限
  5. raid知识
  6. C语言 文件操作7--文件错误处理
  7. 添加web引用和添加服务引用有什么区别?
  8. Eclipse系列: Eclipse设置Tomcat启动超时时间
  9. [CareerCup] 9.6 Generate Parentheses 生成括号
  10. [CareerCup] 11.6 Search a 2D Matrix 搜索一个二维矩阵