Mercurial Hosting > luan
comparison src/luan/lib/HttpLib.java @ 115:eacf6ce1b47d
add IoLib
git-svn-id: https://luan-java.googlecode.com/svn/trunk@116 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 29 May 2014 09:26:44 +0000 |
parents | c6633e5f0cc5 |
children | d00f41edbbd6 |
comparison
equal
deleted
inserted
replaced
114:c599206448b9 | 115:eacf6ce1b47d |
---|---|
34 public static void service(LuanState luan,HttpServletRequest request,HttpServletResponse response) | 34 public static void service(LuanState luan,HttpServletRequest request,HttpServletResponse response) |
35 throws LuanException, IOException | 35 throws LuanException, IOException |
36 { | 36 { |
37 LuanFunction fn = (LuanFunction)luan.get(FN_NAME); | 37 LuanFunction fn = (LuanFunction)luan.get(FN_NAME); |
38 ServletOutputStream sout = response.getOutputStream(); | 38 ServletOutputStream sout = response.getOutputStream(); |
39 luan.out = new PrintStream(sout); | 39 luan.set( "Io.stdout", IoLib.writer(new PrintStream(sout)) ); |
40 | 40 |
41 LuanTable module = (LuanTable)luan.loaded().get(NAME); | 41 LuanTable module = (LuanTable)luan.loaded().get(NAME); |
42 | 42 |
43 try { | 43 try { |
44 new HttpLib(request,response,module); | 44 new HttpLib(request,response,module); |