Mercurial Hosting > luan
comparison src/luan/tools/WebServlet.java @ 81:9df729fa4419
minor
git-svn-id: https://luan-java.googlecode.com/svn/trunk@82 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Sat, 16 Feb 2013 06:58:00 +0000 |
parents | 4bf3d0c0b6b9 |
children | cca4f8522893 |
comparison
equal
deleted
inserted
replaced
80:851e356101c1 | 81:9df729fa4419 |
---|---|
48 loadLibs(luan); | 48 loadLibs(luan); |
49 loadLuan(luan); | 49 loadLuan(luan); |
50 return luan; | 50 return luan; |
51 } | 51 } |
52 | 52 |
53 protected LuanState getLuanState() throws LuanException { | 53 protected LuanState getLuanState(HttpServletRequest request) throws LuanException { |
54 synchronized(this) { | 54 synchronized(this) { |
55 if( luanState == null ) | 55 if( luanState == null ) |
56 luanState = newLuanState(); | 56 luanState = newLuanState(); |
57 } | 57 } |
58 return luanState.deepClone(); | 58 return luanState.deepClone(); |
60 | 60 |
61 protected void service(HttpServletRequest request,HttpServletResponse response) | 61 protected void service(HttpServletRequest request,HttpServletResponse response) |
62 throws ServletException, IOException | 62 throws ServletException, IOException |
63 { | 63 { |
64 try { | 64 try { |
65 LuanState luan = getLuanState(); | 65 LuanState luan = getLuanState(request); |
66 HttpLib.service(luan,request,response); | 66 HttpLib.service(luan,request,response); |
67 } catch(LuanException e) { | 67 } catch(LuanException e) { |
68 throw new LuanRuntimeException(e); | 68 throw new LuanRuntimeException(e); |
69 } | 69 } |
70 } | 70 } |