svn commit: r1095012 - in /tomcat/trunk: java/org/apache/jasper/compiler/TldLocationsCache.java java/org/apache/jasper/resources/LocalStrings.properties webapps/docs/changelog.xml
Author: markt Date: Tue Apr 19 10:41:29 2011 New Revision: 1095012 URL: http://svn.apache.org/viewvc?rev=1095012&view=rev Log: Log JARs scanned for TLDs where no TLD is found. Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java?rev=1095012&r1=1095011&r2=1095012&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java Tue Apr 19 10:41:29 2011 @@ -37,6 +37,8 @@ import org.apache.jasper.JasperException import org.apache.jasper.util.ExceptionUtils; import org.apache.jasper.xmlparser.ParserUtils; import org.apache.jasper.xmlparser.TreeNode; +import org.apache.juli.logging.Log; +import org.apache.juli.logging.LogFactory; import org.apache.tomcat.JarScanner; import org.apache.tomcat.JarScannerCallback; @@ -75,6 +77,8 @@ import org.apache.tomcat.JarScannerCallb public class TldLocationsCache { +private final Log log = LogFactory.getLog(TldLocationsCache.class); + /** * The types of URI one may specify for a tag library */ @@ -376,6 +380,7 @@ public class TldLocationsCache { JarFile jarFile = null; String resourcePath = conn.getJarFileURL().toString(); +boolean foundTld = false; try { conn.setUseCaches(false); jarFile = conn.getJarFile(); @@ -385,6 +390,7 @@ public class TldLocationsCache { String name = entry.getName(); if (!name.startsWith("META-INF/")) continue; if (!name.endsWith(".tld")) continue; +foundTld = true; InputStream stream = jarFile.getInputStream(entry); tldScanStream(resourcePath, name, stream); } @@ -397,6 +403,10 @@ public class TldLocationsCache { } } } +if (!foundTld) { +log.info(Localizer.getMessage("jsp.tldCache.noTldInJar", +resourcePath)); +} } /* Modified: tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties?rev=1095012&r1=1095011&r2=1095012&view=diff == --- tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/jasper/resources/LocalStrings.properties Tue Apr 19 10:41:29 2011 @@ -487,3 +487,5 @@ jsp.message.jsp_removed_idle=Removing id jsp.message.jsp_unload_check=Checking JSPs for unload in context [{0}], JSP count: {1} queue length: {2} xmlParser.skipBomFail=Failed to skip BOM when parsing XML input stream + +jsp.tldCache.noTldInJar=No TLD files were found in [{0}]. Consider adding the JAR to to the tomcat.util.scan.DefaultJarScanner.jarsToSkip in CATALINA_BASE/catalina.properties \ No newline at end of file Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1095012&r1=1095011&r2=1095012&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Apr 19 10:41:29 2011 @@ -111,6 +111,11 @@ Correct a regression in the fix for 49916 that resulted in JSPs being compiled twice rather than just once. (markt) + +Log JARs that are scanned for TLDs where no TLD is found so that users +can easily identify JARs that can be added to the list of JARs to skip. +(markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1095020 - in /tomcat/trunk: conf/catalina.properties webapps/docs/changelog.xml
Author: markt Date: Tue Apr 19 10:48:24 2011 New Revision: 1095020 URL: http://svn.apache.org/viewvc?rev=1095020&view=rev Log: Add some common JARs to the list of JARs to skip Modified: tomcat/trunk/conf/catalina.properties tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/conf/catalina.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/conf/catalina.properties?rev=1095020&r1=1095019&r2=1095020&view=diff == --- tomcat/trunk/conf/catalina.properties (original) +++ tomcat/trunk/conf/catalina.properties Tue Apr 19 10:48:24 2011 @@ -93,9 +93,9 @@ jasper.jar,jasper-el.jar,ecj-*.jar,\ tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\ tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\ commons-beanutils*.jar,commons-collections*.jar,commons-dbcp*.jar,\ -commons-digester*.jar,commons-fileupload*.jar,commons-logging*.jar,\ -commons-pool*.jar,\ -ant.jar,jmx.jar,jmx-tools.jar,\ +commons-digester*.jar,commons-fileupload*.jar,commons-io*.jar,\ +commons-logging*.jar,commons-math*.jar,commons-pool*.jar,\ +ant.jar,jmx.jar,hibernate*.jar,jmx-tools.jar,jta*.jar,log4j*.jar,slf4j*.jar\ xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\ dnsns.jar,ldapsec.jar,localedata.jar,sunjce_provider.jar,sunpkcs11.jar,tools.jar,\ apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,\ Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1095020&r1=1095019&r2=1095020&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Apr 19 10:48:24 2011 @@ -74,6 +74,11 @@ to MIME type mappings for MPEG 4 files. Based on a patch by Cédrik Lime. (markt) + +Add some additional common JARs that do not contain TLDs or web +fragments to the list of JARs to skip when scanning for TLDs and web +fragments. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1095026 - in /tomcat/trunk: java/org/apache/jasper/EmbeddedServletOptions.java java/org/apache/jasper/JspC.java java/org/apache/jasper/compiler/TldLocationsCache.java webapps/docs/changel
Author: markt Date: Tue Apr 19 11:14:04 2011 New Revision: 1095026 URL: http://svn.apache.org/viewvc?rev=1095026&view=rev Log: Use a single TLD location cache for a web application rather than one per JSP compilation to speed up JSP compilation. Modified: tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java tomcat/trunk/java/org/apache/jasper/JspC.java tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java?rev=1095026&r1=1095025&r2=1095026&view=diff == --- tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java (original) +++ tomcat/trunk/java/org/apache/jasper/EmbeddedServletOptions.java Tue Apr 19 11:14:04 2011 @@ -748,7 +748,7 @@ public final class EmbeddedServletOption // Setup the global Tag Libraries location cache for this // web-application. -tldLocationsCache = new TldLocationsCache(context); +tldLocationsCache = TldLocationsCache.getInstance(context); // Setup the jsp config info for this web app. jspConfig = new JspConfig(context); Modified: tomcat/trunk/java/org/apache/jasper/JspC.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1095026&r1=1095025&r2=1095026&view=diff == --- tomcat/trunk/java/org/apache/jasper/JspC.java (original) +++ tomcat/trunk/java/org/apache/jasper/JspC.java Tue Apr 19 11:14:04 2011 @@ -1436,7 +1436,7 @@ public class JspC implements Options { context =new JspCServletContext (new PrintWriter(System.out), new URL("file:" + uriRoot.replace('\\','/') + '/')); -tldLocationsCache = new TldLocationsCache(context); +tldLocationsCache = TldLocationsCache.getInstance(context); } catch (MalformedURLException me) { System.out.println("**" + me); } Modified: tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java?rev=1095026&r1=1095025&r2=1095026&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TldLocationsCache.java Tue Apr 19 11:14:04 2011 @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.jasper.compiler; import java.io.File; @@ -42,6 +41,7 @@ import org.apache.juli.logging.LogFactor import org.apache.tomcat.JarScanner; import org.apache.tomcat.JarScannerCallback; + /** * A container for all tag libraries that are defined "globally" * for the web application. @@ -77,7 +77,9 @@ import org.apache.tomcat.JarScannerCallb public class TldLocationsCache { -private final Log log = LogFactory.getLog(TldLocationsCache.class); +private static final Log log = LogFactory.getLog(TldLocationsCache.class); + +private static final String KEY = TldLocationsCache.class.getName(); /** * The types of URI one may specify for a tag library @@ -103,7 +105,7 @@ public class TldLocationsCache { */ private Hashtable mappings; -private boolean initialized; +private volatile boolean initialized; private ServletContext ctxt; /** Constructor. @@ -139,6 +141,24 @@ public class TldLocationsCache { } } + +/** + * Obtains the TLD location cache for the given {@link ServletContext} and + * creates one if one does not currently exist. + */ +public static synchronized TldLocationsCache getInstance( +ServletContext ctxt) { +if (ctxt == null) { +throw new IllegalArgumentException("ServletContext was null"); +} +TldLocationsCache cache = (TldLocationsCache) ctxt.getAttribute(KEY); +if (cache == null) { +cache = new TldLocationsCache(ctxt); +ctxt.setAttribute(KEY, cache); +} +return cache; +} + /** * Gets the 'location' of the TLD associated with the given taglib 'uri'. * @@ -189,7 +209,7 @@ public class TldLocationsCache { * wonderful arrangements present when Tomcat gets embedded. * */ -private void init() throws JasperException { +private synchronized void init() throws JasperException { if (initialized) return; try { tldScanWebXml(); Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/d
svn commit: r1095052 - /tomcat/trunk/java/org/apache/jasper/compiler/TextOptimizer.java
Author: markt Date: Tue Apr 19 11:44:12 2011 New Revision: 1095052 URL: http://svn.apache.org/viewvc?rev=1095052&view=rev Log: Minor optimisation reported by FindBugs Modified: tomcat/trunk/java/org/apache/jasper/compiler/TextOptimizer.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/TextOptimizer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/TextOptimizer.java?rev=1095052&r1=1095051&r2=1095052&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/TextOptimizer.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/TextOptimizer.java Tue Apr 19 11:44:12 2011 @@ -28,12 +28,13 @@ public class TextOptimizer { */ static class TextCatVisitor extends Node.Visitor { +private static final String EMPTY_TEXT = ""; + private Options options; private PageInfo pageInfo; private int textNodeCount = 0; private Node.TemplateText firstTextNode = null; private StringBuilder textBuffer; -private final String emptyText = ""; public TextCatVisitor(Compiler compiler) { options = compiler.getCompilationContext().getOptions(); @@ -82,7 +83,7 @@ public class TextOptimizer { public void visit(Node.TemplateText n) throws JasperException { if ((options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces()) && n.isAllSpace()) { -n.setText(emptyText); +n.setText(EMPTY_TEXT); return; } @@ -92,7 +93,7 @@ public class TextOptimizer { } else { // Append text to text buffer textBuffer.append(n.getText()); -n.setText(emptyText); +n.setText(EMPTY_TEXT); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1094069 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/ha/session/ java/org/apache/catalina/manager/ java/org/apache/catalina/session/ webapps/docs/
On 4/18/2011 4:39 AM, Mark Thomas wrote: On 18/04/2011 10:13, Remy Maucherat wrote: On Sat, 2011-04-16 at 22:25 +, ma...@apache.org wrote: Author: markt Date: Sat Apr 16 22:25:28 2011 New Revision: 1094069 URL: http://svn.apache.org/viewvc?rev=1094069&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51042 Don't trigger session creation listeners when changing the session ID during authentication. But the listeners have to be aware that the id changed. Why? I have checked the Servlet spec and I don't see any event defined for "session ID changed". I also don't see anything (although I may have missed it) that says the ID must be constant. Every logical application that uses the ID as a key, would like to know that the ID has changed since the key is no longer valid. Those apps would rely on some sort event that the key is no longer there. regardless of what the servlet spec says, it's seems logical. Filip - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1095136 - /tomcat/trunk/build.properties.default
Author: markt Date: Tue Apr 19 17:07:54 2011 New Revision: 1095136 URL: http://svn.apache.org/viewvc?rev=1095136&view=rev Log: Make use of commons-dbcp.version Modified: tomcat/trunk/build.properties.default Modified: tomcat/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=1095136&r1=1095135&r2=1095136&view=diff == --- tomcat/trunk/build.properties.default (original) +++ tomcat/trunk/build.properties.default Tue Apr 19 17:07:54 2011 @@ -139,9 +139,9 @@ tomcat-native.dll.i64=${tomcat-native.ho # - Commons DBCP, version 1.1 or later - commons-dbcp.version=1.4 -commons-dbcp.home=${base.path}/commons-dbcp-1.4-src -commons-dbcp-src.loc.1=${base-commons.loc.1}/dbcp/source/commons-dbcp-1.4-src.tar.gz -commons-dbcp-src.loc.2=${base-commons.loc.2}/dbcp/source/commons-dbcp-1.4-src.tar.gz +commons-dbcp.home=${base.path}/commons-dbcp-${commons-dbcp.version}-src +commons-dbcp-src.loc.1=${base-commons.loc.1}/dbcp/source/commons-dbcp-${commons-dbcp.version}-src.tar.gz +commons-dbcp-src.loc.2=${base-commons.loc.2}/dbcp/source/commons-dbcp-${commons-dbcp.version}-src.tar.gz # - Commons Pool, version 1.1 or later - commons-pool.home=${base.path}/commons-pool-1.5.5-src - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1095137 - /tomcat/trunk/build.properties.default
Author: markt Date: Tue Apr 19 17:09:04 2011 New Revision: 1095137 URL: http://svn.apache.org/viewvc?rev=1095137&view=rev Log: Parameterise commons-pool version Modified: tomcat/trunk/build.properties.default Modified: tomcat/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=1095137&r1=1095136&r2=1095137&view=diff == --- tomcat/trunk/build.properties.default (original) +++ tomcat/trunk/build.properties.default Tue Apr 19 17:09:04 2011 @@ -144,9 +144,10 @@ commons-dbcp-src.loc.1=${base-commons.lo commons-dbcp-src.loc.2=${base-commons.loc.2}/dbcp/source/commons-dbcp-${commons-dbcp.version}-src.tar.gz # - Commons Pool, version 1.1 or later - -commons-pool.home=${base.path}/commons-pool-1.5.5-src -commons-pool-src.loc.1=${base-commons.loc.1}/pool/source/commons-pool-1.5.5-src.tar.gz -commons-pool-src.loc.2=${base-commons.loc.2}/pool/source/commons-pool-1.5.5-src.tar.gz +commons-pool.version=1.5.5 +commons-pool.home=${base.path}/commons-pool-${commons-pool.version}-src +commons-pool-src.loc.1=${base-commons.loc.1}/pool/source/commons-pool-${commons-pool.version}-src.tar.gz +commons-pool-src.loc.2=${base-commons.loc.2}/pool/source/commons-pool-${commons-pool.version}-src.tar.gz # - NSIS, version 2.0 or later - nsis.home=${base.path}/nsis-2.46 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1095138 - in /tomcat/trunk: build.properties.default webapps/docs/changelog.xml
Author: markt Date: Tue Apr 19 17:11:42 2011 New Revision: 1095138 URL: http://svn.apache.org/viewvc?rev=1095138&view=rev Log: Update commons pool to 1.5.6 Modified: tomcat/trunk/build.properties.default tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/trunk/build.properties.default?rev=1095138&r1=1095137&r2=1095138&view=diff == --- tomcat/trunk/build.properties.default (original) +++ tomcat/trunk/build.properties.default Tue Apr 19 17:11:42 2011 @@ -144,7 +144,7 @@ commons-dbcp-src.loc.1=${base-commons.lo commons-dbcp-src.loc.2=${base-commons.loc.2}/dbcp/source/commons-dbcp-${commons-dbcp.version}-src.tar.gz # - Commons Pool, version 1.1 or later - -commons-pool.version=1.5.5 +commons-pool.version=1.5.6 commons-pool.home=${base.path}/commons-pool-${commons-pool.version}-src commons-pool-src.loc.1=${base-commons.loc.1}/pool/source/commons-pool-${commons-pool.version}-src.tar.gz commons-pool-src.loc.2=${base-commons.loc.2}/pool/source/commons-pool-${commons-pool.version}-src.tar.gz Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1095138&r1=1095137&r2=1095138&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Apr 19 17:11:42 2011 @@ -145,6 +145,9 @@ Clarify error messages in *.sh files to mention that if a script is not found it might be because execute permission is needed. (kkolinko) + +Update commons pool to 1.5.6. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Where is org.apache.tomcat.jdbc.pool.DataSourceFactory?
So, I'm investigating moving away from an oracleconnectionpool and using the tomcat connection pool. I followed the myriad of example for configuring the Resource in the server.xml. Found great info here (http://people.apache.org/~fhanik/tomcat/jdbc-pool.html) However, when I start tomcat, I get the following error: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.jdbc.pool DataSourceFactory] I'm using Tomcat 6.0 My config in server.xml is I get it, tomcat can't find the class. But WHY? I don't see anything in the documentation about adding extra .jar files. I've looked in the distrib and can find the golden .jar anyway. Can anyone tell me what I am doing wrong? Thanks! -- View this message in context: http://old.nabble.com/Where-is-org.apache.tomcat.jdbc.pool.DataSourceFactory--tp31436975p31436975.html Sent from the Tomcat - Dev mailing list archive at Nabble.com. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Where is org.apache.tomcat.jdbc.pool.DataSourceFactory?
On 20/04/2011 00:03, dunnlow wrote: > Can anyone tell me what I am doing wrong? Posting to the wrong list for a start. You want the users list, not the developers list. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org