bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java
private void parseTaglibDirective(Node parent) throws JasperException {

	Attributes attrs = parseAttributes();
	String uri = attrs.getValue("uri");
	String prefix = attrs.getValue("prefix");
	if (prefix != null) {
            Mark prevMark = pageInfo.getNonCustomTagPrefix(prefix);
            if (prevMark != null) {
                err.jspError(reader.mark(), "jsp.error.prefix.use_before_dcl",
                    prefix, prevMark.getFile(), "" + prevMark.getLineNumber());
            }
	    if (uri != null) {
		String uriPrev = pageInfo.getURI(prefix);
		if (uriPrev != null && !uriPrev.equals(uri)) {
		    err.jspError(reader.mark(), "jsp.error.prefix.refined",
			prefix, uri, uriPrev);
		}
                /* GlassFish 750
		if (pageInfo.getTaglib(uri) == null) {
		    String[] location = ctxt.getTldLocation(uri);
                    TagLibraryInfoImpl taglib = null;
                    try {
		        taglib = new TagLibraryInfoImpl(ctxt,
                                                        parserController,
                                                        prefix,
                                                        uri,
                                                        location,
                                                        err);
                    } catch (JasperException je) {
                        err.throwException(reader.mark(), je);
                    }
		    pageInfo.addTaglib(uri, taglib);
		}
                */
                // START GlassFish 750
                ConcurrentHashMap<String, TagLibraryInfoImpl> taglibs =
                    ctxt.getTaglibs();
                TagLibraryInfoImpl taglib = taglibs.get(uri);
                if (taglib == null) {
                    synchronized (taglibs) {
                        taglib = taglibs.get(uri);
                        if (taglib == null) {
                            String[] location = ctxt.getTldLocation(uri);
                            try {
                                taglib = new TagLibraryInfoImpl(
                                                        ctxt,
                                                        parserController,
                                                        prefix,
                                                        uri,
                                                        location,
                                                        err);
                            } catch (JasperException je) {
                                err.throwException(reader.mark(), je);
                            }
                            ctxt.addTaglib(uri, taglib);
                            pageInfo.addTaglib(uri, taglib);
                        }
                    }
                }
                if (pageInfo.getTaglib(uri) == null) {
                    pageInfo.addTaglib(uri,
                                       new TagLibraryInfoImpl(prefix,
                                                              uri,
                                                              taglib,
                                                              pageInfo));
                }
                // END GlassFish 750  
		pageInfo.addPrefixMapping(prefix, uri);
	    } else {
		String tagdir = attrs.getValue("tagdir");
		if (tagdir != null) {
		    String urnTagdir = URN_JSPTAGDIR + tagdir;
		    if (pageInfo.getTaglib(urnTagdir) == null) {
			pageInfo.addTaglib(urnTagdir,
					   new ImplicitTagLibraryInfo(
                                                   ctxt,
						   parserController,
						   prefix, 
						   tagdir,
						   err));
		    }
		    pageInfo.addPrefixMapping(prefix, urnTagdir);
		}
	    }
	}

	new Node.TaglibDirective(attrs, start, parent);
    }
private void parseTaglibDirective(Node parent) throws JasperException {

	Attributes attrs = parseAttributes();
	String uri = attrs.getValue("uri");
	String prefix = attrs.getValue("prefix");
	if (prefix != null) {
            Mark prevMark = pageInfo.getNonCustomTagPrefix(prefix);
            if (prevMark != null) {
                err.jspError(reader.mark(), "jsp.error.prefix.use_before_dcl",
                    prefix, prevMark.getFile(), "" + prevMark.getLineNumber());
            }
	    if (uri != null) {
		String uriPrev = pageInfo.getURI(prefix);
		if (uriPrev != null && !uriPrev.equals(uri)) {
		    err.jspError(reader.mark(), "jsp.error.prefix.refined",
			prefix, uri, uriPrev);
		}
                /* GlassFish 750
		if (pageInfo.getTaglib(uri) == null) {
		    String[] location = ctxt.getTldLocation(uri);
                    TagLibraryInfoImpl taglib = null;
                    try {
		        taglib = new TagLibraryInfoImpl(ctxt,
                                                        parserController,
                                                        prefix,
                                                        uri,
                                                        location,
                                                        err);
                    } catch (JasperException je) {
                        err.throwException(reader.mark(), je);
                    }
		    pageInfo.addTaglib(uri, taglib);
		}
                */
                // START GlassFish 750
                ConcurrentHashMap<String, TagLibraryInfoImpl> taglibs =
                    ctxt.getTaglibs();
                TagLibraryInfoImpl taglib = taglibs.get(uri);
                if (taglib == null) {
                    synchronized (taglibs) {
                        taglib = taglibs.get(uri);
                        if (taglib == null) {
                            String[] location = ctxt.getTldLocation(uri);
                            try {
                                taglib = new TagLibraryInfoImpl(
                                                        ctxt,
                                                        parserController,
                                                        prefix,
                                                        uri,
                                                        location,
                                                        err);
                            } catch (JasperException je) {
                                err.throwException(reader.mark(), je);
                            }
                            ctxt.addTaglib(uri, taglib);
                            pageInfo.addTaglib(uri, taglib);
                        }
                    }
                }
                if (pageInfo.getTaglib(uri) == null) {
                    pageInfo.addTaglib(uri,
                                       new TagLibraryInfoImpl(prefix,
                                                              uri,
                                                              taglib,
                                                              pageInfo));
                }
                // END GlassFish 750  
		pageInfo.addPrefixMapping(prefix, uri);
	    } else {
		String tagdir = attrs.getValue("tagdir");
		if (tagdir != null) {
		    String urnTagdir = URN_JSPTAGDIR + tagdir;
		    if (pageInfo.getTaglib(urnTagdir) == null) {
			pageInfo.addTaglib(urnTagdir,
					   new ImplicitTagLibraryInfo(
                                                   ctxt,
						   parserController,
						   prefix, 
						   tagdir,
						   err));
		    }
		    pageInfo.addPrefixMapping(prefix, urnTagdir);
		}
	    }
	}

	new Node.TaglibDirective(attrs, start, parent);
    }
private void parseTaglibDirective ( Node parent ) throws JasperException { Attributes attrs = parseAttributes ( ) ; String uri = attrs . getValue ( "uri" ) ; String prefix = attrs . getValue ( "prefix" ) ; if ( prefix != null ) { Mark prevMark = pageInfo . getNonCustomTagPrefix ( prefix ) ; if ( prevMark != null ) { err . jspError ( reader . mark ( ) , "jsp.error.prefix.use_before_dcl" , prefix , prevMark . getFile ( ) , "" + prevMark . getLineNumber ( ) ) ; } if ( uri != null ) { String uriPrev = pageInfo . getURI ( prefix ) ; if ( uriPrev != null && ! uriPrev . equals ( uri ) ) { err . jspError ( reader . mark ( ) , "jsp.error.prefix.refined" , prefix , uri , uriPrev ) ; } /* GlassFish 750
		if (pageInfo.getTaglib(uri) == null) {
		    String[] location = ctxt.getTldLocation(uri);
                    TagLibraryInfoImpl taglib = null;
                    try {
		        taglib = new TagLibraryInfoImpl(ctxt,
                                                        parserController,
                                                        prefix,
                                                        uri,
                                                        location,
                                                        err);
                    } catch (JasperException je) {
                        err.throwException(reader.mark(), je);
                    }
		    pageInfo.addTaglib(uri, taglib);
		}
                */ // START GlassFish 750 ConcurrentHashMap < String , TagLibraryInfoImpl > taglibs = ctxt . getTaglibs ( ) ; TagLibraryInfoImpl taglib = taglibs . get ( uri ) ; if ( taglib == null ) { synchronized ( taglibs ) { taglib = taglibs . get ( uri ) ; if ( taglib == null ) { String [ ] location = ctxt . getTldLocation ( uri ) ; try { taglib = new TagLibraryInfoImpl ( ctxt , parserController , prefix , uri , location , err ) ; } catch ( JasperException je ) { err . throwException ( reader . mark ( ) , je ) ; } ctxt . addTaglib ( uri , taglib ) ; pageInfo . addTaglib ( uri , taglib ) ; } } } if ( pageInfo . getTaglib ( uri ) == null ) { pageInfo . addTaglib ( uri , new TagLibraryInfoImpl ( prefix , uri , taglib , pageInfo ) ) ; } // END GlassFish 750   pageInfo . addPrefixMapping ( prefix , uri ) ; } else { String tagdir = attrs . getValue ( "tagdir" ) ; if ( tagdir != null ) { String urnTagdir = URN_JSPTAGDIR + tagdir ; if ( pageInfo . getTaglib ( urnTagdir ) == null ) { pageInfo . addTaglib ( urnTagdir , new ImplicitTagLibraryInfo ( ctxt , parserController , prefix , tagdir , err ) ) ; } pageInfo . addPrefixMapping ( prefix , urnTagdir ) ; } } } new Node . TaglibDirective ( attrs , start , parent ) ; }
/*
Parses a taglib directive with the following syntax:
Directive ::= ( S Attribute)*
/ * Parses a taglib directive with the following syntax : Directive :: = ( S Attribute ) *