用户注册信息的验证与数据回显



  半成品   带完善


用户注册信息的验证与数据回显
注:  需要数据库驱动jar包,BeanUtils.jar,jstl.jar,stand.jar
         熟悉各种表单类型数据的回显与验证
         会写FormBeanUtil工具类
         会在一个web.controller类中处理各种业务
-------------------------------------------------------------------------------------------------------
注册表单
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.itcast.cn/myfn" prefix="myfn"%>  


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
          <title>用户注册</title>        
          <meta http-equiv="pragma" content="no-cache">
          <meta http-equiv="cache-control" content="no-cache">
          <meta http-equiv="expires" content="0">    
  </head>
  
  <body>
 
        <form action="${pageContext.request.contextPath}/servlet/ControllerServlet?operation=regist" method="post">
                <table border="1" width="50%">
                        <tr>
                                <td><span style="color: red;">*</span>用户名(3~8位字母)</td>
                                <td>
                                        <!-- value用来数据回显 -->
                                        <input type="text" name="username" value="${formBean.username}" />${formBean.errors.username}      
                                </td>      
                        </tr>
                        <tr>
                                <td><span style="color: red;">*</span>密码(3~8位数字)</td>
                                <td>
                                        <input type="password" name="password" value="${formBean.password}" />${formBean.errors.password} 
                                </td>
                        </tr>
                        <tr>
                                <td><span style="color: red;">*</span>确认密码</td>
                                <td>
                                        <input type="password" name="repassword" value="${formBean.repassword}" />${formBean.errors.repassword}
                                </td>
                        </tr>
                        <tr>
                                <td>性别</td>
                                <td>
                                        <input type="radio" name="gender" value="1" ${formBean.gender=="1"?"checked='checked'":""} />男                     
                                        <input type="radio" name="gender" value="0" ${formBean.gender=="0"?"checked='checked'":""}/>女
                                </td>
                        </tr>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值