tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51706] New: Variable named org declared before jsp:include confuses JSP compiler
Date Mon, 22 Aug 2011 15:58:34 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51706

             Bug #: 51706
           Summary: Variable named org declared before jsp:include
                    confuses JSP compiler
           Product: Tomcat 6
           Version: 6.0.20
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: joshua.england@clicktools.com
    Classification: Unclassified


Created attachment 27422
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27422
Java code generated from JSP

When a JSP is created with a variable called org, the JSP compiler (java code
generator) seems to get confused and treats org.apache as a member variable of
the object org.

Example would cause a fault.

<% 
String org = "foo";
%>

<jsp:include page="anotherfile.jsp" />


Text below is an example stack trace.


----------

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 5 in the jsp file: /faq/xxx.jsp
org.apache cannot be resolved or is not a field
2: String org = "foo";
3: %>
4: 
5: <jsp:include page="anotherfile.jsp" />

Stacktrace:
   
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
   
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
   
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:326)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   
com.clicktools.servlet.filter.DomainRedirectFilter.doFilter(DomainRedirectFilter.java:172)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message