Re: [ANN] Apache Tomcat Native 1.1.27 released

2013-02-21 Thread Mladen Turk

On 02/20/2013 11:52 PM, Christopher Schultz wrote:

Henri,

On 2/14/13 4:14 AM, Henri Gomez wrote:

I build Tomcat Native on various machine, CentOS 5/6, openSUSE/SLES and
notice this error on CentOS 5.9 :


On CentOS 6.2:


Now, there are obviously a few differences between our two environments:
I'm building a vanilla x86_64 and it looks like you have an IA32
architecture with some i586 components (maybe just the JVM).



Didn't you follow the discussion?
He has CentOS  5.x and you have 6.x, so you have different apr version.
Anyhow this issues has been solved with BZ 54559 and r1446443



Regards
--
^TM

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



Re: [VOTE] Apache Tomcat Maven Plugin 2.1

2013-02-21 Thread Henri Gomez
[+1]

More than welcome !


2013/2/20 Olivier Lamy 

> Hi,
> I'd like to release Apache Tomcat Maven Plugin 2.1.
>
> 24 issues fixed (see changelog:
> http://tomcat.apache.org/maven-plugin-2.1/jira-report.html)
>
> Staging maven repository:
> https://repository.apache.org/content/repositories/orgapachetomcat-282/
>
> Source release files:
> https://dist.apache.org/repos/dist/dev/tomcat/maven-plugin/v2.1/
>
> Documentation site: http://tomcat.apache.org/maven-plugin-2.1/
>
> Vote open for 72H
>
> [+1]
> [0]
> [-1]
>
> Thanks
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


[Bug 54595] New: [embed] ClassNotFoundException while parsing web.xml

2013-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54595

Bug ID: 54595
   Summary: [embed] ClassNotFoundException while parsing web.xml
   Product: Tomcat 7
   Version: unspecified
  Hardware: All
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: karol.bucek+apa...@gmail.com
Classification: Unclassified

Created attachment 29975
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29975&action=edit
stack-trace.txt

reported on Grails for a quite a while thus it probably affects TC 6 as well :
http://jira.grails.org/browse/GRAILS-8302 the issue can be reproduced on
`tomcat.addWebapp('/sample', 'sample.war')` 

the sample app is https://github.com/grails-samples/grails-petclinic
(`./grailsw war`) here it is packed up
https://dl.dropbox.com/u/149718/petclinic-0.1.war

this occured on the mailing list as well
http://mail-archives.apache.org/mod_mbox/tomcat-users/201206.mbox/%3c26a7fc1339d50348898f6dffc9a96d9c098db...@mx14a.corp.emc.com%3E

-- 
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 54595] [embed] ClassNotFoundException while parsing web.xml

2013-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54595

--- Comment #1 from Karol Bucek  ---
Created attachment 29976
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29976&action=edit
web.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



svn commit: r1448679 - in /tomcat/trunk/java/org/apache/tomcat/util/http: CookieSupport.java Cookies.java

2013-02-21 Thread remm
Author: remm
Date: Thu Feb 21 15:22:42 2013
New Revision: 1448679

URL: http://svn.apache.org/r1448679
Log:
String unescaping modifies the buffer used for the cookie, and will corrupt the 
original cookie header
[visible when displaying them using getHeader]. Experiment with an option to 
preserve them. I don't think
this should be the default, as it is almost never useful, and can be a bit 
wasteful.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java
tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java?rev=1448679&r1=1448678&r2=1448679&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java Thu Feb 21 
15:22:42 2013
@@ -63,6 +63,12 @@ public final class CookieSupport {
 public static final boolean ALLOW_NAME_ONLY;
 
 /**
+ * If set to true, the cookie header will be preserved. In most cases 
+ * except debugging, this is not useful.
+ */
+public static final boolean PRESERVE_COOKIE_HEADER;
+
+/**
  * The list of separators that apply to version 0 cookies. To quote the
  * spec, these are comma, semi-colon and white-space. The HTTP spec
  * definition of linear white space is [CRLF] 1*( SP | HT )
@@ -100,6 +106,15 @@ public final class CookieSupport {
 Boolean.valueOf(alwaysAddExpires).booleanValue();
 }
 
+String preserveCookieHeader = System.getProperty(
+
"org.apache.tomcat.util.http.ServerCookie.PRESERVE_COOKIE_HEADER");
+if (preserveCookieHeader == null) {
+PRESERVE_COOKIE_HEADER = STRICT_SERVLET_COMPLIANCE;
+} else {
+PRESERVE_COOKIE_HEADER =
+Boolean.valueOf(preserveCookieHeader).booleanValue();
+}
+
 String  fwdSlashIsSeparator = System.getProperty(
 
"org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR");
 if (fwdSlashIsSeparator == null) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java?rev=1448679&r1=1448678&r2=1448679&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/Cookies.java Thu Feb 21 
15:22:42 2013
@@ -165,9 +165,18 @@ public final class Cookies {
 log.debug("Cookies: Parsing b[]: " + cookieValue.toString());
 }
 ByteChunk bc=cookieValue.getByteChunk();
-processCookieHeader( bc.getBytes(),
- bc.getOffset(),
- bc.getLength());
+if (CookieSupport.PRESERVE_COOKIE_HEADER) {
+int len = bc.getLength();
+if (len > 0) {
+byte[] buf = new byte[len];
+System.arraycopy(bc.getBytes(), bc.getOffset(), buf, 0, 
len);
+processCookieHeader(buf, 0, len);
+}
+} else {
+processCookieHeader( bc.getBytes(),
+bc.getOffset(),
+bc.getLength());
+}
 pos++;// search from the next position
 }
 }



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



JarScanning

2013-02-21 Thread Mark Thomas
An issue at work prompted me to take another look at this thread:
http://markmail.org/thread/qanw2psjsx32feek

There are some useful things there that I think it is worth following up on.

JRE JARs.
I think scanning of these should be made optional and disabled by
default. This will reduce the list of JARs we have to maintain in
jarsToSkip. I intend to implement this unless there are any objections.


jarsToScan
This is a little more complicated.
First of all, how does it work? The suggestion is:
- If jarsToScan matches, scan it
- else if jarsToSkip matches, skip it
- else scan it

Assuming that the above is acceptable, it would require the following:
a) three new system properties
 tomcat.util.scan.DefaultJarScanner.jarsToScan
 org.apache.catalina.startup.ContextConfig.jarsToScan
 org.apache.catalina.startup.TldConfig.jarsToScan
b)  add a parameter to JarScanner.scan()

There are a couple of issues here.

1. Backwards compatibility. Adding the parameter to JarScanner.scan()
will break any custom Jar scanners. Without that parameter it would not
be possible to have different jarsToScan for pluggability and TLDs.

2. (and an issue with the current code [1]). These settings are all
global rather than per web application. I would prefer that they were
per web application with defaults configured globally. It is complicated
by the fact that the JARs to skip/scan may vary depending on how the
JarScanner is used.

Thoughts?

Mark



[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=54083

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



svn commit: r1448714 - /tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java

2013-02-21 Thread markt
Author: markt
Date: Thu Feb 21 16:39:07 2013
New Revision: 1448714

URL: http://svn.apache.org/r1448714
Log:
whitespace

Modified:
tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java?rev=1448714&r1=1448713&r2=1448714&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/CookieSupport.java Thu Feb 21 
16:39:07 2013
@@ -63,7 +63,7 @@ public final class CookieSupport {
 public static final boolean ALLOW_NAME_ONLY;
 
 /**
- * If set to true, the cookie header will be preserved. In most cases 
+ * If set to true, the cookie header will be preserved. In most cases
  * except debugging, this is not useful.
  */
 public static final boolean PRESERVE_COOKIE_HEADER;



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



RE: JarScanning

2013-02-21 Thread Caldarale, Charles R
> From: Mark Thomas [mailto:ma...@apache.org] 
> Subject: JarScanning

> jarsToScan
> This is a little more complicated.
> First of all, how does it work? The suggestion is:
> - If jarsToScan matches, scan it
> - else if jarsToSkip matches, skip it
> - else scan it

>From the above, it looks like the only purpose of jarsToScan is to avoid 
>checking the jarsToSkip list.  Unless such checking is expensive, this seems 
>like an unnecessary complication.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



Re: JarScanning

2013-02-21 Thread Romain Manni-Bucau
Hi,

the best IMO would be to have a WEB-INF/tomcat.properties with the ability
to configure the scanner + its properties (thanks a prefix) from the webapp
itself

PS: META-INF/context.xml would work too but i'm not a fan of xml ;)

*Romain Manni-Bucau*
*Twitter: @rmannibucau *
*Blog: **http://rmannibucau.wordpress.com/*
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/2/21 Caldarale, Charles R 

> > From: Mark Thomas [mailto:ma...@apache.org]
> > Subject: JarScanning
>
> > jarsToScan
> > This is a little more complicated.
> > First of all, how does it work? The suggestion is:
> > - If jarsToScan matches, scan it
> > - else if jarsToSkip matches, skip it
> > - else scan it
>
> From the above, it looks like the only purpose of jarsToScan is to avoid
> checking the jarsToSkip list.  Unless such checking is expensive, this
> seems like an unnecessary complication.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail and
> its attachments from all computers.
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Re: JarScanning

2013-02-21 Thread Mark Thomas
On 21/02/2013 16:39, Caldarale, Charles R wrote:
>> From: Mark Thomas [mailto:ma...@apache.org] Subject: JarScanning
> 
>> jarsToScan This is a little more complicated. First of all, how
>> does it work? The suggestion is: - If jarsToScan matches, scan it -
>> else if jarsToSkip matches, skip it - else scan it
> 
> From the above, it looks like the only purpose of jarsToScan is to
> avoid checking the jarsToSkip list.  Unless such checking is
> expensive, this seems like an unnecessary complication.

It lets you do things like:
jarsToScan=foo-bar.jar
jarsToSkip=foo*.jar

Also you can whitelist rather than blacklist like this:
jarsToScan=foo.jar
jarsToSkip=*.jar


Mark

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



svn commit: r1448720 - in /tomcat/trunk/java/org/apache/tomcat/util/digester: CallParamRule.java SetPropertiesRule.java

2013-02-21 Thread markt
Author: markt
Date: Thu Feb 21 16:47:40 2013
New Revision: 1448720

URL: http://svn.apache.org/r1448720
Log:
Update Javadoc after recent pruning of unused code.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java
tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java?rev=1448720&r1=1448719&r2=1448720&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/digester/CallParamRule.java Thu 
Feb 21 16:47:40 2013
@@ -32,9 +32,6 @@ import org.xml.sax.Attributes;
  * See {@link #CallParamRule(int paramIndex, String attributeName)}
  * from current the element body
  * See {@link #CallParamRule(int paramIndex)}
- * from the top object on the stack.
- * See {@link #CallParamRule(int paramIndex, boolean fromStack)}
- * the current path being processed (separate Rule).
  * 
  * 
  */

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java?rev=1448720&r1=1448719&r2=1448720&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/digester/SetPropertiesRule.java 
Thu Feb 21 16:47:40 2013
@@ -26,12 +26,6 @@ import org.xml.sax.Attributes;
 /**
  * Rule implementation that sets properties on the object at the top of the
  * stack, based on attributes with corresponding names.
- *
- * This rule supports custom mapping of attribute names to property names.
- * The default mapping for particular attributes can be overridden by using
- * {@link #SetPropertiesRule(String[] attributeNames, String[] propertyNames)}.
- * This allows attributes to be mapped to properties with different names.
- * Certain attributes can also be marked to be ignored.
  */
 
 public class SetPropertiesRule extends Rule {



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



RE: JarScanning

2013-02-21 Thread Caldarale, Charles R
> From: Mark Thomas [mailto:ma...@apache.org] 
> Subject: Re: JarScanning

> > From the above, it looks like the only purpose of jarsToScan is to
> > avoid checking the jarsToSkip list.  Unless such checking is
> > expensive, this seems like an unnecessary complication.

> It lets you do things like:
> jarsToScan=foo-bar.jar
> jarsToSkip=foo*.jar

> Also you can whitelist rather than blacklist like this:
> jarsToScan=foo.jar
> jarsToSkip=*.jar

Didn't realize globbing was allowed; thanks for the clarification.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



Re: JarScanning

2013-02-21 Thread Rainer Jung
On 21.02.2013 17:34, Mark Thomas wrote:
> An issue at work prompted me to take another look at this thread:
> http://markmail.org/thread/qanw2psjsx32feek
> 
> There are some useful things there that I think it is worth following up on.
> 
> JRE JARs.
> I think scanning of these should be made optional and disabled by
> default. This will reduce the list of JARs we have to maintain in
> jarsToSkip. I intend to implement this unless there are any objections.
> 
> 
> jarsToScan
> This is a little more complicated.
> First of all, how does it work? The suggestion is:
> - If jarsToScan matches, scan it
> - else if jarsToSkip matches, skip it
> - else scan it

OK for me.

Note though, that the following will then not be covered: whitelist some
jars with few exceptions. E.g. you want all foo-*.jar scanned except for
foo-bar.jar.

As always in case of conflict if there's a fixed order between include
and exclude, some situations can not be mapped to a simple configuration.

That's the reason why e.g. httpd has an "allow", "deny" and "Order
allow,deny" or "Order deny,allow".

As long as one only needs one of the tokens, e.g. only jarsToScan
(whitelist) or jarsToSkip (blacklist), an order is not needed. That's
what is already enough in most cases.

> Assuming that the above is acceptable, it would require the following:
> a) three new system properties
>  tomcat.util.scan.DefaultJarScanner.jarsToScan
>  org.apache.catalina.startup.ContextConfig.jarsToScan
>  org.apache.catalina.startup.TldConfig.jarsToScan
> b)  add a parameter to JarScanner.scan()
> 
> There are a couple of issues here.
> 
> 1. Backwards compatibility. Adding the parameter to JarScanner.scan()
> will break any custom Jar scanners. Without that parameter it would not
> be possible to have different jarsToScan for pluggability and TLDs.

The joy of interface evolution.

It is a relatively young interface (didn't exist before TC 7), so some
instability is needed to let it mature.

Should we make the config in the signature more generic?

> 2. (and an issue with the current code [1]). These settings are all
> global rather than per web application. I would prefer that they were
> per web application with defaults configured globally. It is complicated
> by the fact that the JARs to skip/scan may vary depending on how the
> JarScanner is used.

Haven't thought about the implications, but yes, per webapp would be
good, if possible via context.xml.

Regards,

Rainer


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



Re: JarScanning

2013-02-21 Thread Nick Williams

On Feb 21, 2013, at 10:42 AM, Romain Manni-Bucau wrote:

> Hi,
> 
> the best IMO would be to have a WEB-INF/tomcat.properties with the ability
> to configure the scanner + its properties (thanks a prefix) from the webapp
> itself
> 
> PS: META-INF/context.xml would work too but i'm not a fan of xml ;)

My $0.02 here, as unbinding as it may be... :-)

I made the suggestion some time ago [1] to create support for a 
/WEB-INF/tomcat-web.xml file similar to the ones for GlassFish, WebLogic, 
WebSphere, Geronimo, [I could go on...] that provided the ability to customize 
the JSP compile level (1.6, 1.7, 1.8, etc.) and also to specify that Tomcat 
should precompile all JSPs as part of deploying the web app. Such a file could 
also be used for specifying jarsToSkip/jarsToScan properties. This could be 
useful for portability (our application at work has *.xml files for each major 
AS, but then have to tell our Tomcat-using customers how to change the compile 
level of their JSPs, which also affects any other applications that they are 
running). I was actually thinking lately about maybe implementing it myself 
(with feedback from y'all on design) and then offering a (albeit large) patch 
to resolve the suggestion.

Two opinions:

- It should be XML, not properties. I share Romain's general dislike for XML, 
but the advantage of using that over properties is that IDEs and other tools 
(possibly at application build time) can reference a schema and validate the 
validity of that schema, thereby ensuring ahead of time that they contents of 
it haven't been fat-fingered.

- It should be a separate XML file from /META-INF/context.xml. The possible 
applications of this file are huge and could continue to expand. The concept of 
the context.xml file has a specific relation to the Tomcat configuration, and I 
don't believe that we should have a bunch of properties that are only valid for 
applications and not for Tomcat globally muddying the concept of the 
context.xml file. Users could easily see compilerTargetVM, compilerSourceVM, 
precompileJsps, and/or jarsToSkip in an application's /META-INF/context.xml 
file and think those can also be copied to [Tomcat Home]/conf/context.xml and 
have an effect globally (when in reality they are configured elsewhere or not 
at all, as in the case of precompileJsps). I think the settings that only apply 
to an application and don't apply globally should be in a separate file, not in 
/META-INF/context.xml.

Like I said, just my $0.02.

[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=52924

> 
> 
> 
> 2013/2/21 Caldarale, Charles R 
> 
>>> From: Mark Thomas [mailto:ma...@apache.org]
>>> Subject: JarScanning
>> 
>>> jarsToScan
>>> This is a little more complicated.
>>> First of all, how does it work? The suggestion is:
>>> - If jarsToScan matches, scan it
>>> - else if jarsToSkip matches, skip it
>>> - else scan it
>> 
>> From the above, it looks like the only purpose of jarsToScan is to avoid
>> checking the jarsToSkip list.  Unless such checking is expensive, this
>> seems like an unnecessary complication.
>> 
>> - Chuck
>> 
>> 
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-mail and
>> its attachments from all computers.
>> 
>> 
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>> 
>> 



smime.p7s
Description: S/MIME cryptographic signature


svn commit: r1448826 - in /tomcat/trunk: conf/catalina.properties java/org/apache/tomcat/util/scan/StandardJarScanner.java webapps/docs/config/jar-scanner.xml

2013-02-21 Thread markt
Author: markt
Date: Thu Feb 21 22:07:45 2013
New Revision: 1448826

URL: http://svn.apache.org/r1448826
Log:
Disable scanning of the bootstrap classpath by default and remove the 
jarsToSkip entries that were added to achieve the same objective

Modified:
tomcat/trunk/conf/catalina.properties
tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
tomcat/trunk/webapps/docs/config/jar-scanner.xml

Modified: tomcat/trunk/conf/catalina.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/conf/catalina.properties?rev=1448826&r1=1448825&r2=1448826&view=diff
==
--- tomcat/trunk/conf/catalina.properties (original)
+++ tomcat/trunk/conf/catalina.properties Thu Feb 21 22:07:45 2013
@@ -87,9 +87,6 @@ shared.loader=
 # - Jasper JARs
 # - Tomcat JARs
 # - Common non-Tomcat JARs
-# - Sun JDK JARs
-# - OpenJDK JARs
-# - Apple JDK JARs
 tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
 bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
 annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
@@ -109,14 +106,6 @@ geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
 
ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
 jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\
 xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
-access-bridge.jar,access-bridge-32.jar,access-bridge-64.jar,\
-dnsns.jar,jaccess.jar,ldapsec.jar,localedata.jar,\
-sunjce_provider.jar,sunmscapi.jar,sunpkcs11.jar,jhall.jar,tools.jar,\
-sunec.jar,zipfs.jar,\
-gnome-java-bridge.jar,pulse-java.jar,\
-apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,\
-j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,\
-mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar,\
 junit.jar,junit-*.jar,ant-launcher.jar
 
 # Additional JARs (over and above the default JARs listed above) to skip when

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=1448826&r1=1448825&r2=1448826&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java Thu 
Feb 21 22:07:45 2013
@@ -110,6 +110,18 @@ public class StandardJarScanner implemen
 }
 
 /**
+ * Controls the testing of the bootstrap classpath which consists of the
+ * runtime classes provided by the JVM and any installed system extensions.
+ */
+private boolean scanBootstrapClassPath = false;
+public boolean isScanBootstrapClassPath() {
+return scanBootstrapClassPath;
+}
+public void setScanBootstrapClassPath(boolean scanBootstrapClassPath) {
+this.scanBootstrapClassPath = scanBootstrapClassPath;
+}
+
+/**
  * Scan the provided ServletContext and classloader for JAR files. Each JAR
  * file found will be passed to the callback handler to be processed.
  *
@@ -198,11 +210,17 @@ public class StandardJarScanner implemen
 log.trace(sm.getString("jarScan.classloaderStart"));
 }
 
+ClassLoader stopLoader = null;
+if (!scanBootstrapClassPath) {
+// Stop when we reach the bootstrap class loader
+stopLoader = ClassLoader.getSystemClassLoader().getParent();
+}
+
 // No need to scan the web application class loader - we have
 // already scanned WEB-INF/lib and WEB-INF/classes
 ClassLoader loader = classloader.getParent();
 
-while (loader != null) {
+while (loader != stopLoader) {
 if (loader instanceof URLClassLoader) {
 URL[] urls = ((URLClassLoader) loader).getURLs();
 for (int i=0; ihttp://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/jar-scanner.xml?rev=1448826&r1=1448825&r2=1448826&view=diff
==
--- tomcat/trunk/webapps/docs/config/jar-scanner.xml (original)
+++ tomcat/trunk/webapps/docs/config/jar-scanner.xml Thu Feb 21 22:07:45 2013
@@ -77,10 +77,12 @@
 
 
 
-  
-   If true, the full web application classpath, including the shared and
-   common classloaders will be scanned for Jar files in addition to the
-   web application. The default is true.
+  
+   If true, any directories found on the classpath will be checked to 
see
+   if are expanded Jar files. The default is false. Tomcat
+   determines if directory is an expanded JAR file by looking for a 
META-INF
+   sub-directory. Only if the META-INF sub-directory exists, is the
+   directory to be an expanded JAR file.
   
 
   
@@ -89,12 +91,17 @@
.jar. The default is false
   
 
-

svn commit: r1448831 - in /tomcat/tc7.0.x/trunk: ./ conf/catalina.properties java/org/apache/tomcat/util/scan/StandardJarScanner.java webapps/docs/changelog.xml webapps/docs/config/jar-scanner.xml

2013-02-21 Thread markt
Author: markt
Date: Thu Feb 21 22:15:06 2013
New Revision: 1448831

URL: http://svn.apache.org/r1448831
Log:
Disable scanning of the bootstrap classpath by default and remove the 
jarsToSkip entries that were added to achieve the same objective

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/conf/catalina.properties

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/jar-scanner.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1448826

Modified: tomcat/tc7.0.x/trunk/conf/catalina.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/conf/catalina.properties?rev=1448831&r1=1448830&r2=1448831&view=diff
==
--- tomcat/tc7.0.x/trunk/conf/catalina.properties (original)
+++ tomcat/tc7.0.x/trunk/conf/catalina.properties Thu Feb 21 22:15:06 2013
@@ -87,9 +87,6 @@ shared.loader=
 # - Jasper JARs
 # - Tomcat JARs
 # - Common non-Tomcat JARs
-# - Sun JDK JARs
-# - OpenJDK JARs
-# - Apple JDK JARs
 tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
 bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
 annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
@@ -109,14 +106,6 @@ geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
 
ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
 jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\
 xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
-access-bridge.jar,access-bridge-32.jar,access-bridge-64.jar,\
-dnsns.jar,jaccess.jar,ldapsec.jar,localedata.jar,\
-sunjce_provider.jar,sunmscapi.jar,sunpkcs11.jar,jhall.jar,tools.jar,\
-sunec.jar,zipfs.jar,\
-gnome-java-bridge.jar,pulse-java.jar,\
-apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,\
-j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,\
-mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar,\
 junit.jar,junit-*.jar,ant-launcher.jar
 
 # Additional JARs (over and above the default JARs listed above) to skip when

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java?rev=1448831&r1=1448830&r2=1448831&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java 
Thu Feb 21 22:15:06 2013
@@ -109,6 +109,18 @@ public class StandardJarScanner implemen
 }
 
 /**
+ * Controls the testing of the bootstrap classpath which consists of the
+ * runtime classes provided by the JVM and any installed system extensions.
+ */
+private boolean scanBootstrapClassPath = false;
+public boolean isScanBootstrapClassPath() {
+return scanBootstrapClassPath;
+}
+public void setScanBootstrapClassPath(boolean scanBootstrapClassPath) {
+this.scanBootstrapClassPath = scanBootstrapClassPath;
+}
+
+/**
  * Scan the provided ServletContext and classloader for JAR files. Each JAR
  * file found will be passed to the callback handler to be processed.
  *
@@ -184,7 +196,13 @@ public class StandardJarScanner implemen
 ClassLoader loader =
 Thread.currentThread().getContextClassLoader();
 
-while (loader != null) {
+ClassLoader stopLoader = null;
+if (!scanBootstrapClassPath) {
+// Stop when we reach the bootstrap class loader
+stopLoader = ClassLoader.getSystemClassLoader().getParent();
+}
+
+while (loader != stopLoader) {
 if (loader instanceof URLClassLoader) {
 URL[] urls = ((URLClassLoader) loader).getURLs();
 for (int i=0; ihttp://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1448831&r1=1448830&r2=1448831&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Feb 21 22:15:06 2013
@@ -72,6 +72,11 @@
 the class hierarchy that triggered the exception to the error message.
 (markt)
   
+  
+Add a new option to the standard JarScanner implementation
+(scanBootstrapClassPath) to control if the bootstrap
+classpath is scanned or not. By default, it will not be scanned. 
(markt)
+  
 
   
   

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/jar-scanner.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/jar-scanner.xml?rev=144883

[Bug 54596] New: Relative paths truncates last character of values

2013-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54596

Bug ID: 54596
   Summary: Relative paths truncates last character of values
   Product: Tomcat Connectors
   Version: 1.2.37
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: isapi
  Assignee: dev@tomcat.apache.org
  Reporter: br...@rmt.com.au
Classification: Unclassified

Hi Team,

Found the below issue on the following environment:
  Windows Server 2008 R2 Datacentee (64 bit)
  IIS 7.5 & Tomee 1.5.1
  isapi_redirect.dll 1.2.37 (64 bit)

Issue:  Utilising relative paths in properties file for the various
configuration files (log, workers.properties, uriworkermap.properties)
truncates last character of the string value.


ISAPI_REDIRECT.PROPERTIES
# Configuration file for the Jakarta ISAPI Redirector

# The path to the ISAPI Redirector Extension, relative to the website
# This must be in a virtual directory with execute privileges
extension_uri=/mywebapp/isapi_redirect.dll

# Full path to the log file for the ISAPI Redirector
log_file=jk_iis.log

# Log level (debug, info, warn, error or trace)
log_level=debug 

# Full path to the workers.properties file
worker_file=workers.properties

# Full path to the uriworkermap.properties file
worker_mount_file=uriworkermap.properties


... all files do exist in the same C:\Tomee\connectors\ folder.

If I specify absolute paths (C:\Tomee\connectors\uriworkermap.properties),
everything works fine.

If I use relative paths with log and config file outside of dll/properties
files folder, no log file generated making it difficult to debug.

If I use relative paths with all files in the same folder, a jk_iis.lo (missing
the g) file is created with the following output:

[Fri Feb 22 13:57:32.490 2013] [7920:7680] [debug] jk_set_time_fmt::jk_util.c
(461): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S.000 %Y] '
[Fri Feb 22 13:57:32.490 2013] [7920:7680] [info] init_jk::jk_isapi_plugin.c
(2690): Starting Jakarta/ISAPI/isapi_redirector/1.2.37
[Fri Feb 22 13:57:32.490 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2701): Detected IIS version 7.5
[Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2703): Using ini file C:\Tomee\connectors\isapi_redirect.properties.
[Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2709): Using log file C:\Tomee\connectors\jk_iis.lo.
[Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2710): Using log level 1.
[Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2711): Using log rotation time 0 seconds.
[Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2712): Using log file size 0 bytes.
[Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2714): Using extension uri /mywebapp/isapi_redirect.dll.
[Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2715): Using worker file C:\Tomee\connectors\workers.propertie.
[Fri Feb 22 13:57:32.505 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2716): Using worker mount file C:\Tomee\connectors\uriworkermap.propertie.
[Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2718): Using rewrite rule file .
[Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2720): Using uri select 3.
[Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2721): Using no chunked encoding.
[Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2723): Using notification event SF_NOTIFY_AUTH_COMPLETE (0x0400)
[Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2733): Using uri header TOMCATURI00018000:.
[Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2734): Using query header TOMCATQUERY00018000:.
[Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2735): Using worker header TOMCATWORKER00018000:.
[Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2736): Using worker index TOMCATWORKERIDX00018000:.
[Fri Feb 22 13:57:32.521 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2737): Using translate header TOMCATTRANSLATE00018000:.
[Fri Feb 22 13:57:32.536 2013] [7920:7680] [debug] init_jk::jk_isapi_plugin.c
(2738): Using a default of 250 connections per pool.
[Fri Feb 22 13:57:32.536 2013] [7920:7680] [error]
uri_worker_map_load::jk_uri_worker_map.c (1241): Failed to load uri_worker_map
file C:\Tomee\connectors\uriworkermap.propertie (errno=2, err=No such file or
directory).

Furthermore... if I use the following configuration:

##