//jsp A
<c:forEach var="user" items="${users}"> 
  <tr> 
    <a href="userinfo.jsp?userId=${user.id}" >${user.name}</a></td> 
  </tr> 
</c:forEach> //jsp B
怎样能显示

解决方案 »

  1.   

    js方法
    /**
    * 显示人员详细信息 
    */
    function showUserDetail(userId) {
    window.showModalDialog("<%=path %>/basicInfo/user/user!detail.action?userId=" + userId + "&d=" + new Date(), self, 'dialogHeight:600px;dialogWidth:600px;center:yes;middle:yes;help:no;location:no;status:no;scroll:yes');
    }
    页面:<td class="List_table_text"><a href="javascript:showUserDetail('${userInfo.userId}')"><c:out value="${userInfo.name}"/></a></td>后台:/**
    * 根据用户ID查询员工详细
    * @return
    * @throws Exception
    */
    public String detail() throws Exception {
    userDetail = userService.getUserInfoById(userId);
    return "detail";
    }
    详细页面:<div id="btn_title_area" style="width:95%;margin:10px auto 5px auto"><img src="<%=frameroot%>/image/icon_title.gif" align="absmiddle" /> &nbsp;人员信息详细</div>
    <input type="hidden" value="${userDetail.userId}" name="userId" id="userId">
    <s:form id="mytable" theme="simple" name="mytable">
    <table width="95%" border="0" cellpadding="0" cellspacing="0" align="center" class="table_list">
    <tr>
    <th style="width:25%">员工编号:</th>
    <td colspan="3">
    <c:out value="${userDetail.userNo}"></c:out>
    </td>
    </tr>
    <tr>
    <th>姓名:</th>
    <td>
    <c:out value="${userDetail.name}"></c:out>
    </td>
    </tr>
    <tr>
    <th style="width:20%">用户名:</th>
    <td colspan="3">
    <c:out value="${userDetail.userName}"></c:out>
    </td>
    </tr>
    <tr>
    <th>性别:</th>
    <td>
    <c:if test="${userDetail.sex == 1}">
    <c:out value="女"/>
    </c:if>
    <c:if test="${userDetail.sex == 0}">
    <c:out value="男"/>
    </c:if>
    </td>
    </tr>
    <tr>
    <th>身份证号:</th>
    <td>
    <c:out value="${userDetail.identityId}"></c:out>
    </td>
    </tr>
    <th>机构:</th>
    <td>
    <c:out value="${userDetail.org.departmentName}"></c:out>
    </td>
    </tr>
    <th>部门:</th>
    <td>
    <c:out value="${userDetail.department.departmentName}"></c:out>
    </td>
    </tr>
    <th>级别:</th>
    <td>
    <c:out value="${userDetail.level.masterValue}"></c:out>
    </td>
    </tr>
    </tr>
    <th>头衔:</th>
    <td>
    <c:out value="${userDetail.title.masterValue}"></c:out>
    </td>
    </tr>
    <tr>
    <th>是否有试用期:</th>
    <td>
    <c:choose>
    <c:when test="${userDetail.isTry == 1}">是</c:when>
    <c:otherwise>否</c:otherwise>
    </c:choose>
    </td>
    </tr>
    <tr>
    <th>是否需印制名片:</th>
    <td>
    <c:choose>
    <c:when test="${userDetail.isMakingCard == 1}">是</c:when>
    <c:otherwise>否</c:otherwise>
    </c:choose>
    </td>
    </tr>
    <tr>
    <th>入职时间:</th>
    <td>
    <fmt:formatDate pattern="yyyy-MM-dd" value="${userDetail.inCompanyTime}" ></fmt:formatDate>
    </td>
    </tr>
    <tr>
    <th>状态:</th>
    <td>
    <c:choose>
    <c:when test="${userDetail.userState == 1}">有效</c:when>
    <c:otherwise>无效</c:otherwise>
    </c:choose>
    </td>
    </tr>
    <tr>
    <th>备注:</th>
    <td>
    <c:out value="${userDetail.res}"></c:out>
    </td>
    </tr>
    </table>
    <div id="btn_submit_area">
    <input name="Submit2" type="button" class="btn_submit" value="关 闭" onclick="doCancel();">
    </div>
    </s:form>
    </body>
    </HTML>参考一下吧
      

  2.   

    ${users}  你要在action处理这个数据