On 13/05/2014 13:40, Mark Thomas wrote: > On 13/05/2014 11:43, Rémy Maucherat wrote: >> 2014-05-13 9:37 GMT+02:00 Mark Thomas <ma...@apache.org>: >> >>> I'm running the unit tests now. I want to look at BZ 56516 some more and >>> I don't want to hold up a 8.0.x release any longer. >>> >> >> There's nothing to look at IMO, the guy is using scriptlets and expects >> things to work with the tag variable. Jasper has no idea to know there's >> flow control in his Java code fragments. >> >> Rémy >> >> From his test case (with a "message" variable info): >> <% >> try { >> %> >> <hello:helloWorld id="message"/> >> <% >> } catch (Exception e) { >> //String message = null; >> %> >> <hello:helloWorld id="message"/> >> <% >> } >> %> > > Indeed. So do we: > > a) do nothing > > b) declare variables just after the implicit variables so they are > always in scope > > c) add some { } blocks and declare the variable once each time the tag > is used? > > I've been looking through the specification but haven't found anything > yet that would suggest a preferred approach. Equally, I haven't found > anything to suggest that a) is valid in this case.
The best guidance I have been able to find from the specification is in JSP.1.8 which states: "An object exposed through a scripting variable has a scope within the page." I read that as suggesting that option b) is probably the way to go. I plan to explore options for implementing this next. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org