无聊写的东西

<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
        <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js">    </script>

        <c:set var="BASE" value="${pageContext.request.contextPath}"/>

        <table class="table table-bordered table-hover">
    <thead>
    <tr>
        <th>帐号</th>
        <th>用户名</th>
        <th>电话</th>
        <th>地址</th>
        <th>邮箱</th>
        <th>操做</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${list}" var="user">
        <tr>
            <td>${user.name}</td>
            <td>${user.userName}</td>
            <td>${user.telephone}</td>
            <td>${user.address}</td>
            <td>${user.email}</td>
            <td>
                <a href="${BASE}/test?id=${user.id}">编辑</a>
                <a href="${BASE}/user_delete?id=${user.id}">删除</a>
            </td>
        </tr>
    </c:forEach>
    </tbody>
    </table>



         UserServer userServer = new UserServerImpl();
        List list = new ArrayList();
        list =  userServer.list();
        System.out.println(list.toString());
        req.setAttribute("list", list);
        req.getRequestDispatcher("/WEB-INF/jsp/index.jsp").forward(req,resp);
相关文章
相关标签/搜索