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=26290>. 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=26290 java compiler name space collision on "String org" when used with jsp:include Summary: java compiler name space collision on "String org" when used with jsp:include Product: Tomcat 5 Version: 5.0.0 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I am not sure if you would consider this is a bug but here it is .... This is probably a "bug" with the code that generates the java code from the jsp page. This may not be a bug because it is really a name space collision. However, it is a kind of a bug because the name space that is colliding with is not neccessarily researved. The ramification of this "bug" or behavior is that you cannot create a jsp variable called "org" and use the <jsp:include .... > directive on the same jsp page with tomcat because of namespace collisions. I am not certain if this behavior occurs in other webapps such as websphere or jboss. In a jsp if you create a "global" String variable called org and then use the <jsp:include page="/jsp/auditlistdetail.jsp" flush="true" /> directive the code will not compile because of a namespace collision on the org variable. When the java compiler gets to "org.apache...." it tries to treat "org." as a String object. Original JSP code ===================== .... String org; .... <jsp:include page="/jsp/someother.jsp" flush="true" /> .... Java generated code looks something like this. =========================================== ..... String org = ""; ...... org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "/jsp/someother.jsp", out, true); ..... Java compiler error message is "cannot resolve symbol variable apache". It is trying to look for a method or variable in the "org" string object. I would suggest using an import "org.apache.jasper.runtime.*" so this one particular collision does not occur. I would guess that there are alot of applications out there with jsp variables called "org". I am renaming my variables to "organization" to prevent any further problems. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]