You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2018/10/04 15:08:21 UTC

[Bug 62801] New: Unable to use local variable names like "org" in a JSP page followed by a tag.

https://bz.apache.org/bugzilla/show_bug.cgi?id=62801

            Bug ID: 62801
           Summary: Unable to use local variable names like "org" in a JSP
                    page followed by a <jsp:include /> tag.
           Product: Tomcat 7
           Version: 7.0.90
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: ajish.ulahannan@hotmail.com
  Target Milestone: ---

Created attachment 36190
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36190&action=edit
Contains the "jsp" files and generated servlets.

We are currently upgrading our tomcat version from 7.0.63 to 7.0.93. While
doing that I am experiencing an issue with the jsp files with a <jsp:include />
tag. The whole translation and compilation of jsp files works very well for the
7.0.63 version during the build process. But the same gives me a compilation
error when tries to run a build taks with 7.0.90 version.

ISSUE: Unable to use local variable names like "org" in a JSP page followed by
a <jsp:include /> tag. I have checked some other custom tags as well and I
reproduced the issue as well. I can see that the starting of the package name
associated with the Java class against the custom tag cannot be matching with
the local variable name in scriptlet.

Upon researching on the issue to a detailed level I can see that, I am using
<jsp:include /> in one of my files and when the jasper translates the
corresponding jsp files, it is adding some extra java code as per 7.0.90
version of tomcat. In order to prove the problem, I have created a couple of
jsp pages, which are attached to this ticket.

My jasper tag in build.xml is as follows.
    <jasper2 validateXml="false" uriroot="${proj.webapp}" outputDir="${jspc}"
classpath="${build.classpath}"
             webXmlFragment="${release}/xml/generated_web.xml"
trimSpaces="true"/>


Following was the Error message I was receiving after the "jspc" build task.
[javac]
/Users/user1/Workspace/projects/testproj/release/working/jspc/org/apache/jsp/test/testpage_jsp.java:85:
error: cannot find symbol
[javac]       org.apache.jasper.runtime.JspRuntimeLibrary.include(request,
response, "includepage.jsp", out, false);
[javac]          ^
[javac]   symbol:   variable apache

Please check the attachment with this ticket for more details including jsp
files and generated servlets.

DIAGNOSYS:
 Jasper translation is having a bit of a trouble in this case. It can be
happened due to either of the following two cases.
1) I am not aware of the fact that there is a new attribute, which needs to be
used with the jasper tag in the ant script.
2) The Jasper translator is translating the jsp page correctly, when it comes
to custom tags/standard tags.

-- 
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


[Bug 62801] Unable to use local variable names like "org" in a JSP page scriptlet followed by a tag.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62801

--- Comment #1 from Ajish Ulahannan <aj...@hotmail.com> ---
I can see that the https://bz.apache.org/bugzilla/show_bug.cgi?id=29718 relates
to this problem. But I am confused about the fact that, we were using the
tomcat version 7.0.63 to generate a build, and it translated and compiled
properly. But in case of 7.0.90, Jasper seems to be doing something else. 

Luckily for us, it was only a limited number of occurrences of the "org", so we
can change the scriptlet variable names to something else and make the whole
thing to work.

-- 
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


[Bug 62801] Unable to use local variable names like "org" in a JSP page scriptlet followed by a tag.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62801

Ajish Ulahannan <aj...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Unable to use local         |Unable to use local
                   |variable names like "org"   |variable names like "org"
                   |in a JSP page followed by a |in a JSP page scriptlet
                   |<jsp:include /> tag.        |followed by a <jsp:include
                   |                            |/> tag.

-- 
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


[Bug 62801] Unable to use local variable names like "org" in a JSP page scriptlet followed by a tag.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62801

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
The provided test case fails, as expected, with 7.0.63 as well.

*** This bug has been marked as a duplicate of bug 29718 ***

-- 
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