zoukankan      html  css  js  c++  java
  • 第四次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>
    

      

  • 相关阅读:
    库存管理系统
    2018/12/9数据库的增删改查
    小学生出题系统(文件输入输出)
    第五次实验动手动脑
    (异常处理)JAVA项目中的常用的异常处理情况
    学习进度——第十三周
    程序员修炼之道:从小工到专家读后感02
    第一阶段意见评论
    学习进度——第十二周
    share团队冲刺10
  • 原文地址:https://www.cnblogs.com/zf08/p/12604942.html
Copyright © 2011-2022 走看看