jstl模板引擎1.0.8发布
来源:互联网 发布:铭党规知敬畏守规矩 编辑:程序博客网 时间:2024/06/17 06:55
============ 1.0.8
1. 增加TryCatchFinally支持
2. 增加com.skin.ayada.jstl.sql.ConnectTag <sql:connect/>
3. 增加com.skin.ayada.jstl.sql.SqlTag <sql:execute/>
4. 增加com.skin.ayada.jstl.sql.QueryTag <sql:query/>
5. 增加com.skin.ayada.jstl.io.CopyTag <io:copy/>
6. 增加com.skin.ayada.jstl.io.DeleteTag <io:delete/>
7. 增加com.skin.ayada.jstl.io.MakeDirTag <io:mkdir/>
8. 修复编译模式下自定义Tag的setXXX方法编译错误
1. 增加TryCatchFinally支持
2. 增加com.skin.ayada.jstl.sql.ConnectTag <sql:connect/>
3. 增加com.skin.ayada.jstl.sql.SqlTag <sql:execute/>
4. 增加com.skin.ayada.jstl.sql.QueryTag <sql:query/>
5. 增加com.skin.ayada.jstl.io.CopyTag <io:copy/>
6. 增加com.skin.ayada.jstl.io.DeleteTag <io:delete/>
7. 增加com.skin.ayada.jstl.io.MakeDirTag <io:mkdir/>
8. 修复编译模式下自定义Tag的setXXX方法编译错误
命令行下运行: com.skin.ayada.template.Main "webapp\command.jsp" "UTF-8"
对应的demo和test页面参看: /webapp/command.jsp
<%@ page contentType="text/html;charset=UTF-8"%><c:if test="${1 == 2}"> <io:copy file="E:/WorkSpace/ayada/webapp/test1" todir="E:/WorkSpace/ayada/webapp/test2"/> <io:delete file="E:/WorkSpace/ayada/webapp/test2/style.css"/> <io:mkdir file="E:/WorkSpace/ayada/webapp/test2/empty1"/> <io:mkdir file="E:/WorkSpace/ayada/webapp/test2/empty2"/> <io:delete file="E:/WorkSpace/ayada/webapp/test2/empty2"/> <c:exit test="${1 == 1}"/></c:if><h1>sql:execute</h1><h2>connection</h2><p>1. get from attribute, example: connection="[expression]"</p><p>2. get from pageContext by name: connection</p><p>3. get from parent tag</p><p>4. throws exception</p><p>template.home: ${template.home}</p><!-- use external connection --><sql:connect var="connection2" connection="${myConnection}"></sql:connect><sql:connect var="connection" url="jdbc:mysql://localhost:3306?user=root&password=1234&characterEncoding=utf8" driverClass="com.mysql.jdbc.Driver"> <sql:execute out="${pageContext.getOut()}"> drop database if exists mytest2; create database mytest2 character set utf8; </sql:execute></sql:connect><sql:connect var="connection" url="jdbc:mysql://localhost:3306/mytest2?user=root&password=1234&characterEncoding=utf8" driverClass="com.mysql.jdbc.Driver"> <sql:execute home="${template.home}/database" file="create.sql" encoding="UTF-8" out="${pageContext.getOut()}"/> <sql:execute sql="delete from my_test1;" out="${pageContext.getOut()}"/> <sql:execute sql="delete from my_test2;" out="${pageContext.getOut()}"/> <sql:execute sql="insert into my_test2(my_id, my_code, my_name) values (1, '1', '1');"/> <sql:execute out="${pageContext.getOut()}"> <c:forEach items="1, 2, 3, 4, 5" var="id"> insert into my_test1(my_id, my_code, my_name) values (${id}, '${id}', '${id}'); </c:forEach> <c:forEach items="1, 2, 3, 4, 5" var="id"> insert into my_test2(my_id, my_code, my_name) values (${id}, '${id}', '${id}'); </c:forEach> </sql:execute> <sql:execute out="${pageContext.getOut()}"> delete from my_test2; insert into my_test2(my_id, my_code, my_name) values (1001, '1001', '1001'); insert into my_test2(my_id, my_code, my_name) values (1002, '1001', '1001'); insert into my_test2(my_id, my_code, my_name) values (1003, '1001', '1001'); insert into my_test2(my_id, my_code, my_name) values (1004, '1001', '1001'); insert into my_test2(my_id, my_code, my_name) values (1005, '1001', '1001'); insert into my_test2(my_id, my_code, my_name) values (1006, '1001', '1001'); insert into my_test2(my_id, my_code, my_name) values (1007, '1001', '1001'); insert into my_test2(my_id, my_code, my_name) values (1008, '1001', '1001'); </sql:execute> <sql:execute connection="${connection}" sql="insert into my_test2(my_id, my_code, my_name) values (1009, '1001', '1001');"/> <table> <tr> <td>id</td> <td>userName</td> <td>nickName</td> </tr> <sql:query var="resultSet" sql="select * from my_test2 where my_id > 1001" offset="2" length="3"> <tr> <td>${resultSet.getLong("my_id")}</td> <td>${resultSet.getString("my_code")}</td> <td>${resultSet.getString("my_name")}</td> </tr> </sql:query> </table></sql:connect>
下载地址: https://github.com/xuesong123/java-template
0 0
- jstl模板引擎1.0.8发布
- jsp/jstl引擎1.0.1.2发布
- 【PHP 模板引擎】Prototype 原型版发布!
- 全面超越 Velocity 的全新一代 Java 模板引擎 jetbrick-template 1.0.2 正式版发布。
- 发布基于T4模板引擎的代码生成器[Kalman Studio]
- 新一代Java模板引擎 jetbrick-template 1.1.2 发布
- jetbrick-template 2.0.2 发布,Java 模板引擎
- 模板引擎
- 模板引擎
- 模板引擎
- 模板引擎
- 模板引擎
- 模板引擎
- 模板引擎
- 模板引擎
- 模板引擎
- 模板引擎
- 模板引擎
- 面试应该问公司什么问题
- 项目三。长方体类
- NdefRecord官方说明文档翻译
- 尽量用类型化的常量替代预处理器的 #DEFINE 方法
- 【数据结构】平衡二叉树
- jstl模板引擎1.0.8发布
- 设置myeclipse控制台输出到文件中
- 日期转换参数,值得收藏
- hash join VS merge join
- C++11 Concurrency Tutorial – Part 2 : Protect shared data
- sublime text3
- 游戏开发之二维向量角度计算
- win7 32位系统内存限制破解支持到128G内存
- cocos2dx Android发布问题汇总