bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/TagLibraryInfoImpl.java
private String[] generateTLDLocation(String uri,
					 JspCompilationContext ctxt)
                throws JasperException {

	int uriType = TldScanner.uriType(uri);
	if (uriType == TldScanner.ABS_URI) {
	    err.jspError("jsp.error.taglibDirective.absUriCannotBeResolved",
			 uri);
	} else if (uriType == TldScanner.NOROOT_REL_URI) {
	    uri = ctxt.resolveRelativeUri(uri);
	}

	String[] location = new String[2];
	location[0] = uri;
	if (location[0].endsWith("jar")) {
	    URL url = null;
	    try {
		url = ctxt.getResource(location[0]);
	    } catch (Exception ex) {
		err.jspError("jsp.error.tld.unable_to_get_jar", location[0],
			     ex.toString());
	    }
	    if (url == null) {
		err.jspError("jsp.error.tld.missing_jar", location[0]);
	    }
	    location[0] = url.toString();
	    location[1] = "META-INF/taglib.tld";
	}

	return location;
    }
private String[] generateTLDLocation(String uri,
					 JspCompilationContext ctxt)
                throws JasperException {

	int uriType = TldScanner.uriType(uri);
	if (uriType == TldScanner.ABS_URI) {
	    err.jspError("jsp.error.taglibDirective.absUriCannotBeResolved",
			 uri);
	} else if (uriType == TldScanner.NOROOT_REL_URI) {
	    uri = ctxt.resolveRelativeUri(uri);
	}

	String[] location = new String[2];
	location[0] = uri;
	if (location[0].endsWith("jar")) {
	    URL url = null;
	    try {
		url = ctxt.getResource(location[0]);
	    } catch (Exception ex) {
		err.jspError("jsp.error.tld.unable_to_get_jar", location[0],
			     ex.toString());
	    }
	    if (url == null) {
		err.jspError("jsp.error.tld.missing_jar", location[0]);
	    }
	    location[0] = url.toString();
	    location[1] = "META-INF/taglib.tld";
	}

	return location;
    }
private String [ ] generateTLDLocation ( String uri , JspCompilationContext ctxt ) throws JasperException { int uriType = TldScanner . uriType ( uri ) ; if ( uriType == TldScanner . ABS_URI ) { err . jspError ( "jsp.error.taglibDirective.absUriCannotBeResolved" , uri ) ; } else if ( uriType == TldScanner . NOROOT_REL_URI ) { uri = ctxt . resolveRelativeUri ( uri ) ; } String [ ] location = new String [ 2 ] ; location [ 0 ] = uri ; if ( location [ 0 ] . endsWith ( "jar" ) ) { URL url = null ; try { url = ctxt . getResource ( location [ 0 ] ) ; } catch ( Exception ex ) { err . jspError ( "jsp.error.tld.unable_to_get_jar" , location [ 0 ] , ex . toString ( ) ) ; } if ( url == null ) { err . jspError ( "jsp.error.tld.missing_jar" , location [ 0 ] ) ; } location [ 0 ] = url . toString ( ) ; location [ 1 ] = "META-INF/taglib.tld" ; } return location ; }
/*
@param uri The uri of the TLD
@param ctxt The compilation context

@return String array whose first element denotes the path to the TLD.
If the path to the TLD points to a jar file, then the second element
denotes the name of the TLD entry in the jar file, which is hardcoded
to META-INF/taglib.tld.
/ * @param uri The uri of the TLD @param ctxt The compilation context