ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/jasper/servlet/TldPreScanned.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/jasper/servlet/TldPreScanned.java
Status
scanned
Type
file
Name
TldPreScanned.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2222 (2.2 KB)
MD5
06f7c319ae45f8f6f947a87206dff8fc
SHA1
ae6c420cf9049d4b325b80d8643e94de6091e82b
SHA256
1797384c2571c3b28e96b93b85d72c2d2a97ca5585fe5a9280a26233c77ce3fd
SHA512

      
    
SHA1_git
aefc0f7e060b156afd6119bf51b263944da7202d
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
TldPreScanned.java | 2.2 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jasper.servlet; import java.net.URI; import java.net.URL; import java.util.Collection; import jakarta.servlet.ServletContext; import org.apache.jasper.compiler.Localizer; import org.apache.tomcat.util.descriptor.tld.TldResourcePath; public class TldPreScanned extends TldScanner { private final Collection<URL> preScannedURLs; public TldPreScanned(ServletContext context, boolean namespaceAware, boolean validation, boolean blockExternal, Collection<URL> preScannedTlds) { super(context, namespaceAware, validation, blockExternal); preScannedURLs = preScannedTlds; } @Override public void scanJars() { for (URL url : preScannedURLs) { String str = url.toExternalForm(); int a = str.indexOf("jar:"); int b = str.indexOf("!/"); if (a >= 0 && b > 0) { String fileUrl = str.substring(a + 4, b); String path = str.substring(b + 2); try { parseTld(new TldResourcePath(new URI(fileUrl).toURL(), null, path)); } catch (Exception e) { throw new IllegalStateException(e); } } else { throw new IllegalStateException(Localizer.getMessage("jsp.error.tld.url", str)); } } } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
48.18
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9