Mercurial Hosting > luan
comparison web/src/luan/modules/web/HttpLuan.java @ 218:92f5d74697f8
change Http.session_attribute to Http.session
git-svn-id: https://luan-java.googlecode.com/svn/trunk@219 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Tue, 15 Jul 2014 20:19:36 +0000 |
parents | a608066395c5 |
children | ec016471c6eb |
comparison
equal
deleted
inserted
replaced
217:a608066395c5 | 218:92f5d74697f8 |
---|---|
85 HttpLuan lib = new HttpLuan(request,response); | 85 HttpLuan lib = new HttpLuan(request,response); |
86 try { | 86 try { |
87 module.put( "request", lib.requestTable() ); | 87 module.put( "request", lib.requestTable() ); |
88 module.put( "response", lib.responseTable() ); | 88 module.put( "response", lib.responseTable() ); |
89 module.put( "cookie", lib.cookieTable() ); | 89 module.put( "cookie", lib.cookieTable() ); |
90 module.put( "session_attribute", lib.sessionTable() ); | 90 module.put( "session", lib.sessionTable() ); |
91 /* | 91 /* |
92 module.put( "write", new LuanJavaFunction( | 92 module.put( "write", new LuanJavaFunction( |
93 HttpLuan.class.getMethod( "text_write", LuanState.class, new Object[0].getClass() ), lib | 93 HttpLuan.class.getMethod( "text_write", LuanState.class, new Object[0].getClass() ), lib |
94 ) ); | 94 ) ); |
95 */ | 95 */ |
171 return tbl; | 171 return tbl; |
172 } | 172 } |
173 | 173 |
174 private LuanTable sessionTable() throws NoSuchMethodException { | 174 private LuanTable sessionTable() throws NoSuchMethodException { |
175 LuanTable tbl = new LuanTable(); | 175 LuanTable tbl = new LuanTable(); |
176 tbl.put( "get", new LuanJavaFunction( | 176 tbl.put( "get_attribute", new LuanJavaFunction( |
177 HttpLuan.class.getMethod("get_session_attribute",String.class), this | 177 HttpLuan.class.getMethod("get_session_attribute",String.class), this |
178 ) ); | 178 ) ); |
179 tbl.put( "set", new LuanJavaFunction( | 179 tbl.put( "set_attribute", new LuanJavaFunction( |
180 HttpLuan.class.getMethod("set_session_attribute",String.class, Object.class), this | 180 HttpLuan.class.getMethod("set_session_attribute",String.class, Object.class), this |
181 ) ); | 181 ) ); |
182 return tbl; | 182 return tbl; |
183 } | 183 } |
184 | 184 |