Mercurial Hosting > luan
comparison src/luan/lib/HttpLib.java @ 77:4bf3d0c0b6b9
make LuanState cloneable
git-svn-id: https://luan-java.googlecode.com/svn/trunk@78 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 15 Feb 2013 09:55:17 +0000 |
parents | 97b03fc807ad |
children | 6db8f286fa6c |
comparison
equal
deleted
inserted
replaced
76:97b03fc807ad | 77:4bf3d0c0b6b9 |
---|---|
21 public static final String FN_NAME = "serve_http"; | 21 public static final String FN_NAME = "serve_http"; |
22 | 22 |
23 public static void service(LuanState luan,HttpServletRequest request,HttpServletResponse response) | 23 public static void service(LuanState luan,HttpServletRequest request,HttpServletResponse response) |
24 throws LuanException, IOException | 24 throws LuanException, IOException |
25 { | 25 { |
26 LuanFunction fn = (LuanFunction)luan.global.get(FN_NAME); | 26 LuanFunction fn = (LuanFunction)luan.global().get(FN_NAME); |
27 ServletOutputStream sout = response.getOutputStream(); | 27 ServletOutputStream sout = response.getOutputStream(); |
28 luan.out = new PrintStream(sout); | 28 luan.out = new PrintStream(sout); |
29 | 29 |
30 LuanTable module = new LuanTable(); | 30 LuanTable module = new LuanTable(); |
31 luan.global.put(NAME,module); | 31 luan.global().put(NAME,module); |
32 | 32 |
33 LuanTable parameters = new LuanTable(); | 33 LuanTable parameters = new LuanTable(); |
34 LuanTable parameter_lists = new LuanTable(); | 34 LuanTable parameter_lists = new LuanTable(); |
35 @SuppressWarnings("unchecked") | 35 @SuppressWarnings("unchecked") |
36 Map<String,String[]> paramMap = request.getParameterMap(); | 36 Map<String,String[]> paramMap = request.getParameterMap(); |