無聊寫的東西

<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);
相關文章
相關標籤/搜索