日期:2014-05-17  浏览次数:20714 次

求助:jsp页面不显示数据
不知道到底是没从数据库中取出数据还是后台数据没有传送到前台,实在晕了

求各位朋友帮助 谢谢

HTML code

<%@ page contentType="text/html; charset=GBK"%>
<%@ taglib uri="/WEB-INF/tlds/c-rt.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/tlds/fmt-rt.tld" prefix="fmt"%>
<%
    String path = request.getContextPath();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<%=path%>/css/main.css" rel="stylesheet" type="text/css">
<link href="<%=path%>/css/a.css" rel="stylesheet" type="text/css">
<title>用户信息列表</title>
<SCRIPT LANGUAGE="JavaScript" src="<%=path%>/common/js/prototype.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript"
    src="<%=path%>/common/My97DatePicker/WdatePicker.js"></SCRIPT>

<SCRIPT LANGUAGE="JavaScript">

//选中所有的复选框
function checkAll(name) {
    var el = document.getElementsByTagName('input');
    var len = el.length;
    for(var i=0; i<len; i++) {
        if((el[i].type=="checkbox") && (el[i].name==name))         
        {
            el[i].checked = true;
        }
    }
}

// 取消所有的复选框
function clearAll(name) {
    var el = document.getElementsByTagName('input');     
    var len = el.length;     
    for(var i=0; i<len; i++) {
        if((el[i].type=="checkbox") && (el[i].name==name)) {             
            el[i].checked = false;
        }
    }
}
// 判断复选框是否选中了
function checkChckbox(){
    var obj=document.getElementsByName('idArray');
    for(var i=0;i<obj.length;i++){
        if(obj[i].checked)
        {
            return true;
        }
    }
}

function searchUser(){
    $("refrush").value="true";
    $("userListForm").submit();
}

function isnull(str) {
    if (str == null || str == "" || str == "undefine") {
        return true;
    }
    return false;
}




    function deleteUser(id){
        if(!isnull(id)){
            if(confirm("确定要删除此用户吗")){
                $("userListForm").action="${pageContext.request.contextPath}/deleteUser.action?id="+id;
            }else{  
                return false;
            }
        }else{
            if(checkChckbox()){
                if(confirm("确定要删除这些用户吗?")){
                    $("userListForm").action="${pageContext.request.contextPath}/deleteUser.action"; 
                }else{  
                    return false;
                }
            }else{
                alert("请选择用户!");
                return false;
            }
        }

        $("userListForm").submit();
    }  
</script>
</head>
<body>

    <form id="userListForm" name="userListForm" action="<%=path %>/searchUser.action" method="post">
        <span class="headline">
        <center>用户信息列表</center>
        <input type="hidden"
            id="refrush" name="refrush" value="false" />
            
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          
          <td class="search" align="right" width="30%" nowrap>用户名:</td>
          <td class="search"><input type="text" id="user.userName" name="user.userName" value="${user.userName}" /></td>
          
          <td class="search" align="right" width