comparison src/luan/tools/WebShell.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 f86e4f77ef32
children 6db8f286fa6c
comparison
equal deleted inserted replaced
76:97b03fc807ad 77:4bf3d0c0b6b9
57 if( luan==null ) { 57 if( luan==null ) {
58 luan = newLuanState(); 58 luan = newLuanState();
59 session.putValue("luan",luan); 59 session.putValue("luan",luan);
60 } 60 }
61 luan.out = new PrintStream(history); 61 luan.out = new PrintStream(history);
62 luan.global.put("request",request); 62 luan.global().put("request",request);
63 luan.global.put("response",response); 63 luan.global().put("response",response);
64 Object[] result = eval(luan,cmd); 64 Object[] result = eval(luan,cmd);
65 if( result.length > 0 ) { 65 if( result.length > 0 ) {
66 for( int i=0; i<result.length; i++ ) { 66 for( int i=0; i<result.length; i++ ) {
67 if( i > 0 ) 67 if( i > 0 )
68 writer.write(" "); 68 writer.write(" ");