第四次JSP作业1 request对象

 

 

<%@ 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%>">
    a<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>
  <%
  request.setCharacterEncoding("utf-8");
  String name=request.getParameter("txtUser");
  String Pass=request.getParameter("txtPass");
  String RPass=request.getParameter("txtRPass");
  String gen=request.getParameter("gen");
  String Email=request.getParameter("txtEmail");
   String year=request.getParameter("year");
    String month=request.getParameter("month");
     String day=request.getParameter("day");
   %>
   用户名:<%=name %><br>
  密码:<%=Pass %><br>
  确认密码:<%=RPass %><br>
  性别:<%=gen %><br>
  电子邮件地址:<%=Email %><br>
  出生日期:<%=year %> 年<%=month %>月<%=day %>日<br>
  </body> 
</html>




<%@ 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>
  <%
  request.setCharacterEncoding("utf-8");
  String name=request.getParameter("txtUser");
  String Pass=request.getParameter("txtPass");
  String RPass=request.getParameter("txtRPass");
  String gen=request.getParameter("gen");
  String Email=request.getParameter("txtEmail");
   String year=request.getParameter("year");
    String month=request.getParameter("month");
     String day=request.getParameter("day");
   %>
   用户名:<%=name %><br>
  密码:<%=Pass %><br>
  确认密码:<%=RPass %><br>
  性别:<%=gen %><br>
  电子邮件地址:<%=Email %><br>
  出生日期:<%=year %> 年<%=month %>月<%=day %>日<br>
  </body>
</html>

  

posted on 2020-03-31 14:19  福来了  阅读(137)  评论(0编辑  收藏  举报