`
huncent
  • 浏览: 16358 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论
文章列表
package testcomet import org.cometd.client.*; import org.eclipse.jetty.client.HttpClient; class TestcometdService { static transactional = true def serviceMethod() { HttpClient _httpClient; _httpClient = new HttpClient(); _httpClient.setMaxConnectionsPerAddre ...
需要将代理缓冲关闭,nginx默认是开启的 proxy_buffering off; 这样运行在jetty上的dwr reverseajax就能正常运行了
import org.codehaus.groovy.scriptom.ActiveXObject import java.io.File class word2html { static void main(args) { if(args) { def word = new ActiveXObject("Word.Application") word.Documents.Open(new File(args[0]).canonicalPath) word.ActiveDocument.SaveAs(new File( ...
0.8.20以后用 server { listen 80 default_server; server_name _; return 403; } 0.8.20以前(包含)可用      server { server_name _; #default return 403; }
def index = { response.setContentType("text/html; charset=utf-8");//以utf8编码输出 } 另外注意的是ftl文件必须是ANSI编码,不能使用utf-8,否则会乱码。 2009-08-15更新以下内容: 上述内容只在windows环境下有效,要在linux下面同时有效,需要修改freemarker plugin源码里面的设置,修改FreemarkerGrailsPlugin.groovy如下: if(developmentMode) { ...
create procedure testsp() begin select * from test; end// import groovy.sql.Sql; class TestController { def dataSource; def index = { Sql sql = new Sql(dataSource); sql.eachRow("call testsp()"){ println it; ...
输出字符串 def dataSource def test={ Sql sql = new Sql(dataSource); def invar="testvar"; sql.call("{call yourfunction(${Sql.inout(Sql.VARCHAR(invar))}) }") { string -> render(string) } } 输出record记 ...
Global site tag (gtag.js) - Google Analytics