jsp fourth

<%@ page language="java" 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>
    <title> User registration </ title>
  </head>

<body>
<FORM action="info.jsp" method="post" name="myform">
<TABLE   border="0" cellpadding="0" cellspacing="0" align="center" width="530">
  <TR>
    <TD height="108" colspan="2"><IMG src="images/top.jpg"></TD>
  </TR>
  <TR>
    <TD width="107" height="36">用户名:</TD>
    <TD width = " 524 " > <INPUT name = " txtUser " type = " text " maxlength = " 16 " > You can only enter letters or numbers, 4 -16 characters </ TD>
  </TR>
    <TR>
    <TD width="107" height="36">密码:</TD>
    <TD width="524"><INPUT name="txtPass" type="password">密码长度6-12位</TD>
  </TR>
    <TR>
    <TD width="107" height="36">确认密码:</TD>
    <TD width="524"><INPUT name="txtRPass" type="password"></TD>
  </TR>
    <TR>
    <TD width="107" height="36">性别:</TD>
    <TD width="524">
        <INPUT name="gen" type="radio"   value="" checked>男&nbsp; 
        <INPUT name="gen" type="radio" value="" class="input"></TD>
  </TR>
    <TR>
    <TD width = " 117 " height = " 36 " > Email address: </ TD>
    <TD width = " 524 " > <INPUT name = " txtEmail " type = " text " > 
    Enter the correct email address </ TD>
  </TR>
    <TR>
    <TD width="107" height="36">出生日期:</TD>
    <TD width="524">
    <INPUT name="year" id="year" size="4" maxlength="4" >&nbsp;年&nbsp;&nbsp;
           <SELECT name="month"  >
             <OPTION value=1>一月</OPTION>
             <OPTION value=2>二月</OPTION>
             <OPTION value=3>三月</OPTION>
             <OPTION value=4>四月</OPTION>
             <OPTION value=5>五月</OPTION>
             <OPTION value=6>六月</OPTION>
             <OPTION value=7>七月</OPTION>
             <OPTION value=8>八月</OPTION>
             <OPTION value=9>九月</OPTION>
             <OPTION value=10>十月</OPTION>
             <OPTION value = 11 > November </ OPTION>
             <OPTION value = 12 > December </ OPTION>
          </SELECT>&nbsp;月&nbsp;&nbsp;
                <SELECT name="day"  >
             <OPTION value=1>1</OPTION><OPTION value=2>2</OPTION><OPTION value=3>3</OPTION><OPTION value=4>4</OPTION>
             <OPTION value=5>5</OPTION><OPTION value=6>6</OPTION><OPTION value=7>7</OPTION><OPTION value=8>8</OPTION>
             <OPTION value=9>9</OPTION><OPTION value=10>10</OPTION><OPTION value=11>11</OPTION><OPTION value=12>12 </OPTION>
             <OPTION value=13>13</OPTION><OPTION value=14>14</OPTION><OPTION value=15>15</OPTION><OPTION value=16>16</OPTION>
             <OPTION value=17>17</OPTION><OPTION value=18>18</OPTION><OPTION value=19>19</OPTION><OPTION value=20>20</OPTION>
             <OPTION value=21>21</OPTION><OPTION value=22>22</OPTION><OPTION value=23>23</OPTION><OPTION value=24>24</OPTION>
             <OPTION value=25>25</OPTION><OPTION value=26>26</OPTION><OPTION value=27>27</OPTION><OPTION value=28>28</OPTION>
             <OPTION value=29>29</OPTION><OPTION value=30>30</OPTION><OPTION value=7>31</OPTION>
          </SELECT>&nbsp;日 
</TD>
  </TR>
  <TR><TD colspan="2" align="center">
  <INPUT type = " submit " value = " Agree to the following agreement terms and submit " >
  </TD></TR>
  <TR><TD colspan="2">
  <TEXTAREA cols="" rows="" readonly="readonly" style="width:480px;height:110px;font-size:12px;color:#666">
1. General

1 . 1 The user should agree to the terms of this agreement and follow the prompts on the page to complete all registration procedures. When the user clicks the " Agree " button during the registration process, it means that the user has reached an agreement with Baidu and fully accepts all the terms under this agreement.
1 . 2  After successful user registration, Baidu will give each user a user account and corresponding password. The user account and password are kept by the user; the user shall be legally responsible for all activities and events carried out with his user account.
1 . 3  Users can use Baidu's individual channel services. When users use Baidu's individual services, the user's use behavior is regarded as their agreement to the service terms of the individual service and Baidu's various announcements issued in the individual service.
1 . 4  Baidu Member Services Agreement and the terms of each individual service channels and notice at any time by the company Baidu update, without notice. When you use related services, you should pay attention to and abide by the relevant provisions applicable to them.
  You should read this service agreement carefully before using various services provided by Baidu. If you do not agree with this service agreement and / or modify it at any time, you can take the initiative to cancel the services provided by Baidu; once you use Baidu services, you are deemed to have understood and fully agree with the contents of this service agreement, including Baidu Any modification of the service agreement at any time, and become Baidu users.
        </ TEXTAREA>
  </TD>
  </TR>
</TABLE>
</FORM>
</body>
</HTML>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Insert title here</title>
</head>
<body>
    <%
        request.setCharacterEncoding("utf-8");
        String name=request.getParameter("txtUser");
        String psd=request.getParameter("txtPass");
        String sex=request.getParameter("gen");
        String email=request.getParameter("txtEmail");
        String year=request.getParameter("year");
        String month=request.getParameter("month");
        String day=request.getParameter("day");
    %>
    <h3> The information you registered is as follows: </ h3> <br> 
    User name: <% = name%> <br> 
    Password: <% = psd%> <br> 
    Gender: <% = sex%> <br> 
    Email: <% = email%> <br> 
    Birth Date: <% = year%> Year <% = month%> Month <% = day%> Day
 </ body>
</html>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
    <%
        String id=request.getParameter("userid");
        String psd=request.getParameter("passwd");
        if(id!=null&&psd!=null){
            if(id.equals("lucky")&&psd.equals("123456")){
                request.getRequestDispatcher("loginSuccess.jsp").forward(request, response);
            }else{
                request.getRequestDispatcher("mailLogin.jsp").forward(request, response);
            }
        }else{
            request.getRequestDispatcher("mailLogin.jsp").forward(request, response);
        }
         
    %>
</body>
</html>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
    <%
        String id=request.getParameter("userid");
    %>
    <h3> <% = id%>, hello welcome to log in </ h3>
</body>
</html>

Guess you like

Origin www.cnblogs.com/jhmll/p/12703039.html
jsp