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 2002/11/21 17:16:52 UTC

DO NOT REPLY [Bug 14741] New: - TagFiles with same name in different tag directories overwrite the generated java files

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=14741>.
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=14741

TagFiles with same name in different tag directories overwrite the generated java files

           Summary: TagFiles with same name in different tag directories
                    overwrite the generated java files
           Product: Tomcat 5
           Version: Nightly Build
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Jasper2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: backhous@us.ibm.com


Because the package name used for tagfile generated source is always the same
you will get collisions if you have two tag files with the same name but in 
different directories. 

Take the HelloWorld tagfile example in the jsp-examples war and change it to 
the following :

<%@ taglib prefix="mytag" tagdir="/WEB-INF/tags/test" %>
<%@ taglib prefix="mytag1" tagdir="/WEB-INF/tags" %>
<html>
  <head>
    <title>JSP 2.0 Examples - Hello World SimpleTag Handler</title>
  </head>
  <body>
    <h1>JSP 2.0 Examples - Hello World SimpleTag Handler</h1>
    <hr>
    <p>This tag handler simply echos "Hello, World!"  It's an example of
    a very basic SimpleTag handler with no body.</p>
    <br>
    <b><u>Result:</u></b>
    <mytag:helloWorld/>
    <mytag1:helloWorld/>
  </body>
</html>

Make a copy of the helloWorld.tag in WEB-INF/tags and copy it to 
WEB-INF/tags/test
change the test helloWorld.tag to this :

<%--
   - Copyright (c) 2002 The Apache Software Foundation.  All rights
   - reserved.
--%>
Hello, world Again!

When you run http://localhost:8080/jsp-examples/jsp2/simpletag/hello.jsp

You see this :

Result: Hello, world Again! Hello, world Again! 

In the working directory for the jsp-examples war there is only one copy of 
helloWorld.java found in the 
work\Standalone\localhost\jsp-examples\tagfiles\org\apache\jsp\tagfile 
directory.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>