<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
<%@ page contentType="text/html; charset=gb2312" language="java" %>
<html>
<body>
<sql:setDataSource
  var="conn"
  driver="sun.jdbc.odbc.JdbcOdbcDriver"
  url="jdbc:odbc:bbb"
  user="sa"
  password=""  
/>
<sql:query var="query"  sql="SELECT * FROM custom where yhm=? and mm=?" dataSource="${conn}">
<sql:param value="${param.aa}"/>
<sql:param value="${param.Password}"/>
</sql:query>
<c:choose>
<c:when test="${query.rowCount!=0}">
  <table border="1">
 <c:forEach var="row" items="${query.rows}">
  <tr>
    <td width="100">用户名: 
      <c:out value="${row.yhm}"/></td>
    <td width="80">性别:
      <c:out value="${row.xb}"/></td>
    <td width="80">年龄:  
      <c:out value="${row.nl}"/></td>
  </tr>
</c:forEach>
</table>
</c:when>
<c:otherwise>
用户名或密码错误，请重新输入！</c:otherwise>
</c:choose>
</table>
</body>
</html>
