Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 15797 invoked from network); 28 Oct 2002 19:26:05 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 28 Oct 2002 19:26:05 -0000 Received: (qmail 12757 invoked by uid 97); 28 Oct 2002 19:26:52 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 12741 invoked by uid 97); 28 Oct 2002 19:26:52 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 12730 invoked by uid 97); 28 Oct 2002 19:26:51 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: 28 Oct 2002 19:25:47 -0000 Message-ID: <20021028192547.96406.qmail@icarus.apache.org> From: luehe@apache.org To: jakarta-tomcat-jasper-cvs@apache.org Subject: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JspDocumentParser.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N luehe 2002/10/28 11:25:47 Modified: jasper2/src/share/org/apache/jasper/compiler JspDocumentParser.java Log: Added support for URIs of the form: urn:jsptagdir: Revision Changes Path 1.21 +50 -25 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java Index: JspDocumentParser.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- JspDocumentParser.java 22 Oct 2002 03:00:20 -0000 1.20 +++ JspDocumentParser.java 28 Oct 2002 19:25:47 -0000 1.21 @@ -87,6 +87,7 @@ private static final String XMLNS_JSP = "xmlns:jsp"; private static final String JSP_VERSION = "version"; private static final String URN_JSPTLD = "urn:jsptld:"; + private static final String URN_JSPTAGDIR = "urn:jsptagdir:"; private static final String LEXICAL_HANDLER_PROPERTY = "http://xml.org/sax/properties/lexical-handler"; @@ -505,7 +506,8 @@ } return new Node.CustomTag(attrs, start, qName, prefix, shortName, - tagInfo, tagFileInfo, tagHandlerClass, parent); + tagInfo, tagFileInfo, tagHandlerClass, + parent); } /* @@ -533,35 +535,58 @@ continue; } - // get the uri - String uri = attrs.getValue(i); - if (uri.startsWith(URN_JSPTLD)) { - // uri value is of the form "urn:jsptld:path" - uri = uri.substring(URN_JSPTLD.length()); - } - - TldLocationsCache cache - = ctxt.getOptions().getTldLocationsCache(); - TagLibraryInfo tl = cache.getTagLibraryInfo(uri); - if (tl == null) { - // get the location - String[] location = ctxt.getTldLocation(uri); - - tl = new TagLibraryInfoImpl(ctxt, parserController, prefix, - uri, location, err); - } if( taglibs.containsKey( prefix ) ) { // Prefix already in taglib map. throw new JasperException( err.getString( "jsp.error.xmlns.redefinition.notimplemented", prefix ) ); } - else { - taglibs.put(prefix, tl); - result.removeAttribute( i ); - } + + // get the uri + String uri = attrs.getValue(i); + + TagLibraryInfo tagLibInfo = null; + if (uri.startsWith(URN_JSPTAGDIR)) { + /* + * uri references tag file directory + * (is of the form "urn:jsptagdir:path") + */ + String tagdir = uri.substring(URN_JSPTAGDIR.length()); + tagLibInfo = new ImplicitTagLibraryInfo(ctxt, + parserController, + prefix, + tagdir, + err); + } else { + /* + * uri references TLD file + */ + if (uri.startsWith(URN_JSPTLD)) { + // uri is of the form "urn:jsptld:path" + uri = uri.substring(URN_JSPTLD.length()); + } + + TldLocationsCache cache + = ctxt.getOptions().getTldLocationsCache(); + tagLibInfo = cache.getTagLibraryInfo(uri); + if (tagLibInfo == null) { + // get the location + String[] location = ctxt.getTldLocation(uri); + + tagLibInfo = new TagLibraryInfoImpl(ctxt, + parserController, + prefix, + uri, + location, + err); + } + } + + taglibs.put(prefix, tagLibInfo); + result.removeAttribute( i ); } } + return result; } -- To unsubscribe, e-mail: For additional commands, e-mail: