luehe       2003/03/31 14:47:27

  Modified:    jasper2/src/share/org/apache/jasper/compiler Parser.java
  Log:
  Changed TLV invocation so that in the case where a single URI is
  mapped to more than one prefix, the prefix of the *first* URI must be
  used for the TLV invocation
  
  Revision  Changes    Path
  1.72      +18 -15    
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- Parser.java       31 Mar 2003 19:15:34 -0000      1.71
  +++ Parser.java       31 Mar 2003 22:47:27 -0000      1.72
  @@ -448,23 +448,26 @@
        String prefix = attrs.getValue("prefix");
        if (prefix != null) {
            if (uri != null) {
  -             // Errors to be checked in Validator
  -             String[] location = ctxt.getTldLocation(uri);
  -             taglibs.put(uri,
  -                         new TagLibraryInfoImpl(ctxt, parserController,
  -                                                prefix, uri, location,
  -                                                err));
  +             if (taglibs.get(uri) == null) {
  +                 String[] location = ctxt.getTldLocation(uri);
  +                 taglibs.put(uri,
  +                             new TagLibraryInfoImpl(ctxt, parserController,
  +                                                    prefix, uri, location,
  +                                                    err));
  +             }
                prefixMapper.put(prefix, uri);
            } else {
                String tagdir = attrs.getValue("tagdir");
                if (tagdir != null) {
                    String urnTagdir = URN_JSPTAGDIR + tagdir;
  -                 taglibs.put(urnTagdir,
  -                             new ImplicitTagLibraryInfo(ctxt,
  -                                                        parserController,
  -                                                        prefix, 
  -                                                        tagdir,
  -                                                        err));
  +                 if (taglibs.get(urnTagdir) == null) {
  +                     taglibs.put(urnTagdir,
  +                                 new ImplicitTagLibraryInfo(ctxt,
  +                                                            parserController,
  +                                                            prefix, 
  +                                                            tagdir,
  +                                                            err));
  +                 }
                    prefixMapper.put(prefix, urnTagdir);
                }
            }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to