DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21390>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21390 Incorrect code generated by the jsp compiler ------- Additional Comments From [EMAIL PROTECTED] 2003-08-28 23:14 ------- Both JSP 1.2 and JSP 2.0 do not address this issue adequately. I have talked with JSP 2.0 spec lead, and we are also leaning towards declaring all scripting variables. Any attempt to "fix" multiple definition errors (like what Japser is doing now) will fail, in cases such as this. So I am in favor of removing this functionality from Japser. This amounts to removing ScriptingVariabler.java and some codes from Generator.java. I also like the fact that Jasper also will be simpler as a result. :-) The only problem is we may break applications that depend on it. The workaround for simple case like <test:test1/> <test:test1/> is to include a <%= { %> and <%= } %> around the tag invokation. But there is no wrokaround for nested tags <test:test1> <test:test1/> </test:test1> because Java language does not allow the a variable be declared in a block when a variable of the same name has already been declared in an outer block. Is it OK for us to say tough, the tag handlers cannot be nested when there are scripting variables? I don't know. Maybe the only solution is for the taglib designer to include an attribute for specifying the name of the scripting variable. So in the the nested case, one can say <test:test1 var="var1"> <test:test1 var="var2"/> </test:test1> to manually avoid Javac errors. JSP 2.0 is discouraging the use of scripting variable and is encouraginging the use of EL, partly because of issues like this. BTW, when you write <% /* %> <test:test/> <% */ %> you are assuming that a comment is not generated for <test:test/>. This may not be true in general. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]