Mercurial Hosting > luan
comparison src/luan/tools/WebRun.java @ 122:d00f41edbbd6
minor
git-svn-id: https://luan-java.googlecode.com/svn/trunk@123 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Wed, 04 Jun 2014 06:15:47 +0000 |
parents | eacf6ce1b47d |
children | 0594c132888b |
comparison
equal
deleted
inserted
replaced
121:cba7ed3f06cc | 122:d00f41edbbd6 |
---|---|
32 if( contentType != null ) | 32 if( contentType != null ) |
33 response.setContentType("text/plain"); | 33 response.setContentType("text/plain"); |
34 String code = request.getParameter("code"); | 34 String code = request.getParameter("code"); |
35 try { | 35 try { |
36 LuanState luan = newLuanState(); | 36 LuanState luan = newLuanState(); |
37 luan.set( "Io.stdout", IoLib.writer(out) ); | 37 luan.set( "Io.stdout", IoLib.textWriter(out) ); |
38 LuanTable env = luan.global(); | 38 LuanTable env = luan.global(); |
39 env.put("request",request); | 39 env.put("request",request); |
40 env.put("response",response); | 40 env.put("response",response); |
41 luan.eval(code,"WebRun",false); | 41 luan.eval(code,"WebRun",false); |
42 } catch(LuanException e) { | 42 } catch(LuanException e) { |