随笔 - 45, 文章 - 2, 评论 - 11, 引用 - 0
数据加载中……

2011年4月29日

JSTL的使用

1、在jsp文件的头部加入
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>

2、<c:froEach/>的使用
 1<%
 2        OperationDAO opDao = new OperationDAOImpl();
 3        List<Operation> ops = opDao.getAll_();
 4        MenuDAO meDao = new MenuDAOImpl();
 5        List<Menu> mes = meDao.getAll_Lazy(1) ;
 6    %>
 7            <table id="demoTable" border="1">
 8            <thead>
 9                <th>id</th>
10                <th>显示名称</th>
11                <th>链接</th>
12                <th>所属菜单</th>
13                <th>是否可见</th>
14                <th>操作</th>
15            </thead>
16            <tbody>
17                <c:forEach var="op" items="<%=ops %>">
18                    <tr id="${op.op_Id}"
19                        class="{op_Id:${op.op_Id},op_displayName:'${op.op_displayName}',op_link:'${op.op_link }',me_name:'${op.menu.me_displayName}',viewMode:'${op.viewMode}'}">
20                        <td class="op_Id">${op.op_Id}</td>
21                        <td class="op_displayName">${op.op_displayName}</td>
22                        <td class="op_link">${op.op_link }</td>
23                        <td class="me_name">${op.menu.me_displayName}</td>
24                        <td class="viewMode">viewMode:${op.viewMode}</td>
25                        <td><class="editRecord" href="anotherPage.html">Edit</a> |
26                            <class="deleteRecord" href="anotherPage.html">Delete</a></td>
27                    </tr>
28                </c:forEach>
29            </tbody>
30        </table>



posted @ 2011-05-08 23:16 jack zhai 阅读(197) | 评论 (0)编辑 收藏

spring的一般配置

beans.xml

beans

 

 

jdbc.properties

properties

在web.xml里加入

web.xml


 

posted @ 2011-05-01 14:26 jack zhai 阅读(218) | 评论 (0)编辑 收藏

powerdesigner反向生成物理模型

需要先安装ODBC,才可以使用ODBC连接方式连接数据库

下载地址:mysql-connector-odbc-5.1.8-win32.msi

1

1

2

2

3

3

4

4

 

5

5

posted @ 2011-04-29 13:13 jack zhai 阅读(401) | 评论 (0)编辑 收藏

使用SchemaExport自动生成表结构

  new SchemaExport(new AnnotationConfiguration().configure()).create(false, true);

posted @ 2011-04-29 08:09 jack zhai 阅读(315) | 评论 (0)编辑 收藏