On Tue, 9 Jan 2001, Vadim Gritsenko wrote: > Sorry to hear this... But - correct me if I don't understand this - > it is possible to re-write logicsheet so it uses variables only > inside scope of tag, example: > ------------- existing code -------------- > > Stack esqlSessions = new Stack(); > EsqlSession esqlSession = null; > > > -------------- replace by ---------------- > > Stack esqlSessions = new Stack(); > EsqlSession esqlSession = null; > > > > > ------------------------------------------ > > And the code will be a little bit clearer (at least, you can see > variable scope - so you know where this variable may be used) - of > course, this is objective. no. some variables declared in an xsp:logic element may be used in expressions which are used outside of the xsp:logic element. if you want your variables to lose scope after your xsp:logic element ends, put curly braces inside your xsp:logic element ({ ... }). > > They rely on the ability to create variables which continue after the > > xsp:logic tag ends - one of the few technical advantages which > > XSP has over plain Java. > > But now, if your tag declares variable - you can not use this tag again in > same jsp - or you must do some sort of variable name generation. that's why well-behaved logicsheets, e.g. esql, mail, smtp, put a prefix (_esql_) on variables they declare. yeah, i can see some rationale for an xsp:variable element so that this process is automatic, but others have disagreed so far. - donald