TldLocation

2013-11-13 Thread Jeremy Boynes
On Nov 12, 2013, at 8:53 AM, Mark Thomas ma...@apache.org wrote:

 On 12/11/2013 15:27, Jeremy Boynes wrote:
 On Nov 12, 2013, at 5:00 AM, ma...@apache.org wrote:
 
 Author: markt Date: Tue Nov 12 13:00:03 2013 New Revision:
 1541041
 
 URL: http://svn.apache.org/r1541041 Log: Replace
 TldLocationsCache with the new TldCache that also caches the
 contents of the TLDs. This is the next step in the refactoring of
 TLD handling.
 
 How far do you intend to go with these changes? I was just starting
 to get back to them and don't want to conflict.
 
 I was planning on completing the removal of TldLocation. I'm currently
 working my way through understanding what that means.

I'd started by trying to remove the parsing code from TagLibraryInfoImpl, 
making a thin decorator for a TaglibXml that could be shared (given the 
TLIImpls are page/compilation specific due to both prefix and the reference to 
other TLIs). IIRC, that worked for tags but there was a coupling somewhere in 
the TagFileProcessor call used to populate the TagInfo for a tag file. I was 
trying to figure out why
ctxt.setTagFileJarResource(path, jar);
was needed in before calling it and how #46471 had been fixed.

In investigating, I was also tempted to try and separate the directive and load 
processing (visitors) in TagFileProcessor and see if there was a way to only do 
that once.

I should have more time to contribute over the next couple of weeks and could 
pick this up again if you've not got too far.

Cheers
Jeremy



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: TldLocation

2013-11-13 Thread Mark Thomas
On 13/11/2013 08:04, Jeremy Boynes wrote:
 On Nov 12, 2013, at 8:53 AM, Mark Thomas ma...@apache.org wrote:

 
 I was planning on completing the removal of TldLocation. I'm 
 currently working my way through understanding what that means.
 
 I'd started by trying to remove the parsing code from 
 TagLibraryInfoImpl, making a thin decorator for a TaglibXml that 
 could be shared (given the TLIImpls are page/compilation specific
 due to both prefix and the reference to other TLIs).

I was thinking along the same lines.

 IIRC, that worked for tags but there was a coupling somewhere in
 the TagFileProcessor call used to populate the TagInfo for a tag
 file. I was trying to figure out why
 ctxt.setTagFileJarResource(path, jar); was needed in before calling
 it and how #46471 had been fixed.

I hadn't got this far but good to have the pointer for when I do.

 In investigating, I was also tempted to try and separate the 
 directive and load processing (visitors) in TagFileProcessor and
 see if there was a way to only do that once.

That is probably more than I am likely to do.

 I should have more time to contribute over the next couple of
 weeks and could pick this up again if you've not got too far.

Great.

I'm currently looking at tracking changes so we can avoid re-scanning
the TLDs unless we have to. The tricky part is how this interacts with
the new resources implementation. The scanner returns URLs to TLDs but
the new resources implementation could map a resource with a higher
priority to the same location and with just the URL you have no way of
knowing this. You need to know the path to the resource in the web
application. I'm experimenting with having the scanner report the web
application path as well as the URL. I'm not entirely happy with what
I have at the moment. I'm thinking about a new JarScannerResult type
that encapsulates webapp path and URL but I haven't convinced myself
that is the right way to go yet.

Mark


 
 Cheers Jeremy
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1541440 - /tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java

2013-11-13 Thread markt
Author: markt
Date: Wed Nov 13 09:38:18 2013
New Revision: 1541440

URL: http://svn.apache.org/r1541440
Log:
Remove code that was written to avoid jndi:// URLs when accessing resources. It 
is no longer required as jndi:// URLs are no longer returned.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java?rev=1541440r1=1541439r2=1541440view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java Wed 
Nov 13 09:38:18 2013
@@ -154,14 +154,7 @@ public class StandardJarScanner implemen
 }
 URL url = null;
 try {
-// File URLs are always faster to work with so use them
-// if available.
-String realPath = context.getRealPath(path);
-if (realPath == null) {
-url = context.getResource(path);
-} else {
-url = (new File(realPath)).toURI().toURL();
-}
+url = context.getResource(path);
 process(scanType, callback, url, true);
 } catch (IOException e) {
 log.warn(sm.getString(jarScan.webinflibFail, url), 
e);



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1541453 - /tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java

2013-11-13 Thread markt
Author: markt
Date: Wed Nov 13 10:23:29 2013
New Revision: 1541453

URL: http://svn.apache.org/r1541453
Log:
Already have a reference to the JAR containing the tag so use it rather than 
looking it up again.

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java?rev=1541453r1=1541452r2=1541453view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java Wed Nov 
13 10:23:29 2013
@@ -517,7 +517,7 @@ class TagFileProcessor {
 
 Jar tagJar = null;
 if (tagFilePath.startsWith(/META-INF/)) {
-tagJar= compiler.getCompilationContext().getTldLocation(
+tagJar = compiler.getCompilationContext().getTldLocation(
 tagInfo.getTagLibrary().getURI()).getJar();
 }
 String wrapperUri;
@@ -562,7 +562,7 @@ class TagFileProcessor {
 JspServletWrapper tempWrapper = new JspServletWrapper(ctxt
 .getServletContext(), ctxt.getOptions(),
 tagFilePath, tagInfo, ctxt.getRuntimeContext(),
-ctxt.getTagFileJar(tagFilePath));
+tagJar);
 // Use same classloader and classpath for compiling tag 
files
 tempWrapper.getJspEngineContext().setClassLoader(
 ctxt.getClassLoader());



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1541457 - /tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java

2013-11-13 Thread markt
Author: markt
Date: Wed Nov 13 10:31:49 2013
New Revision: 1541457

URL: http://svn.apache.org/r1541457
Log:
ImplicitTagLibraryInfo represents an implicit tag library corresponding to the 
tag files in /WEB-INF/tags/ or a subdirectory of it so there is never a 
containing JAR file.

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java

Modified: 
tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java?rev=1541457r1=1541456r2=1541457view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ImplicitTagLibraryInfo.java 
Wed Nov 13 10:31:49 2013
@@ -197,7 +197,7 @@ class ImplicitTagLibraryInfo extends Tag
 tagInfo = TagFileProcessor.parseTagFileDirectives(pc,
 shortName,
 path,
-pc.getJspCompilationContext().getTagFileJar(path),
+null,
 this);
 } catch (JasperException je) {
 throw new RuntimeException(je.toString(), je);



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1541459 - /tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java

2013-11-13 Thread markt
Author: markt
Date: Wed Nov 13 10:41:13 2013
New Revision: 1541459

URL: http://svn.apache.org/r1541459
Log:
jndi URLs are no longer used in Tomcat

Modified:
tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java

Modified: tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java?rev=1541459r1=1541458r2=1541459view=diff
==
--- tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java Wed Nov 13 
10:41:13 2013
@@ -300,11 +300,6 @@ public class JspCompilationContext {
 // May not be in a JAR in some IDE environments
 result = context.getResource(canonicalURI(res));
 }
-} else if (res.startsWith(jar:jndi:)) {
-// This is a tag file packaged in a jar that is being checked
-// for a dependency
-result = new URL(res);
-
 } else {
 result = context.getResource(canonicalURI(res));
 }



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1541472 - in /tomcat/trunk/java/org/apache: jasper/compiler/TagLibraryInfoImpl.java tomcat/util/scan/JarFileUrlJar.java

2013-11-13 Thread markt
Author: markt
Date: Wed Nov 13 11:19:26 2013
New Revision: 1541472

URL: http://svn.apache.org/r1541472
Log:
Improve error reporting.
- Be more precise about the location of the file with the error
- Don't swallow exceptions

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java?rev=1541472r1=1541471r2=1541472view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java Wed 
Nov 13 11:19:26 2013
@@ -187,13 +187,13 @@ class TagLibraryInfoImpl extends TagLibr
 }
 } else {
 // Tag library is packaged in JAR file
+String uriExternal = jar.getJarFileURL().toExternalForm();
 try {
 in = jar.getInputStream(tldName);
-parseTLD(jar.getJarFileURL().toExternalForm(), in, jar);
+parseTLD(uriExternal + !/ + tldName, in, jar);
 } catch (Exception ex) {
-err.jspError(mark, jsp.error.tld.unable_to_read,
-jar.getJarFileURL().toExternalForm(), tldName,
-ex.toString());
+err.jspError(mark, ex, jsp.error.tld.unable_to_read,
+uriExternal, tldName, ex.toString());
 }
 }
 } finally {

Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java?rev=1541472r1=1541471r2=1541472view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java Wed Nov 13 
11:19:26 2013
@@ -78,7 +78,7 @@ public class JarFileUrlJar implements Ja
 if (entry == null) {
 return null;
 } else {
-return jarFile.getInputStream(entry);
+return new NonClosingJarInputStream(jarFile.getInputStream(entry));
 }
 }
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1541506 - /tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java

2013-11-13 Thread markt
Author: markt
Date: Wed Nov 13 12:41:35 2013
New Revision: 1541506

URL: http://svn.apache.org/r1541506
Log:
Don't close jar here - may need to read other files from the JAR.

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java?rev=1541506r1=1541505r2=1541506view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Wed Nov 
13 12:41:35 2013
@@ -23,7 +23,6 @@ import java.util.Stack;
 
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
-import org.apache.jasper.util.ExceptionUtils;
 import org.apache.jasper.xmlparser.XMLEncodingDetector;
 import org.apache.tomcat.util.scan.Jar;
 import org.xml.sax.Attributes;
@@ -240,14 +239,6 @@ class ParserController implements TagCon
 }
 }
 
-if (jar != null) {
-try {
-jar.close();
-} catch (Throwable t) {
-ExceptionUtils.handleThrowable(t);
-}
-}
-
 baseDirStack.pop();
 
 return parsedPage;



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1541515 - /tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java

2013-11-13 Thread markt
Author: markt
Date: Wed Nov 13 13:22:24 2013
New Revision: 1541515

URL: http://svn.apache.org/r1541515
Log:
Revert accidental commit in r1541472

Modified:
tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java?rev=1541515r1=1541514r2=1541515view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java Wed Nov 13 
13:22:24 2013
@@ -78,7 +78,7 @@ public class JarFileUrlJar implements Ja
 if (entry == null) {
 return null;
 } else {
-return new NonClosingJarInputStream(jarFile.getInputStream(entry));
+return jarFile.getInputStream(entry);
 }
 }
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1541538 - in /tomcat/trunk: java/org/apache/jasper/servlet/ java/org/apache/tomcat/ java/org/apache/tomcat/util/descriptor/tld/ java/org/apache/tomcat/util/descriptor/web/ java/org/apache

2013-11-13 Thread markt
Author: markt
Date: Wed Nov 13 14:52:53 2013
New Revision: 1541538

URL: http://svn.apache.org/r1541538
Log:
Make the web application path available to the TldResourcePath

Modified:
tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java
tomcat/trunk/java/org/apache/tomcat/JarScannerCallback.java
tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldResourcePath.java

tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback.java
tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
tomcat/trunk/test/org/apache/tomcat/util/descriptor/tld/TestTldParser.java

Modified: tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java?rev=1541538r1=1541537r2=1541538view=diff
==
--- tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java (original)
+++ tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java Wed Nov 13 
14:52:53 2013
@@ -176,9 +176,10 @@ public class TldScanner {
 if (resourcePath.endsWith(.jar)) {
 // if the path points to a jar file, the TLD is presumed to be
 // inside at META-INF/taglib.tld
-tldResourcePath = new TldResourcePath(url, 
META-INF/taglib.tld);
+tldResourcePath = new TldResourcePath(
+url, resourcePath, META-INF/taglib.tld);
 } else {
-tldResourcePath = new TldResourcePath(url);
+tldResourcePath = new TldResourcePath(url, resourcePath);
 }
 // parse TLD but store using the URI supplied in the descriptor
 TaglibXml tld = tldParser.parse(tldResourcePath);
@@ -235,7 +236,7 @@ public class TldScanner {
 
 private void parseTld(String resourcePath) throws IOException, 
SAXException {
 TldResourcePath tldResourcePath =
-new TldResourcePath(context.getResource(resourcePath));
+new TldResourcePath(context.getResource(resourcePath), 
resourcePath);
 parseTld(tldResourcePath);
 }
 
@@ -262,7 +263,8 @@ public class TldScanner {
 private boolean jarFound = false;
 
 @Override
-public void scan(JarURLConnection urlConn, boolean isWebapp) throws 
IOException {
+public void scan(JarURLConnection urlConn, String webappPath,
+boolean isWebapp) throws IOException {
 if (!jarFound) {
 jarFound = true;
 }
@@ -280,7 +282,7 @@ public class TldScanner {
 }
 found = true;
 TldResourcePath tldResourcePath =
-new TldResourcePath(jarURL, entryName);
+new TldResourcePath(jarURL, webappPath, entryName);
 try {
 parseTld(tldResourcePath);
 } catch (SAXException e) {
@@ -301,7 +303,8 @@ public class TldScanner {
 }
 
 @Override
-public void scan(File file, boolean isWebapp) throws IOException {
+public void scan(File file, final String webappPath, boolean isWebapp)
+throws IOException {
 if (!jarFound) {
 jarFound = true;
 }
@@ -320,7 +323,7 @@ public class TldScanner {
 
 try {
 URL url = file.toUri().toURL();
-TldResourcePath path = new TldResourcePath(url);
+TldResourcePath path = new TldResourcePath(url, 
webappPath);
 parseTld(path);
 tldFound = true;
 } catch (SAXException e) {

Modified: tomcat/trunk/java/org/apache/tomcat/JarScannerCallback.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/JarScannerCallback.java?rev=1541538r1=1541537r2=1541538view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/JarScannerCallback.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/JarScannerCallback.java Wed Nov 13 
14:52:53 2013
@@ -30,12 +30,13 @@ public interface JarScannerCallback {
  * A JAR was found (probably packaged in a WAR) and may be accessed for
  * further processing via the provided URL connection.
  *
- * @param urlConn   The connection to the identified JAR
- * @param isWebapp  Indicates if the JAR was found within a web 
application.
- *  If codefalse/code the JAR should be treated as
- *  being provided by the container
+ * @param urlConnThe connection to the identified JAR
+ * @param webappPath The path, if any, to the JAR within the web 
application
+ * @param isWebapp   Indicates if the JAR was found within a web
+ *

svn commit: r1541539 - in /tomcat/trunk/java/org/apache: jasper/ jasper/compiler/ tomcat/util/descriptor/tld/

2013-11-13 Thread markt
Author: markt
Date: Wed Nov 13 14:53:49 2013
New Revision: 1541539

URL: http://svn.apache.org/r1541539
Log:
Remove TldLocation

Removed:
tomcat/trunk/java/org/apache/jasper/compiler/TldLocation.java
Modified:
tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
tomcat/trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
tomcat/trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
tomcat/trunk/java/org/apache/jasper/compiler/TldCache.java
tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldResourcePath.java

Modified: tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java?rev=1541539r1=1541538r2=1541539view=diff
==
--- tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java (original)
+++ tomcat/trunk/java/org/apache/jasper/JspCompilationContext.java Wed Nov 13 
14:53:49 2013
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.jasper;
 
 import java.io.File;
@@ -37,11 +36,11 @@ import org.apache.jasper.compiler.JspRun
 import org.apache.jasper.compiler.JspUtil;
 import org.apache.jasper.compiler.Localizer;
 import org.apache.jasper.compiler.ServletWriter;
-import org.apache.jasper.compiler.TldLocation;
 import org.apache.jasper.servlet.JasperLoader;
 import org.apache.jasper.servlet.JspServletWrapper;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.descriptor.tld.TldResourcePath;
 import org.apache.tomcat.util.scan.Jar;
 
 /**
@@ -558,10 +557,8 @@ public class JspCompilationContext {
  * Returns null if the given uri is not associated with any tag library
  * 'exposed' in the web application.
  */
-public TldLocation getTldLocation(String uri) {
-TldLocation location =
-getOptions().getTldCache().getLocation(uri);
-return location;
+public TldResourcePath getTldResourcePath(String uri) {
+return getOptions().getTldCache().getTldResourcePath(uri);
 }
 
 /**

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java?rev=1541539r1=1541538r2=1541539view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java Wed Nov 
13 14:53:49 2013
@@ -31,6 +31,7 @@ import javax.xml.parsers.SAXParserFactor
 
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
+import org.apache.tomcat.util.descriptor.tld.TldResourcePath;
 import org.apache.tomcat.util.scan.Jar;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
@@ -1267,8 +1268,8 @@ class JspDocumentParser
 isPlainUri = true;
 }
 
-TldLocation location = ctxt.getTldLocation(uri);
-if (location != null || !isPlainUri) {
+TldResourcePath tldResourcePath = ctxt.getTldResourcePath(uri);
+if (tldResourcePath != null || !isPlainUri) {
 if (ctxt.getOptions().isCaching()) {
 result = ctxt.getOptions().getCache().get(uri);
 }
@@ -1286,7 +1287,7 @@ class JspDocumentParser
 pageInfo,
 prefix,
 uri,
-location,
+tldResourcePath,
 err,
 null);
 if (ctxt.getOptions().isCaching()) {

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1541539r1=1541538r2=1541539view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Wed Nov 13 
14:53:49 2013
@@ -29,6 +29,7 @@ import javax.servlet.jsp.tagext.TagLibra
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
 import org.apache.jasper.util.UniqueAttributesImpl;
+import org.apache.tomcat.util.descriptor.tld.TldResourcePath;
 import org.apache.tomcat.util.scan.Jar;
 import org.xml.sax.Attributes;
 import org.xml.sax.helpers.AttributesImpl;
@@ -406,9 +407,9 @@ class Parser implements TagConstants {
 

buildbot failure in ASF Buildbot on tomcat-trunk

2013-11-13 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/5215

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1541506
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





buildbot success in ASF Buildbot on tomcat-trunk

2013-11-13 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/5216

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1541539
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





[Bug 55772] Flushing AsyncContext response writer after ClientAbortException (BrokenPipe) causes request state to leak

2013-11-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55772

Seth P seth.pellegr...@jivesoftware.com changed:

   What|Removed |Added

 CC||seth.pellegrino@jivesoftwar
   ||e.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55772] Flushing AsyncContext response writer after ClientAbortException (BrokenPipe) causes request state to leak

2013-11-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55772

--- Comment #1 from Seth P seth.pellegr...@jivesoftware.com ---
From our analysis of the issue, the problem occurs because of
AbstractHttp11Processor's reentrancy via the Response object. From the
following stack trace:

java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:94)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:450)
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:123)
at
org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:94)
at
org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:174)
at
org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:163)
at
org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:242)
at
org.apache.coyote.http11.InternalNioOutputBuffer.flush(InternalNioOutputBuffer.java:94)
at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:793)
at org.apache.coyote.Response.action(Response.java:174)
at
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:359)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:326)
at org.apache.catalina.connector.CoyoteWriter.flush(CoyoteWriter.java:98)
...
application code
...
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at
org.apache.coyote.AbstractProtocol.AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

The key insight is that the
AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) frame near
the bottom is inside the same instance as the
AbstractHttp11Processor.action(AbstractHttp11Processor.java:793) frame near the
top. The latter sets the instance-level error flag as a result of the broken
pipe exception, causing the #process invocation to return SocketState.CLOSED.
Because the request is async, the CoyoteAdapter has not cleaned up the catalina
request in its finally block (the same object as referenced through
ADAPTER_NOTES as Todd describes), but the SocketState.CLOSED indicates to the
connection handler that the processor is ready for recycling (which does NOT
recycle the catalina request) and re-use.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1541787 - in /tomcat/taglibs/standard/trunk: build-tools/pom.xml compat/pom.xml impl/pom.xml jstlel/pom.xml pom.xml spec/pom.xml

2013-11-13 Thread jboynes
Author: jboynes
Date: Thu Nov 14 02:47:19 2013
New Revision: 1541787

URL: http://svn.apache.org/r1541787
Log:
[maven-release-plugin] prepare for next development iteration

Modified:
tomcat/taglibs/standard/trunk/build-tools/pom.xml
tomcat/taglibs/standard/trunk/compat/pom.xml
tomcat/taglibs/standard/trunk/impl/pom.xml
tomcat/taglibs/standard/trunk/jstlel/pom.xml
tomcat/taglibs/standard/trunk/pom.xml
tomcat/taglibs/standard/trunk/spec/pom.xml

Modified: tomcat/taglibs/standard/trunk/build-tools/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/build-tools/pom.xml?rev=1541787r1=1541786r2=1541787view=diff
==
--- tomcat/taglibs/standard/trunk/build-tools/pom.xml (original)
+++ tomcat/taglibs/standard/trunk/build-tools/pom.xml Thu Nov 14 02:47:19 2013
@@ -24,20 +24,20 @@
 parent
 groupIdorg.apache.taglibs/groupId
 artifactIdtaglibs-standard/artifactId
-version1.2.1/version
+version1.2.2-SNAPSHOT/version
 /parent
 
 artifactIdtaglibs-build-tools/artifactId
-version1.2.1/version
+version1.2.2-SNAPSHOT/version
 nameApache Standard Taglib Build Tools/name
 
 descriptionBuild tool settings common to all Standard Taglib 
modules/description
 
 scm
-
connectionscm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/build-tools/connection
-
developerConnectionscm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/build-tools
+
connectionscm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/build-tools/connection
+
developerConnectionscm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/build-tools
 /developerConnection
-
urlhttp://svn.apache.org/viewvc/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/build-tools/url
+
urlhttp://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/build-tools/url
 /scm
 
 /project

Modified: tomcat/taglibs/standard/trunk/compat/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/compat/pom.xml?rev=1541787r1=1541786r2=1541787view=diff
==
--- tomcat/taglibs/standard/trunk/compat/pom.xml (original)
+++ tomcat/taglibs/standard/trunk/compat/pom.xml Thu Nov 14 02:47:19 2013
@@ -24,11 +24,11 @@
 parent
 groupIdorg.apache.taglibs/groupId
 artifactIdtaglibs-standard/artifactId
-version1.2.1/version
+version1.2.2-SNAPSHOT/version
 /parent
 
 artifactIdtaglibs-standard-compat/artifactId
-version1.2.1/version
+version1.2.2-SNAPSHOT/version
 packagingbundle/packaging
 
 nameApache Standard Taglib 1.0 Compatibility/name
@@ -39,10 +39,10 @@
 /description
 
 scm
-
connectionscm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/compat/connection
-
developerConnectionscm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/compat
+
connectionscm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/compat/connection
+
developerConnectionscm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/compat
 /developerConnection
-
urlhttp://svn.apache.org/viewvc/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/compat/url
+
urlhttp://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/compat/url
 /scm
 
 developers
@@ -69,12 +69,12 @@
 dependency
 groupIdorg.apache.taglibs/groupId
 artifactIdtaglibs-standard-spec/artifactId
-version1.2.1/version
+version1.2.2-SNAPSHOT/version
 /dependency
 dependency
 groupIdorg.apache.taglibs/groupId
 artifactIdtaglibs-standard-impl/artifactId
-version1.2.1/version
+version1.2.2-SNAPSHOT/version
 /dependency
 
 dependency

Modified: tomcat/taglibs/standard/trunk/impl/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/pom.xml?rev=1541787r1=1541786r2=1541787view=diff
==
--- tomcat/taglibs/standard/trunk/impl/pom.xml (original)
+++ tomcat/taglibs/standard/trunk/impl/pom.xml Thu Nov 14 02:47:19 2013
@@ -24,11 +24,11 @@
 parent
 groupIdorg.apache.taglibs/groupId
 artifactIdtaglibs-standard/artifactId
-version1.2.1/version
+version1.2.2-SNAPSHOT/version
 /parent
 
 artifactIdtaglibs-standard-impl/artifactId
-version1.2.1/version
+version1.2.2-SNAPSHOT/version
 packagingbundle/packaging
 
 nameApache Standard Taglib Implementation/name
@@ -39,10 +39,10 @@
 /description
 
 scm
-

svn commit: r1541786 - /tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/

2013-11-13 Thread jboynes
Author: jboynes
Date: Thu Nov 14 02:47:18 2013
New Revision: 1541786

URL: http://svn.apache.org/r1541786
Log:
[maven-release-plugin]  copy for tag taglibs-standard-1.2.1

Added:
tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/
  - copied from r1541785, tomcat/taglibs/standard/trunk/


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1541785 - in /tomcat/taglibs/standard/trunk: build-tools/pom.xml compat/pom.xml impl/pom.xml jstlel/pom.xml pom.xml spec/pom.xml

2013-11-13 Thread jboynes
Author: jboynes
Date: Thu Nov 14 02:47:16 2013
New Revision: 1541785

URL: http://svn.apache.org/r1541785
Log:
[maven-release-plugin] prepare release taglibs-standard-1.2.1

Modified:
tomcat/taglibs/standard/trunk/build-tools/pom.xml
tomcat/taglibs/standard/trunk/compat/pom.xml
tomcat/taglibs/standard/trunk/impl/pom.xml
tomcat/taglibs/standard/trunk/jstlel/pom.xml
tomcat/taglibs/standard/trunk/pom.xml
tomcat/taglibs/standard/trunk/spec/pom.xml

Modified: tomcat/taglibs/standard/trunk/build-tools/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/build-tools/pom.xml?rev=1541785r1=1541784r2=1541785view=diff
==
--- tomcat/taglibs/standard/trunk/build-tools/pom.xml (original)
+++ tomcat/taglibs/standard/trunk/build-tools/pom.xml Thu Nov 14 02:47:16 2013
@@ -24,20 +24,20 @@
 parent
 groupIdorg.apache.taglibs/groupId
 artifactIdtaglibs-standard/artifactId
-version1.2.1-SNAPSHOT/version
+version1.2.1/version
 /parent
 
 artifactIdtaglibs-build-tools/artifactId
-version1.2.1-SNAPSHOT/version
+version1.2.1/version
 nameApache Standard Taglib Build Tools/name
 
 descriptionBuild tool settings common to all Standard Taglib 
modules/description
 
 scm
-
connectionscm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/build-tools/connection
-
developerConnectionscm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/build-tools
+
connectionscm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/build-tools/connection
+
developerConnectionscm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/build-tools
 /developerConnection
-
urlhttp://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/build-tools/url
+
urlhttp://svn.apache.org/viewvc/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/build-tools/url
 /scm
 
 /project

Modified: tomcat/taglibs/standard/trunk/compat/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/compat/pom.xml?rev=1541785r1=1541784r2=1541785view=diff
==
--- tomcat/taglibs/standard/trunk/compat/pom.xml (original)
+++ tomcat/taglibs/standard/trunk/compat/pom.xml Thu Nov 14 02:47:16 2013
@@ -24,11 +24,11 @@
 parent
 groupIdorg.apache.taglibs/groupId
 artifactIdtaglibs-standard/artifactId
-version1.2.1-SNAPSHOT/version
+version1.2.1/version
 /parent
 
 artifactIdtaglibs-standard-compat/artifactId
-version1.2.1-SNAPSHOT/version
+version1.2.1/version
 packagingbundle/packaging
 
 nameApache Standard Taglib 1.0 Compatibility/name
@@ -39,10 +39,10 @@
 /description
 
 scm
-
connectionscm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/compat/connection
-
developerConnectionscm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/trunk/compat
+
connectionscm:svn:http://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/compat/connection
+
developerConnectionscm:svn:https://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/compat
 /developerConnection
-
urlhttp://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/compat/url
+
urlhttp://svn.apache.org/viewvc/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1/compat/url
 /scm
 
 developers
@@ -69,12 +69,12 @@
 dependency
 groupIdorg.apache.taglibs/groupId
 artifactIdtaglibs-standard-spec/artifactId
-version1.2.1-SNAPSHOT/version
+version1.2.1/version
 /dependency
 dependency
 groupIdorg.apache.taglibs/groupId
 artifactIdtaglibs-standard-impl/artifactId
-version1.2.1-SNAPSHOT/version
+version1.2.1/version
 /dependency
 
 dependency

Modified: tomcat/taglibs/standard/trunk/impl/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/taglibs/standard/trunk/impl/pom.xml?rev=1541785r1=1541784r2=1541785view=diff
==
--- tomcat/taglibs/standard/trunk/impl/pom.xml (original)
+++ tomcat/taglibs/standard/trunk/impl/pom.xml Thu Nov 14 02:47:16 2013
@@ -24,11 +24,11 @@
 parent
 groupIdorg.apache.taglibs/groupId
 artifactIdtaglibs-standard/artifactId
-version1.2.1-SNAPSHOT/version
+version1.2.1/version
 /parent
 
 artifactIdtaglibs-standard-impl/artifactId
-version1.2.1-SNAPSHOT/version
+version1.2.1/version
 packagingbundle/packaging
 
 nameApache Standard Taglib Implementation/name
@@ -39,10 +39,10 @@
 /description
 
 scm
-

[VOTE] Release Apache Standard Taglib 1.2.1

2013-11-13 Thread Jeremy Boynes
I'd like to release Apache Standard Taglib 1.2.1. This is an update to the 
withdrawn 1.2.0, built with JDK 1.7.0_45 to address JavaDoc issues and 
incorporating feedback on the documentation.

Maven Staging Repository:
https://repository.apache.org/content/repositories/orgapachetomcat-132/

Source Distribution:
https://repository.apache.org/content/repositories/orgapachetomcat-132/org/apache/taglibs/taglibs-standard/1.2.1/

SVN tag:
https://svn.apache.org/repos/asf/tomcat/taglibs/standard/tags/taglibs-standard-1.2.1
 @ r1541786
https://svn.apache.org/r1541786

KEYS: https://svn.apache.org/repos/asf/tomcat/trunk/KEYS

The proposed 1.2.1 release is:
[ ] Broken - do not release
[ ] OK - release as 1.2.1

Thanks
Jeremy


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [VOTE] Release Apache Standard Taglib 1.2.1

2013-11-13 Thread Jeremy Boynes
On Nov 13, 2013, at 6:58 PM, Jeremy Boynes jboy...@apache.org wrote:
 
 The proposed 1.2.1 release is:
 [ ] Broken - do not release
 [X] OK - release as 1.2.1

Confirmed source distribution builds.
Confirmed JSTL TCK passes on Mac OSX 10.8.5, Java 1.6.0_65, Apache Tomcat 7.0.47

Thanks
Jeremy



signature.asc
Description: Message signed with OpenPGP using GPGMail


[Bug 55776] New: if path include relative char, eg: ../, classloader will not find zhe file

2013-11-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55776

Bug ID: 55776
   Summary: if path include relative char, eg: ../, classloader
will not find zhe file
   Product: Tomcat 8
   Version: 8.0.0-RC5
  Hardware: PC
OS: Windows Server 2003
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: labnizdi...@126.com

I use ibatis in my project, config file path include '..', tomcat can not find
the file, command line show:
Could not find resource ../ibatis/code/sendType.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org