svn commit: r1079675 - /tomcat/tc5.5.x/trunk/STATUS.txt

2011-03-08 Thread kfujino
Author: kfujino
Date: Wed Mar  9 06:23:31 2011
New Revision: 1079675

URL: http://svn.apache.org/viewvc?rev=1079675&view=rev
Log:
votes

Modified:
tomcat/tc5.5.x/trunk/STATUS.txt

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1079675&r1=1079674&r2=1079675&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Wed Mar  9 06:23:31 2011
@@ -42,7 +42,7 @@ PATCHES PROPOSED TO BACKPORT:
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48717
   Call sessionDidActivate when replicating sessions 
   https://issues.apache.org/bugzilla/attachment.cgi?id=26679
-  +1: markt
+  +1: markt, kfujino
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50189
@@ -58,17 +58,17 @@ PATCHES PROPOSED TO BACKPORT:
   the Manager application.
   Based on a patch by Stephane Bailliez.
   http://svn.apache.org/viewvc?rev=1075458&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, kfujino
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=27988
   Improve reporting of missing files
   http://svn.apache.org/viewvc?rev=1076212&view=rev
-  +1: markt
+  +1: markt, kfujino
   -1:
 
 * Fix possible threading issue in JSP compilation when development mode is
   enabled
   http://svn.apache.org/viewvc?rev=1078409&view=rev
-  +1: markt
+  +1: markt, kfujino
   -1:



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



Some remarks and observations from implementing disable "swallowAbortedUploads"

2011-03-08 Thread Rainer Jung

Hi all,

some things I noticed while implementing the new switch:

- o.a.c.connector.Request and Response hav methods finishRequest() resp. 
finishResponse(). The mehod in the request seems not to be called. 
Although that's not a big issue, because the omplementation is empty, 
one would run into trouble when starting to add code to it (at least I 
wondered why it wasn't working)


- Should we keep the swallow default in TC 7 (default is "do swallow", 
i.e. read all of the remaining bytes, thereby keeping the thread busy 
for a possibly long time but also keeping browsers happy which will 
otherwise most likely not read the response). I'd say "keep swallowing" 
but had the impression that Mark is more concerned about it and prefers 
the "do not swallow" default.


- Domain and path of the session cookie are listed in config/context.xml 
as configurable per context. The name is not listed, although the setter 
is there and the value is respected in ApplicationSessionCookieConfig. 
Is this an oversight? Should I add the name to the context parameter 
list in the docs?


Regards,

Rainer


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



svn commit: r1079671 - /tomcat/trunk/webapps/docs/config/context.xml

2011-03-08 Thread rjung
Author: rjung
Date: Wed Mar  9 05:38:23 2011
New Revision: 1079671

URL: http://svn.apache.org/viewvc?rev=1079671&view=rev
Log:
Docs: Move "allowCasualMultipartParsing",
"swallowAbortedUploads" and "swallowOutput"
from StandardContext to Context.

Modified:
tomcat/trunk/webapps/docs/config/context.xml

Modified: tomcat/trunk/webapps/docs/config/context.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1079671&r1=1079670&r2=1079671&view=diff
==
--- tomcat/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/trunk/webapps/docs/config/context.xml Wed Mar  9 05:38:23 2011
@@ -184,6 +184,17 @@
 
 
 
+  
+Set to true if Tomcat should automatically parse
+multipart/form-data request bodies when HttpServletRequest.getPart*
+or HttpServletRequest.getParameter* is called, even when the
+target servlet isn't marked with the @MultipartConfig annotation
+(See Servlet Specification 3.0, Section 3.2 for details).
+Note that any setting other than false causes Tomcat
+to behave in a way that is not technically spec-compliant.
+The default is false
+  
+
   
 This value represents the delay in seconds between the 
 invocation of the backgroundProcess method on this context and 
@@ -333,6 +344,33 @@
 file.
   
   
+  
+Set to false if Tomcat should not read any additional
+request body data for aborted uploads and instead abort the client
+connection. This setting is used in the following situations:
+
+the size of the request body is larger than the
+maxPostSize configured in the connector
+
+the size limit of a MultiPart upload is reached
+
+the servlet sets the response status to 413
+(Request Entity Too Large)
+
+
+Not reading the additional data will free the request processing thread
+more quickly. Unfortunately most HTTP clients will not read the 
response
+in case they can not write the full request.
+The default is true, so additional data is being 
read.
+  
+
+  
+If the value of this flag is true, the bytes output to
+System.out and System.err by the web application will be redirected to
+the web application logger. If not specified, the default value
+of the flag is false.
+  
+
   
 If the value of this flag is true, the TLD files
 XML validation will be namespace-aware.  If you turn this flag on,
@@ -434,17 +472,6 @@
 is un-deployed.
   
 
-  
-Set to true if Tomcat should automatically parse
-multipart/form-data request bodies when HttpServletRequest.getPart*
-or HttpServletRequest.getParameter* is called, even when the
-target servlet isn't marked with the @MultipartConfig annotation
-(See Servlet Specification 3.0, Section 3.2 for details).
-Note that any setting other than false causes Tomcat
-to behave in a way that is not technically spec-compliant.
-The default is false
-  
-
   
 If the value of this flag is true, symlinks will be
 allowed inside the web application, pointing to resources outside the
@@ -569,33 +596,6 @@
 default value of true will be used.
   
 
-  
-Set to false if Tomcat should not read any additional
-request body data for aborted uploads and instead abort the client
-connection. This setting is used in the following situations:
-
-the size of the request body is larger than the
-maxPostSize configured in the connector
-
-the size limit of a MultiPart upload is reached
-
-the servlet sets the response status to 413
-(Request Entity Too Large)
-
-
-Not reading the additional data will free the request processing thread
-more quickly. Unfortunately most HTTP clients will not read the 
response
-in case they can not write the full request.
-The default is true, so additional data is being 
read.
-  
-
-  
-If the value of this flag is true, the bytes output to
-System.out and System.err by the web application will be redirected to
-the web application logger. If not specified, the default value
-of the flag is false.
-  
-
   
 Number of ms that the container will wait for servlets to unload.
 If not specified, the default value is 2000 ms.



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



svn commit: r1079670 - /tomcat/tc6.0.x/trunk/STATUS.txt

2011-03-08 Thread kfujino
Author: kfujino
Date: Wed Mar  9 05:36:55 2011
New Revision: 1079670

URL: http://svn.apache.org/viewvc?rev=1079670&view=rev
Log:
my votes

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1079670&r1=1079669&r2=1079670&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Mar  9 05:36:55 2011
@@ -116,7 +116,7 @@ PATCHES PROPOSED TO BACKPORT:
   Ensure that the override attribute of context parameters is correctly
   followed.
   http://svn.apache.org/viewvc?rev=1070609&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, kfujino
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48863
@@ -131,25 +131,25 @@ PATCHES PROPOSED TO BACKPORT:
   the Manager application.
   Based on a patch by Stephane Bailliez.
   http://svn.apache.org/viewvc?rev=1075458&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, kfujino
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=27988
   Improve reporting of missing files
   http://svn.apache.org/viewvc?rev=1076212&view=rev
-  +1: markt
+  +1: markt, kfujino
   -1:
 
 * Fix possible threading issue in JSP compilation when development mode is
   enabled
   http://svn.apache.org/viewvc?rev=1078409&view=rev
-  +1: markt
+  +1: markt, kfujino
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50855
   Fix NPE on HttpServletRequest.logout() when debug logging is enabled.
   http://svn.apache.org/viewvc?rev=1078412&view=rev
-  +1: markt, kkolinko
+  +1: markt, kkolinko, kfujino
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48208



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



svn commit: r1079667 - /tomcat/trunk/webapps/docs/config/context.xml

2011-03-08 Thread rjung
Author: rjung
Date: Wed Mar  9 05:24:04 2011
New Revision: 1079667

URL: http://svn.apache.org/viewvc?rev=1079667&view=rev
Log:
Fix alphabetic order.

Modified:
tomcat/trunk/webapps/docs/config/context.xml

Modified: tomcat/trunk/webapps/docs/config/context.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1079667&r1=1079666&r2=1079667&view=diff
==
--- tomcat/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/trunk/webapps/docs/config/context.xml Wed Mar  9 05:24:04 2011
@@ -265,16 +265,6 @@
 the same attribute explicitly for the Context.
   
 
-  
-Set to true to allow this context to use container
-servlets, like the manager servlet. Use of the privileged
-attribute will change the context's parent class loader to be the
-Server class loader rather than the Shared class
-loader. Note that in a default installation, the Common class
-loader is used for both the Server and the Shared
-class loaders.
-  
-
   
 The context path of this web application, which is
 matched against the beginning of each request URI to select the
@@ -288,6 +278,16 @@
 filenames used for either the .xml context file or the docBase.
   
 
+  
+Set to true to allow this context to use container
+servlets, like the manager servlet. Use of the privileged
+attribute will change the context's parent class loader to be the
+Server class loader rather than the Shared class
+loader. Note that in a default installation, the Common class
+loader is used for both the Server and the Shared
+class loaders.
+  
+
   
 Set to true if you want Catalina to monitor classes in
 /WEB-INF/classes/ and /WEB-INF/lib for
@@ -356,18 +356,18 @@
 penalty.
   
 
-  
-Java class name of the org.apache.catalina.Wrapper
-implementation class that will be used for servlets managed by this
-Context.  If not specified, a standard default value will be used.
-  
-  
   
Should the HttpOnly flag be set on session cookies to prevent client
   side script from accessing the session ID? Defaults to
   true.
   
   
+  
+Java class name of the org.apache.catalina.Wrapper
+implementation class that will be used for servlets managed by this
+Context.  If not specified, a standard default value will be used.
+  
+  
   
 If the value of this flag is true, the validation of
 XML files will be namespace-aware.  If you turn this flag on,



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



svn commit: r1079666 - /tomcat/trunk/java/org/apache/catalina/Context.java

2011-03-08 Thread rjung
Author: rjung
Date: Wed Mar  9 05:21:34 2011
New Revision: 1079666

URL: http://svn.apache.org/viewvc?rev=1079666&view=rev
Log:
Consistent Ordering.
No functional change.

Modified:
tomcat/trunk/java/org/apache/catalina/Context.java

Modified: tomcat/trunk/java/org/apache/catalina/Context.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1079666&r1=1079665&r2=1079666&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Context.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Context.java Wed Mar  9 05:21:34 2011
@@ -90,17 +90,6 @@ public interface Context extends Contain
 // - Properties
 
 /**
- * Set to true to allow requests mapped to servlets that
- * do not explicitly declare @MultipartConfig or have
- *  specified in web.xml to parse
- * multipart/form-data requests.
- *
- * @param allowCasualMultipartParsing true to allow such
- *casual parsing, false otherwise.
- */
-public void setAllowCasualMultipartParsing(boolean 
allowCasualMultipartParsing);
-
-/**
  * Returns true if requests mapped to servlets without
  * "multipart config" to parse multipart/form-data requests anyway.
  *
@@ -110,23 +99,18 @@ public interface Context extends Contain
  */
 public boolean getAllowCasualMultipartParsing();
 
-/**
- * Set to false to disable request data swallowing
- * after an upload was aborted due to size constraints.
- *
- * @param swallowAbortedUploads false to disable
- *swallowing, true otherwise (default).
- */
-public void setSwallowAbortedUploads(boolean swallowAbortedUploads);
 
-/**
- * Returns true if remaining request data will be read
- * (swallowed) even the request violates a data size constraint.
+   /**
+ * Set to true to allow requests mapped to servlets that
+ * do not explicitly declare @MultipartConfig or have
+ *  specified in web.xml to parse
+ * multipart/form-data requests.
  *
- * @return true if data will be swallowed (default),
- *false otherwise.
+ * @param allowCasualMultipartParsing true to allow such
+ *casual parsing, false otherwise.
  */
-public boolean getSwallowAbortedUploads();
+public void setAllowCasualMultipartParsing(boolean 
allowCasualMultipartParsing);
+
 
 /**
  * Return the set of initialized application event listener objects,
@@ -529,6 +513,25 @@ public interface Context extends Contain
 
 
 /**
+ * Returns true if remaining request data will be read
+ * (swallowed) even the request violates a data size constraint.
+ *
+ * @return true if data will be swallowed (default),
+ *false otherwise.
+ */
+public boolean getSwallowAbortedUploads();
+
+
+/**
+ * Set to false to disable request data swallowing
+ * after an upload was aborted due to size constraints.
+ *
+ * @param swallowAbortedUploads false to disable
+ *swallowing, true otherwise (default).
+ */
+public void setSwallowAbortedUploads(boolean swallowAbortedUploads);
+
+/**
  * Return the value of the swallowOutput flag.
  */
 public boolean getSwallowOutput();



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



Re: svn commit: r1079444 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/

2011-03-08 Thread Rainer Jung

On 08.03.2011 23:37, Mark Thomas wrote:

On 08/03/2011 17:18, rj...@apache.org wrote:


Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1079444&r1=1079443&r2=1079444&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Tue Mar  8 
17:18:16 2011



@@ -2450,6 +2453,16 @@ public class Request
  return (inputBuffer.available()>  0);
  }

+/**
+ * Disable swallowing of remaining input if configured
+ */
+protected void disableSwallowInput() {
+Context context = getContext();
+if (context != null&&  !context.getSwallowAbortedUploads()) {
+coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
+}
+}
+



This method name confused me the first time I read the code.
checkSwallowInput() might be a better name


Done in r1079665.

Rainer

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



svn commit: r1079665 - /tomcat/trunk/java/org/apache/catalina/connector/Request.java

2011-03-08 Thread rjung
Author: rjung
Date: Wed Mar  9 05:05:36 2011
New Revision: 1079665

URL: http://svn.apache.org/viewvc?rev=1079665&view=rev
Log:
Rename new method.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Request.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1079665&r1=1079664&r2=1079665&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Wed Mar  9 
05:05:36 2011
@@ -2456,7 +2456,7 @@ public class Request
 /**
  * Disable swallowing of remaining input if configured
  */
-protected void disableSwallowInput() {
+protected void checkSwallowInput() {
 Context context = getContext();
 if (context != null && !context.getSwallowAbortedUploads()) {
 coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
@@ -2633,7 +2633,7 @@ public class Request
 } catch (InvalidContentTypeException e) {
 partsParseException = new ServletException(e);
 } catch (FileUploadBase.SizeException e) {
-disableSwallowInput();
+checkSwallowInput();
 partsParseException = new IllegalStateException(e);
 } catch (FileUploadException e) {
 partsParseException = new IOException(e);
@@ -2859,7 +2859,7 @@ public class Request
 context.getLogger().debug(
 sm.getString("coyoteRequest.postTooLarge"));
 }
-disableSwallowInput();
+checkSwallowInput();
 return;
 }
 byte[] formData = null;
@@ -2937,7 +2937,7 @@ public class Request
 if (connector.getMaxPostSize() > 0 &&
 (body.getLength() + len) > connector.getMaxPostSize()) {
 // Too much data
-disableSwallowInput();
+checkSwallowInput();
 throw new IllegalArgumentException(
 sm.getString("coyoteRequest.chunkedPostTooLarge"));
 }



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



DO NOT REPLY [Bug 50883] StackOverflowError

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50883

Ashish  changed:

   What|Removed |Added

   Keywords||ErrorMessage
URL||https://issues.apache.org/b
   ||ugzilla/show_bug.cgi?id=508
   ||83

--- Comment #2 from Ashish  2011-03-08 22:56:33 EST 
---
Mark thanks for your response. 

I have used following kinda methods at many places in my app.

protected void logUserDetails(HttpServletRequest request){
 request.setAttribute("APP_ID", "myappid");
}

But surprisingly this StackOverflowError is coming randomly around 3 times in a
month and   these methods are serving fine to rest all request with out any
StackOverFlowError. SO here am looking for your help to understand in which
scenario this request object becoming an instance of ServletRequestWrapper and
undergoing that recursion.

Also one more doubt I have, are we not suppose to call the setAttribute() and
getAttribute() methods of  ServletRequestWrapper.


(In reply to comment #1)
> Looks like something in your app is calling setRequest() on a wrapper and
> passing in the wrapper rather than the request to be wrapped. The Servlet
> specification does not provide for throwing an exception in this case. I'll 
> add
> that to my list of things to raise for the next version of the spec.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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: r1079640 - in /tomcat/site/trunk: docs/migration.html xdocs/migration.xml

2011-03-08 Thread kkolinko
Author: kkolinko
Date: Wed Mar  9 02:03:38 2011
New Revision: 1079640

URL: http://svn.apache.org/viewvc?rev=1079640&view=rev
Log:
In the Migration Guide for 5.5 > 6.0 migration,
Provide more details on the logging package being renamed.
Explicitly mention commons-logging.jar is a separate section.

Modified:
tomcat/site/trunk/docs/migration.html
tomcat/site/trunk/xdocs/migration.xml

Modified: tomcat/site/trunk/docs/migration.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration.html?rev=1079640&r1=1079639&r2=1079640&view=diff
==
--- tomcat/site/trunk/docs/migration.html (original)
+++ tomcat/site/trunk/docs/migration.html Wed Mar  9 02:03:38 2011
@@ -224,7 +224,10 @@
 Modified classloading
 
 
-Logging API package renaming
+Internal Logging API package 
renaming
+
+
+commons-logging.jar
 
 
 SSLEnabled attribute on 
Connector
@@ -567,11 +570,11 @@ problems.
 
 
 
-
+
 
 
-
-Logging API package renaming
+
+Internal Logging API package renaming
 
 
 
@@ -580,16 +583,57 @@ problems.
 
 
 
-Commons-logging was package renamed to 
org.apache.juli.logging
-so that application logging can be as independent as possible from the
-container, while still having the possibility of being unified. This 
change is
-transparent when using java.logging, but requires compilation of the extra
-components when using log4j for Tomcat's logging. See the logging and 
extras
+Apache Tomcat 5.5.x relied on the
+http://commons.apache.org/logging/";>Apache Commons Logging
+library for its internal logging. Apache Tomcat 6.0.x and later no more
+uses the library directly, but uses a private copy of it. The classes are
+in the org.apache.juli.logging package.
+
+
+The rationale behind this change is that so that application logging
+can be as independent as possible from the container, while still having
+the possibility of being unified.
+
+By default only a subset of Apache Commons Logging classes that are
+needed to perform logging to java.util.logging is included
+with Tomcat. If you want to configure Tomcat to redirect its logging into
+http://logging.apache.org/log4j/";>Log4J, or any other logging
+framework supported by the full Apache Commons Logging library, you will
+have to replace one of Tomcat JARs with the full implementation. The JAR
+is available as an extras component. See the logging and extras
 documentation for more details.
 
-The commons-logging-api.jar library is no longer provided
-by Tomcat. The web applications have to provide their own copy of that
-library, if needed
+  
+
+
+
+
+
+
+
+
+
+  
+
+
+
+
+commons-logging.jar
+
+
+
+
+
+
+
+
+As Apache Tomcat no longer directly uses the
+http://commons.apache.org/logging/";>Apache Commons Logging
+library, the commons-logging-api.jar library is no longer
+provided for the web applications. The web applications that use
+Apache Commons Logging have to provide their own copy of that library.
+It is recommended to put it into their WEB-INF/lib directory,
+like any other JAR.
 
   
 

Modified: tomcat/site/trunk/xdocs/migration.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/migration.xml?rev=1079640&r1=1079639&r2=1079640&view=diff
==
--- tomcat/site/trunk/xdocs/migration.xml (original)
+++ tomcat/site/trunk/xdocs/migration.xml Wed Mar  9 02:03:38 2011
@@ -108,18 +108,39 @@ problems.
 
   
 
-  
+  
 
-Commons-logging was package renamed to 
org.apache.juli.logging
-so that application logging can be as independent as possible from the
-container, while still having the possibility of being unified. This 
change is
-transparent when using java.logging, but requires compilation of the extra
-components when using log4j for Tomcat's logging. See the logging and 
extras
+Apache Tomcat 5.5.x relied on the
+http://commons.apache.org/logging/";>Apache Commons Logging
+library for its internal logging. Apache Tomcat 6.0.x and later no more
+uses the library directly, but uses a private copy of it. The classes are
+in the org.apache.juli.logging package.
+
+
+The rationale behind this change is that so that application logging
+can be as independent as possible from the container, while still having
+the possibility of being unified.
+
+By default only a subset of Apache Commons Logging classes that are
+needed to perform logging to java.util.logging is included
+with Tomcat. If you want to configure Tomcat to redirect its logging into
+http://logging.apache.org/log4j/";>Log4J, or any other logging
+framework supported by the full Apache Commons Logging library, you will
+have to replace one of Tomcat JARs with the full implementation. The JAR
+is available as an extras com

svn commit: r1079636 - in /tomcat/site/trunk: docs/migration.html xdocs/migration.xml

2011-03-08 Thread kkolinko
Author: kkolinko
Date: Wed Mar  9 01:38:16 2011
New Revision: 1079636

URL: http://svn.apache.org/viewvc?rev=1079636&view=rev
Log:
Rewrote the "Modified directory structure" and "Modified classloading" 
subsections of 5.5->6.0 migration in the Migration Guide.

Modified:
tomcat/site/trunk/docs/migration.html
tomcat/site/trunk/xdocs/migration.xml

Modified: tomcat/site/trunk/docs/migration.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration.html?rev=1079636&r1=1079635&r2=1079636&view=diff
==
--- tomcat/site/trunk/docs/migration.html (original)
+++ tomcat/site/trunk/docs/migration.html Wed Mar  9 01:38:16 2011
@@ -208,6 +208,17 @@
 
 
 Modified directory structure
+
+
+Shared libraries
+
+
+Endorsed libraries
+
+
+Default web applications
+
+
 
 
 Modified classloading
@@ -387,20 +398,126 @@ problems.
 
 
 
+
+
+
+
+
+
+
+
+Shared libraries
+
+
+
+
+
+
+
+
 Apache Tomcat 5.5.x used, by default, a directory structure including
 common, shared and server 
subdirectories.
-Apache Tomcat 6.0.x merges these into a single lib directory.
-The conf/catalina.properties file can be used to modify
+Apache Tomcat 6.0.x uses a single lib directory.
+
+The lib directory is the direct replacement for both
+common/lib and common/classes subdirectories:
+it accepts both JARs and exploded class hierarchies.
+
+The conf/catalina.properties file can be used to modify
 the directory structure.
 
-In addition, all of the default web applications are located in the
-webapps folder.
+Starting with version 6.0.21, Apache Tomcat supports both the
+$CATALINA_BASE/lib and $CATALINA_HOME/lib
+directories. The jars and classes in $CATALINA_BASE/lib
+are earlier on the class path and thus take precedence.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Endorsed libraries
+
+
+
+
+
+
+
+
+The $CATALINA_HOME/common/endorsed subdirectory is replaced
+by the $CATALINA_HOME/endorsed directory. This directory is
+absent by default.
+
+The JAVA_ENDORSED_DIRS environment variable can be used
+with catalina.bat|sh scripts to provide alternative location of this
+directory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Default web applications
+
+
+
+
+
+
+
+
+The Manager and Host Manager web applications are no longer in
+server/webapps. All of the default web applications
+are now located in the webapps directory.
+
+Note, that if deployOnStartup or autoDeploy
+options on the Host are enabled, the
+META-INF/context.xml files of manager and host-manager
+applications will be copied into the
+$CATALINA_BASE/conf/[engine_name]/[host_name]
+directory when Tomcat starts for the first time.
 
 When using a shared webhosting environment, it is recommended to forbid
-the use of context.xml inside the WAR files (using the 
deployXML
-attribute of the Host element).
+the use of context.xml inside the web applications (using the
+deployXML attribute of the Host element).
 (This option is also available in Tomcat 5.5).
 
+
+
+
+
+
+
+
+
+
+
   
 
 
@@ -430,8 +547,10 @@ problems.
 
 As a result of the modification of the directory structure, the
 common, shared and server classloaders have been merged into one.
-The lib folder accepts both exploded class hierarchies and JARs.
-This behavior and structure can be modified using the 
+Effectively, the shared and server classloaders are not configured by
+default and the common classloader is mapped to the lib
+directory, as described above.
+This behavior and structure can be modified using the 
 conf/catalina.properties file.
 
   

Modified: tomcat/site/trunk/xdocs/migration.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/migration.xml?rev=1079636&r1=1079635&r2=1079636&view=diff
==
--- tomcat/site/trunk/xdocs/migration.xml (original)
+++ tomcat/site/trunk/xdocs/migration.xml Wed Mar  9 01:38:16 2011
@@ -43,28 +43,67 @@ problems.
 
   
 
+
+
 Apache Tomcat 5.5.x used, by default, a directory structure including
 common, shared and server 
subdirectories.
-Apache Tomcat 6.0.x merges these into a single lib directory.
-The conf/catalina.properties file can be used to modify
+Apache Tomcat 6.0.x uses a single lib directory.
+
+The lib directory is the direct replacement for both
+common/lib and common/classes subdirectories:
+it accepts both JARs and exploded class hierarchies.
+
+The conf/catalina.properties file can be used to modify
 the directory structure.
 
-In addition, all of the default web applications are located in the
-webapps folder.
+Starting with version 6.0.21, Apache Tomcat supports both the
+$CATALINA_BASE/lib and $CATALINA_HOME/lib
+directories. The jar

svn commit: r1079616 - in /tomcat/site/trunk: docs/migration.html xdocs/migration.xml

2011-03-08 Thread kkolinko
Author: kkolinko
Date: Wed Mar  9 00:28:43 2011
New Revision: 1079616

URL: http://svn.apache.org/viewvc?rev=1079616&view=rev
Log:
Changed preambula chapter of the Migration Guide:
Recommended to start with a blank configuration.
Mentioned that Java 6 is fine.

Modified:
tomcat/site/trunk/docs/migration.html
tomcat/site/trunk/xdocs/migration.xml

Modified: tomcat/site/trunk/docs/migration.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration.html?rev=1079616&r1=1079615&r2=1079616&view=diff
==
--- tomcat/site/trunk/docs/migration.html (original)
+++ tomcat/site/trunk/docs/migration.html Wed Mar  9 00:28:43 2011
@@ -297,13 +297,20 @@
 
 
 When updating from one Apache Tomcat branch to a newer one, please make sure
-the JVM that is installed on your system supports at least the required Java
-version. It is also possible that older versions of Tomcat may not be 
compatible
-with newer JVMs.
-
-The Apache Tomcat configuration sometimes needs to be adjusted when 
upgrading,
-and the lists below compile all changes which may cause backwards
-compatibility problems.
+the JVM that is installed on your system supports at least the
+required Java version.
+
+While we are saying that it is possible that older versions of Tomcat may
+not be compatible with newer JVMs, all the currently supported Apache Tomcat
+versions (5.5, 6.0, 7.0) are known to run fine on Java 6 JVMs.
+
+When configuring a new Tomcat version, you should not blindly copy the
+configuration files from the old one. The recommended way is to start with
+the default configuration of the new version of Apache Tomcat and to adjust
+it as necessary.
+
+The lists below compile all changes which may cause backwards compatibility
+problems.
 
 
 

Modified: tomcat/site/trunk/xdocs/migration.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/migration.xml?rev=1079616&r1=1079615&r2=1079616&view=diff
==
--- tomcat/site/trunk/xdocs/migration.xml (original)
+++ tomcat/site/trunk/xdocs/migration.xml Wed Mar  9 00:28:43 2011
@@ -15,13 +15,20 @@
 
 
 When updating from one Apache Tomcat branch to a newer one, please make sure
-the JVM that is installed on your system supports at least the required Java
-version. It is also possible that older versions of Tomcat may not be 
compatible
-with newer JVMs.
-
-The Apache Tomcat configuration sometimes needs to be adjusted when 
upgrading,
-and the lists below compile all changes which may cause backwards
-compatibility problems.
+the JVM that is installed on your system supports at least the
+required Java version.
+
+While we are saying that it is possible that older versions of Tomcat may
+not be compatible with newer JVMs, all the currently supported Apache Tomcat
+versions (5.5, 6.0, 7.0) are known to run fine on Java 6 JVMs.
+
+When configuring a new Tomcat version, you should not blindly copy the
+configuration files from the old one. The recommended way is to start with
+the default configuration of the new version of Apache Tomcat and to adjust
+it as necessary.
+
+The lists below compile all changes which may cause backwards compatibility
+problems.
 
 
 



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



DO NOT REPLY [Bug 50895] JSP compiler initializes classes during compile which can result in failures

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50895

Andy Wang  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |

--- Comment #3 from Andy Wang  2011-03-08 18:05:16 EST ---
I haven't coded this up, here's a simple example:

my.jsp page that contians the following

MyClass class = new MyClass();

MyClass contains the following code

 static {
 File file = new File("/path/to/file/that/only/exists/at/runtime");
 if (!file.exists()) {
throw new Exception();
 }
 }


my.jsp is perfectly valid to precompile in this case, but precompilation using
the Jspc ant task will fail because the instantiation of MyClass will fail due
to the file that doesn't exist.

While this is a horrible example and I won't argue the coding pattern isn't
ideal, we have a couple of cases where a jsp page relies on a class that has a
static constructor that has runtime dependencies.  As a result, we are unable
to precompile the jsps without patching tomcat and making the initialize flag
false.

The other thing.  All of our JSPs takes 96 minutes to pre-compile with 6.0.32.
Took about an hour with 6.0.28.  With the initialize set to false it's
somewhere in between.  The initialization step of some of our classes with 
complicated static initializers can be time consuming.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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



DO NOT REPLY [Bug 50895] JSP compiler initializes classes during compile which can result in failures

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50895

--- Comment #2 from Andy Wang  2011-03-08 17:42:39 EST ---
We have a tag that contructs a class that has runtime dependencies in it's
constructor.

When using the Jspc ant task to compile, these runtime dependencies don't
exist.  However, when the class is actually called during runtime (i.e. within
a running tomcat instance) the runtime requirements exist and are fine.

I can't provide you our usecase because it's dependent on many many layers of
our code, but I can easily provide you with a contrived usecase of a jsp file
that will compile and load fine when tomcat is running but will not when using
the out of band Jspc ant task to perform a precompile if you wish.

I think this is a valid scenario.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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



Re: svn commit: r1079444 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/a

2011-03-08 Thread Mark Thomas
On 08/03/2011 17:18, rj...@apache.org wrote:

> Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1079444&r1=1079443&r2=1079444&view=diff
> ==
> --- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Tue Mar  8 
> 17:18:16 2011

> @@ -2450,6 +2453,16 @@ public class Request
>  return (inputBuffer.available() > 0);
>  }
>  
> +/**
> + * Disable swallowing of remaining input if configured
> + */
> +protected void disableSwallowInput() {
> +Context context = getContext();
> +if (context != null && !context.getSwallowAbortedUploads()) {
> +coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
> +}
> +}
> +


This method name confused me the first time I read the code.
checkSwallowInput() might be a better name

Mark

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



DO NOT REPLY [Bug 50895] JSP compiler initializes classes during compile which can result in failures

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50895

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #1 from Mark Thomas  2011-03-08 17:30:09 EST ---
Initialisation has to happen at some point. If it doesn't happen at compilation
it will happen at first use very shortly afterwards. Failing early is actually
better. Therefore I am closing this as INVALID.

If you have a test case that currently fails that changing initialize to false
will allow to work then please re-open this issue and attach the test case.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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



Re: svn commit: r1079444 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/

2011-03-08 Thread Rainer Jung

On 08.03.2011 22:09, sebb wrote:

On 8 March 2011 17:18,  wrote:

Author: rjung
Date: Tue Mar  8 17:18:16 2011
New Revision: 1079444

URL: http://svn.apache.org/viewvc?rev=1079444&view=rev
Log:
New context attribute "swallowAbortedUploads" allows
to make request data swallowing configurable for requests
that are too large.


...

--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Mar  8 
17:18:16 2011
@@ -197,6 +197,12 @@ public class StandardContext extends Con
 protected boolean allowCasualMultipartParsing = false;

 /**
+ * Control whether remaining request data will be read
+ * (swallowed) even if the request violates a data size constraint.
+ */
+public boolean swallowAbortedUploads = true;


This should surely be private - there are public [gs]etters already.


Sure, fixed in r1079584, thanks.

Rainer

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



svn commit: r1079584 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

2011-03-08 Thread rjung
Author: rjung
Date: Tue Mar  8 22:27:45 2011
New Revision: 1079584

URL: http://svn.apache.org/viewvc?rev=1079584&view=rev
Log:
Reduce visibility of field with public getter
and setter.

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1079584&r1=1079583&r2=1079584&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Mar  8 
22:27:45 2011
@@ -200,7 +200,7 @@ public class StandardContext extends Con
  * Control whether remaining request data will be read
  * (swallowed) even if the request violates a data size constraint.
  */
-public boolean swallowAbortedUploads = true;
+private boolean swallowAbortedUploads = true;
 
 /**
  * The alternate deployment descriptor name.
@@ -6468,4 +6468,4 @@ public class StandardContext extends Con
 return false;
 }
 
-}
\ No newline at end of file
+}



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



DO NOT REPLY [Bug 25060] Reloading context orphans currently open jndi datasource connections

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=25060

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #7 from Mark Thomas  2011-03-08 17:20:28 EST ---
A LifecycleListener isn't necessarily the best place for this and it would
require explicit configuration.

I have added some clean-up for DataSource resources when naming resources are
stopped but this is far from a generic solution for all resources (and neither
is it meant to be). As Remy points out what is needed is a standard interface
for releasing JNDI resources. DataSources are sufficiently widely used and the
issues sufficiently problematic that I think it makes sense to address them.

The clean-up has been added to Tomcat 7 and will be included in 7.0.11 onwards.

Regarding the thread leak with Commons DBCP, that is a Commons DBCP bug
although one that might be hard to fix.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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: r1079575 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContext.java java/org/apache/catalina/deploy/LocalStrings.properties java/org/apache/catalina/deploy/NamingResources.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 22:15:34 2011
New Revision: 1079575

URL: http://svn.apache.org/viewvc?rev=1079575&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=25060
When stopping naming resources look for DataSource resources with a zero-arg 
close() method and call it if one is found
Works with Commons DBCP.

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1079575&r1=1079574&r2=1079575&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Mar  8 
22:15:34 2011
@@ -5384,15 +5384,13 @@ public class StandardContext extends Con
 
 setState(LifecycleState.STOPPING);
 
-// Currently this is effectively a NO-OP but needs to be called to
-// ensure the NamingResources follows the correct lifecycle
+// Binding thread
+ClassLoader oldCCL = bindThread();
+
 if (namingResources != null) {
 namingResources.stop();
 }
 
-// Binding thread
-ClassLoader oldCCL = bindThread();
-
 try {
 
 // Stop our child containers, if any

Modified: tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties?rev=1079575&r1=1079574&r2=1079575&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties Tue 
Mar  8 22:15:34 2011
@@ -43,5 +43,10 @@ webxml.unrecognisedPublicId=The public I
 webXml.version.nfe=Unable to parse [{0}] from the version string [{1}]. This 
component of the version string will be ignored. 
 webXml.wrongFragmentName=Used a wrong fragment name {0} at web.xml 
absolute-ordering tag!
 
+namingResources.cleanupCloseFailed=Failed to invoke close method for resource 
[{0}] in container [{1}] so no cleanup was performed for that resource
+namingResources.cleanupCloseSecurity=Unable to retrieve close method for 
resource [{0}] in container [{1}] so no cleanup was performed for that resource
+namingResources.cleanupNoClose=Resource [{0}] in container [{1}] does not have 
a close method so no cleanup was performed for that resource
+namingResources.cleanupNoContext=Failed to retrieve JNDI naming context for 
container [{0}] so no cleanup was performed for that container
+namingResources.cleanupNoResource=Failed to retrieve JNDI resource [{0}] for 
container [{1}] so no cleanup was performed for that resource
 namingResources.mbeanCreateFail=Failed to create MBean for naming resource 
[{0}]
 namingResources.mbeanDestroyFail=Failed to destroy MBean for naming resource 
[{0}]

Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java?rev=1079575&r1=1079574&r2=1079575&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java Tue Mar  
8 22:15:34 2011
@@ -22,9 +22,14 @@ package org.apache.catalina.deploy;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
 import java.io.Serializable;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 import java.util.HashMap;
 import java.util.Hashtable;
 
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+
 import org.apache.catalina.Container;
 import org.apache.catalina.Context;
 import org.apache.catalina.Engine;
@@ -35,6 +40,7 @@ import org.apache.catalina.mbeans.MBeanU
 import org.apache.catalina.util.LifecycleMBeanBase;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
+import org.apache.naming.ContextBindings;
 import org.apache.tomcat.util.res.StringManager;
 
 
@@ -949,11 +955,84 @@ public class NamingResources extends Lif
 
 @Override
 protected void stopInternal() throws LifecycleException {
+cleanUp();
 setState(LifecycleState.STOPPING);
 fireLifecycleEvent(CONFIGURE_STOP_EVENT, null);
 }
 
+/**
+ * Close those resources that an explicit close may help clean-up faster.
+ */
+private void cleanUp() {
+if (r

svn commit: r1079553 - /tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 21:32:58 2011
New Revision: 1079553

URL: http://svn.apache.org/viewvc?rev=1079553&view=rev
Log:
r1079367 was a little too enthusiastic.
The "if (!initialized)" tests weren't required by the init() call are

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=1079553&r1=1079552&r2=1079553&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
Tue Mar  8 21:32:58 2011
@@ -146,6 +146,7 @@ public class JSSESocketFactory implement
 public ServerSocket createSocket (int port)
 throws IOException
 {
+init();
 ServerSocket socket = sslProxy.createServerSocket(port);
 initServerSocket(socket);
 return socket;
@@ -155,6 +156,7 @@ public class JSSESocketFactory implement
 public ServerSocket createSocket (int port, int backlog)
 throws IOException
 {
+init();
 ServerSocket socket = sslProxy.createServerSocket(port, backlog);
 initServerSocket(socket);
 return socket;
@@ -165,6 +167,7 @@ public class JSSESocketFactory implement
   InetAddress ifAddress)
 throws IOException
 {   
+init();
 ServerSocket socket = sslProxy.createServerSocket(port, backlog,
   ifAddress);
 initServerSocket(socket);



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



Re: svn commit: r1079444 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/a

2011-03-08 Thread sebb
On 8 March 2011 17:18,   wrote:
> Author: rjung
> Date: Tue Mar  8 17:18:16 2011
> New Revision: 1079444
>
> URL: http://svn.apache.org/viewvc?rev=1079444&view=rev
> Log:
> New context attribute "swallowAbortedUploads" allows
> to make request data swallowing configurable for requests
> that are too large.
>
...
> --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Mar  
> 8 17:18:16 2011
> @@ -197,6 +197,12 @@ public class StandardContext extends Con
>     protected boolean allowCasualMultipartParsing = false;
>
>     /**
> +     * Control whether remaining request data will be read
> +     * (swallowed) even if the request violates a data size constraint.
> +     */
> +    public boolean swallowAbortedUploads = true;

This should surely be private - there are public [gs]etters already.

> +
> +    /**
>      * The alternate deployment descriptor name.
>      */
>     private String altDDName = null;
> @@ -1066,6 +1072,30 @@ public class StandardContext extends Con
>     }
>
>     /**
> +     * Set to false to disable request data swallowing
> +     * after an upload was aborted due to size constraints.
> +     *
> +     * @param swallowAbortedUploads false to disable
> +     *        swallowing, true otherwise (default).
> +     */
> +    @Override
> +    public void setSwallowAbortedUploads(boolean swallowAbortedUploads) {
> +        this.swallowAbortedUploads = swallowAbortedUploads;
> +    }
> +
> +    /**
> +     * Returns true if remaining request data will be read
> +     * (swallowed) even the request violates a data size constraint.
> +     *
> +     * @return true if data will be swallowed (default),
> +     *    false otherwise.
> +     */
> +    @Override
> +    public boolean getSwallowAbortedUploads() {
> +        return this.swallowAbortedUploads;
> +    }
> +
> +    /**
>      * Set cache TTL.
>      */
>     public void setCacheTTL(int cacheTTL) {
> @@ -6440,4 +6470,4 @@ public class StandardContext extends Con
>         return false;
>     }
>
> -}
> +}
> \ No newline at end of file

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



DO NOT REPLY [Bug 50890] Provide "onStartup" and "onShutdown" scripts that run on every scenario Tomcat starts up or shuts down

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50890

--- Comment #1 from Konstantin Kolinko  2011-03-08 
15:51:01 EST ---
(In reply to comment #0)

1) The service wrapper used by Tomcat is not a part of Tomcat project. We are
using the one provided by the Daemon project of Apache Commons (jsvc on Unix,
procrun on Windows). This enhancement proposal should be reported there,

http://commons.apache.org/daemon/
https://issues.apache.org/jira/browse/DAEMON


2) Tomcat, per se, has support for LifecycleListener classes in various places
of its configuration.

Implementing a listener that calls an external program should not be hard
(though has its tricks, see CGIServlet for an example).

Calling a script file (through JSR 223 support for scripting languages) might
be even more easier.

I suppose that this is a rare requirement though.

> "onStartup.bat/sh" and "onShutdown.bat/sh"

I should note, that there are time limits on shutdown process, and there might
be different reasons why Tomcat shuts down. I would not expect that calling
anything external during shutdown would work reliably.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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



DO NOT REPLY [Bug 50895] New: JSP compiler initializes classes during compile which can result in failures

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50895

   Summary: JSP compiler initializes classes during compile which
can result in failures
   Product: Tomcat 6
   Version: 6.0.32
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: do...@moonteeth.com


The fix for Bug 49555 adds the following code call:

clazz = Class.forName(className, true, tccl);

The 2nd argument (initialize) is set to true resulting in it attempting to
initialize the class.  This can result in compilation failures if the class has
ugly static initializer requirements.  It can also increases the time and
memory footprint of compilation as the classes.

I think for the purposes of the getCanonicalName() call, the second argument
should be set to false to prevent initialization of the class in question.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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



Re: [RESULT] [VOTE] Release Apache Tomcat 7.0.10

2011-03-08 Thread Henri Gomez
Changelog (http://tomcat.apache.org/tomcat-7.0-doc/changelog.html)
still reports 7.0.8, time for sync between sites ?



2011/3/7 Mark Thomas :
> The result of the vote is that 7.0.10 should be released as stable.
>
> I'll make the changes shortly, with a plan to announce early tomorrow.
>
> Cheers,
>
> Mark
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

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



DO NOT REPLY [Bug 50893] New: Extras etc documentation not easy to find

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50893

   Summary: Extras etc documentation not easy to find
   Product: Tomcat 7
   Version: 7.0.10
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Packaging
AssignedTo: dev@tomcat.apache.org
ReportedBy: s...@apache.org


http://tomcat.apache.org/download-70.cgi#7.0.10 says:

Please see the README file for packaging information. It explains what every
distribution contains. 

...

Extras:

* JMX Remote jar (pgp, md5)
* Web services jar (pgp, md5)
* JULI adapters jar (pgp, md5)
* JULI log4j jar (pgp, md5)

==

The README says:

bin/extras/
Additional components. See documentation.

The documemtation links to:

http://tomcat.apache.org/tomcat-7.0-doc/extras.html

which has sections called:
* Full commons-logging implementation
* Web Services support (JSR 109)
but does not cover JMX or how the JULI jars are to be used.

The README does not actually document what the Deployer, Extras and Embedded
downloads contain. Please could the download page point directly to the
documentation for these instead?

And there does not appear to be any docn. for the JMX Remote Jar at all.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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: r1079444 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/connector/ java/org/apache/catalina/core/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apach

2011-03-08 Thread rjung
Author: rjung
Date: Tue Mar  8 17:18:16 2011
New Revision: 1079444

URL: http://svn.apache.org/viewvc?rev=1079444&view=rev
Log:
New context attribute "swallowAbortedUploads" allows
to make request data swallowing configurable for requests
that are too large.

Added:
tomcat/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java   
(with props)
Modified:
tomcat/trunk/java/org/apache/catalina/Context.java
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/catalina/connector/Response.java
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/coyote/ActionCode.java
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/trunk/test/org/apache/catalina/startup/SimpleHttpClient.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/context.xml

Modified: tomcat/trunk/java/org/apache/catalina/Context.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1079444&r1=1079443&r2=1079444&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Context.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Context.java Tue Mar  8 17:18:16 2011
@@ -111,6 +111,24 @@ public interface Context extends Contain
 public boolean getAllowCasualMultipartParsing();
 
 /**
+ * Set to false to disable request data swallowing
+ * after an upload was aborted due to size constraints.
+ *
+ * @param swallowAbortedUploads false to disable
+ *swallowing, true otherwise (default).
+ */
+public void setSwallowAbortedUploads(boolean swallowAbortedUploads);
+
+/**
+ * Returns true if remaining request data will be read
+ * (swallowed) even the request violates a data size constraint.
+ *
+ * @return true if data will be swallowed (default),
+ *false otherwise.
+ */
+public boolean getSwallowAbortedUploads();
+
+/**
  * Return the set of initialized application event listener objects,
  * in the order they were specified in the web application deployment
  * descriptor, for this application.

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1079444&r1=1079443&r2=1079444&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Tue Mar  8 
17:18:16 2011
@@ -800,6 +800,9 @@ public class Request
  */
 public void finishRequest() throws IOException {
 // The reader and input stream don't need to be closed
+// TODO: Is this ever called?
+// If so, move input swallow disabling from 
+// Response.finishResponse() to here
 }
 
 
@@ -2450,6 +2453,16 @@ public class Request
 return (inputBuffer.available() > 0);
 }
 
+/**
+ * Disable swallowing of remaining input if configured
+ */
+protected void disableSwallowInput() {
+Context context = getContext();
+if (context != null && !context.getSwallowAbortedUploads()) {
+coyoteRequest.action(ActionCode.DISABLE_SWALLOW_INPUT, null);
+}
+}
+
 public void cometClose() {
 coyoteRequest.action(ActionCode.COMET_CLOSE,getEvent());
 }
@@ -2620,6 +2633,7 @@ public class Request
 } catch (InvalidContentTypeException e) {
 partsParseException = new ServletException(e);
 } catch (FileUploadBase.SizeException e) {
+disableSwallowInput();
 partsParseException = new IllegalStateException(e);
 } catch (FileUploadException e) {
 partsParseException = new IOException(e);
@@ -2845,6 +2859,7 @@ public class Request
 context.getLogger().debug(
 sm.getString("coyoteRequest.postTooLarge"));
 }
+disableSwallowInput();
 return;
 }
 byte[] formData = null;
@@ -2922,6 +2937,7 @@ public class Request
 if (connector.getMaxPostSize() > 0 &&
 (body.getLength() + len) > connector.getMaxPostSize()) {
 // Too much data
+disableSwallowInput();
 throw new IllegalArgumentException(
 sm.getString("coyoteRequest.chunkedPostTooLarge"));
 }

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Response.java?rev=1079444&r1=1079443&r2=1079444&view=diff
=

svn commit: r1079405 - in /tomcat/trunk/java/org/apache/catalina: Server.java core/StandardServer.java manager/ManagerServlet.java realm/DataSourceRealm.java realm/UserDatabaseRealm.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 15:58:53 2011
New Revision: 1079405

URL: http://svn.apache.org/viewvc?rev=1079405&view=rev
Log:
Expose the global naming context for all Server implementations

Modified:
tomcat/trunk/java/org/apache/catalina/Server.java
tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
tomcat/trunk/java/org/apache/catalina/realm/DataSourceRealm.java
tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java

Modified: tomcat/trunk/java/org/apache/catalina/Server.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Server.java?rev=1079405&r1=1079404&r2=1079405&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Server.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Server.java Tue Mar  8 15:58:53 2011
@@ -76,6 +76,12 @@ public interface Server extends Lifecycl
 
 
 /**
+ * Return the global naming resources context.
+ */
+public javax.naming.Context getGlobalNamingContext();
+
+
+/**
  * Return the port number we listen to for shutdown commands.
  */
 public int getPort();

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardServer.java?rev=1079405&r1=1079404&r2=1079405&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardServer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardServer.java Tue Mar  8 
15:58:53 2011
@@ -173,6 +173,7 @@ public final class StandardServer extend
 /**
  * Return the global naming resources context.
  */
+@Override
 public javax.naming.Context getGlobalNamingContext() {
 
 return (this.globalNamingContext);

Modified: tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java?rev=1079405&r1=1079404&r2=1079405&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java Tue Mar  
8 15:58:53 2011
@@ -457,8 +457,8 @@ public class ManagerServlet extends Http
 
 // Acquire global JNDI resources if available
 Server server = ((Engine)host.getParent()).getService().getServer();
-if ((server != null) && (server instanceof StandardServer)) {
-global = ((StandardServer) server).getGlobalNamingContext();
+if (server != null) {
+global = server.getGlobalNamingContext();
 }
 
 // Calculate the directory into which we will be deploying applications

Modified: tomcat/trunk/java/org/apache/catalina/realm/DataSourceRealm.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/DataSourceRealm.java?rev=1079405&r1=1079404&r2=1079405&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/DataSourceRealm.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/DataSourceRealm.java Tue Mar  8 
15:58:53 2011
@@ -30,7 +30,6 @@ import javax.naming.Context;
 import javax.sql.DataSource;
 
 import org.apache.catalina.LifecycleException;
-import org.apache.catalina.core.StandardServer;
 import org.apache.naming.ContextBindings;
 
 /**
@@ -390,8 +389,7 @@ public class DataSourceRealm
 context = ContextBindings.getClassLoader();
 context = (Context) context.lookup("comp/env");
 } else {
-context =
-((StandardServer)getServer()).getGlobalNamingContext();
+context = getServer().getGlobalNamingContext();
 }
 DataSource dataSource = (DataSource)context.lookup(dataSourceName);
 return dataSource.getConnection();

Modified: tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java?rev=1079405&r1=1079404&r2=1079405&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/realm/UserDatabaseRealm.java Tue Mar  
8 15:58:53 2011
@@ -32,7 +32,6 @@ import org.apache.catalina.Role;
 import org.apache.catalina.User;
 import org.apache.catalina.UserDatabase;
 import org.apache.catalina.Wrapper;
-import org.apache.catalina.core.StandardServer;
 import org.apache.tomcat.util.ExceptionUtils;
 
 
@@ -252,8 +251,7 @@ public class UserDatabaseRealm
 protected void st

[ANN] Apache Tomcat 7.0.10 released

2011-03-08 Thread Mark Thomas
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 7.0.10

Apache Tomcat 7.0.10 is primarily a security and bug fix release with
numerous fixes compared to 7.0.8.

Please refer to the change log for the list of changes:
http://tomcat.apache.org/tomcat-7.0-doc/changelog.html

Note that this version has 4 zip binaries: a generic one and three
bundled with Tomcat native binaries for Windows operating systems
running on different CPU architectures.

Downloads:
http://tomcat.apache.org/download-70.cgi

Migration guide from Apache Tomcat 5.5.x and 6.0.x:
http://tomcat.apache.org/migration.html

Thank you,

-- The Apache Tomcat Team



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



Re: DefaultServlet and getWriter()/getInputStream()

2011-03-08 Thread Mark Thomas
On 07/03/2011 23:31, Konstantin Kolinko wrote:
> If some content was added before DefaultServlet was called:
> 
> 1) We will not be able to process HEAD requests correctly.
> 
> In those cases we do not serve the resource, but Content-Length header
> is returned.
> 
> Returning the content-length header consistently (and trimming the
> output by that length) is the best what we can do here.

Assuming a Filter added the content then the Filter can/should/must wrap
the request and modify the content length header.

> 2) Support for the "Content-Range" header will be broken. (Unless
> turned off in DefaultServlet configuration).

Again, assuming a Filter added the content then the Filter would have to
wrap the response and modify the Content-Range headers.

Having a filter that modifies content but works with any servlet is
going to be tricky to get absolutely right. It would be a lot easier if
it only has to work with a set of known servlets where most/all of the
issues can be ignored.

There are probably other issues that would need to be taken into
consideration too. Fortunately, this is an intellectual exercise rather
than a problem we have to solve in Tomcat. Still, it is an interesting
exercise.

Mark



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



svn propchange: r1077995 - svn:log

2011-03-08 Thread markt
Author: markt
Revision: 1077995
Modified property: svn:log

Modified: svn:log at Tue Mar  8 15:43:01 2011
--
--- svn:log (original)
+++ svn:log Tue Mar  8 15:43:01 2011
@@ -1,2 +1,3 @@
+CVE-2011-1088
 @ServletSecurity
 Servlets added via addServlet() should not be processed unless created via 
craeteServlet. Need to delay scanning until urlPatterns are known


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



svn propchange: r1076587 - svn:log

2011-03-08 Thread markt
Author: markt
Revision: 1076587
Modified property: svn:log

Modified: svn:log at Tue Mar  8 15:42:34 2011
--
--- svn:log (original)
+++ svn:log Tue Mar  8 15:42:34 2011
@@ -1 +1,2 @@
+CVE-2011-1088
 Fix typo


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



svn propchange: r1076586 - svn:log

2011-03-08 Thread markt
Author: markt
Revision: 1076586
Modified property: svn:log

Modified: svn:log at Tue Mar  8 15:42:13 2011
--
--- svn:log (original)
+++ svn:log Tue Mar  8 15:42:13 2011
@@ -1,4 +1,4 @@
-[SECURITY]
+CVE-2011-1088
 Start of fix for issue reported on users list that @ServletSecurity 
annotations were ignored.
 This fix is not yet complete. This first part:
 - Triggers the loading of the Wrapper before the constraints are processed to 
ensure that any @ServletSecurity annotations are taken account of


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



svn commit: r1079399 - /tomcat/trunk/webapps/docs/changelog.xml

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 15:39:29 2011
New Revision: 1079399

URL: http://svn.apache.org/viewvc?rev=1079399&view=rev
Log:
Add release dates

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1079399&r1=1079398&r2=1079399&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Mar  8 15:39:29 2011
@@ -72,7 +72,7 @@
 
   
 
-
+
   
 
   
@@ -106,7 +106,7 @@
 
   
 
-
+
   
 
   



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



svn commit: r1079398 - /tomcat/trunk/webapps/docs/changelog.xml

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 15:37:36 2011
New Revision: 1079398

URL: http://svn.apache.org/viewvc?rev=1079398&view=rev
Log:
Add the CVE info for 7.0.10

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1079398&r1=1079397&r2=1079398&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Mar  8 15:37:36 2011
@@ -92,7 +92,7 @@
 the ThreadLocalLeakPreventionListener is enabled. (markt) 
 
   
   
-Don't ignore @ServletSecurity annotations. (markt)
+CVE-2011-1088: Don't ignore @ServletSecurity annotations. (markt)
   
 
   



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



svn commit: r1079387 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioEndpoint.java SSLUtil.java jsse/JSSESocketFactory.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 15:19:19 2011
New Revision: 1079387

URL: http://svn.apache.org/viewvc?rev=1079387&view=rev
Log:
Align SSL init for BIO and NIO.
Fixes https://issues.apache.org/bugzilla/show_bug.cgi?id=48208 for NIO.
Adds support for keyPass, truststoreProvider & keystoreProvider

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1079387&r1=1079386&r2=1079387&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Mar  8 
15:19:19 2011
@@ -31,7 +31,6 @@ import java.nio.channels.Selector;
 import java.nio.channels.ServerSocketChannel;
 import java.nio.channels.SocketChannel;
 import java.nio.channels.WritableByteChannel;
-import java.security.KeyStore;
 import java.util.Iterator;
 import java.util.Set;
 import java.util.concurrent.ConcurrentLinkedQueue;
@@ -42,11 +41,9 @@ import java.util.concurrent.atomic.Atomi
 import java.util.concurrent.atomic.AtomicLong;
 
 import javax.net.ssl.KeyManager;
-import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLEngine;
 import javax.net.ssl.SSLSessionContext;
-import javax.net.ssl.TrustManagerFactory;
 import javax.net.ssl.X509KeyManager;
 
 import org.apache.juli.logging.Log;
@@ -55,7 +52,6 @@ import org.apache.tomcat.util.ExceptionU
 import org.apache.tomcat.util.IntrospectionUtils;
 import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.net.SecureNioChannel.ApplicationBufferHandler;
-import org.apache.tomcat.util.net.jsse.JSSESocketFactory;
 import org.apache.tomcat.util.net.jsse.NioX509KeyManager;
 
 /**
@@ -94,8 +90,6 @@ public class NioEndpoint extends Abstrac
  */
 protected ServerSocketChannel serverSock = null;
 
-protected SSLUtil sslUtil = null;
-
 /**
  * use send file
  */
@@ -479,68 +473,16 @@ public class NioEndpoint extends Abstrac
 
 // Initialize SSL if needed
 if (isSSLEnabled()) {
-if (sslUtil == null) {
-sslUtil = handler.getSslImplementation().getSSLUtil(this);
-}
-// Initialize SSL
-String keystorePass = getKeystorePass();
-if (keystorePass == null) {
-keystorePass = JSSESocketFactory.DEFAULT_KEY_PASS;
-}
-char[] passphrase = keystorePass.toCharArray();
-
-char[] tpassphrase = 
(getTruststorePass()!=null)?getTruststorePass().toCharArray():passphrase;
-String ttype = 
(getTruststoreType()!=null)?getTruststoreType():getKeystoreType();
-
-KeyStore ks = KeyStore.getInstance(getKeystoreType());
-FileInputStream fisKeyStore = null;
-try {
-fisKeyStore = new FileInputStream(getKeystoreFile());
-ks.load(fisKeyStore, passphrase);
-} finally {
-if (fisKeyStore != null) {
-try {
-fisKeyStore.close();
-} catch (IOException ioe) {/*Ignore*/}
-}
-}
-KeyStore ts = null;
-if (getTruststoreFile()==null) {
-//no op, same as for BIO connector
-}else {
-ts = KeyStore.getInstance(ttype);
-FileInputStream fisTrustStore = null;
-try {
-fisTrustStore = new FileInputStream(getTruststoreFile());
-ts.load(fisTrustStore, tpassphrase);
-} finally {
-if (fisTrustStore != null) {
-try {
-fisTrustStore.close();
-} catch (IOException ioe) {/*Ignore*/}
-}
-}
-}
+SSLUtil sslUtil = handler.getSslImplementation().getSSLUtil(this);
 
-KeyManagerFactory kmf = 
KeyManagerFactory.getInstance(getAlgorithm());
-kmf.init(ks, passphrase);
+sslContext = sslUtil.createSSLContext();
+sslContext.init(wrap(sslUtil.getKeyManagers()),
+sslUtil.getTrustManagers(), null);
 
-TrustManagerFactory tmf = 
TrustManagerFactory.getInstance(getAlgorithm());
-tmf.init(ts);
-
-sslContext = SSLContext.getInstance(getSslProtocol());
-sslContext.init(wrap(kmf.getKeyManagers()), 
tmf.getTrustManagers(), null);
 SSLSessionContext sessionContext =
 sslContext.getServerSessionCo

Re: [GUMP@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) failed

2011-03-08 Thread Stefan Bodewig
On 2011-03-08, Gump wrote:

>  -ERROR- Circular Dependency. Path: [Project:jetty-security,
>  Project:jetty-servlet, Project:jetty-webapp, Project:jetty-jmx,
>  Project:jetty-server, Project:jetty-ajp, Project:jetty-all,
>  Project:jetty, Project:cargo, Project:cactus,
>  Project:tomcat-taglibs-standard,
>  Project:tomcat-taglibs-standard-install] -> jetty-server.

This is caused by a dependency cycle inside the Jetty Gump descriptor
that has been fixed by now.  Please ignore this nag (and the one that
will come in for tomcat-taglibs-standard-install in a few minutes) it
should be fixed with the next Gump run.

Stefan

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



[GUMP@vmgump]: Project tomcat-taglibs-standard (in module tomcat-taglibs) failed

2011-03-08 Thread Gump
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-taglibs-standard has an issue affecting its community 
integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Configuration 
Failed'.
For reference only, the following projects are affected by this:
- tomcat-taglibs-standard :  Standard Taglib


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -INFO- Failed with reason configuration failed
 -ERROR- Circular Dependency. Path: [Project:jetty-security, 
Project:jetty-servlet, Project:jetty-webapp, Project:jetty-jmx, 
Project:jetty-server, Project:jetty-ajp, Project:jetty-all, Project:jetty, 
Project:cargo, Project:cactus, Project:tomcat-taglibs-standard, 
Project:tomcat-taglibs-standard-install] -> jetty-server.
 -INFO- Optional dependency httpunit failed with reason build failed
 -INFO- Failed to extract fallback artifacts from Gump Repository

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/tomcat-taglibs/tomcat-taglibs-standard/atom.xml

== Gump Tracking Only ===
Produced by Apache Gump(TM) version 2.3.
Gump Run 07000608032011, vmgump.apache.org:vmgump:07000608032011
Gump E-mail Identifier (unique within run) #65.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



svn commit: r1079367 - /tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 14:21:41 2011
New Revision: 1079367

URL: http://svn.apache.org/viewvc?rev=1079367&view=rev
Log:
Remove some unused code

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=1079367&r1=1079366&r2=1079367&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
Tue Mar  8 14:21:41 2011
@@ -123,7 +123,6 @@ public class JSSESocketFactory implement
 
 private AbstractEndpoint endpoint;
 
-protected boolean initialized;
 protected SSLServerSocketFactory sslProxy = null;
 protected String[] enabledCiphers;
 protected boolean allowUnsafeLegacyRenegotiation = false;
@@ -147,7 +146,6 @@ public class JSSESocketFactory implement
 public ServerSocket createSocket (int port)
 throws IOException
 {
-if (!initialized) init();
 ServerSocket socket = sslProxy.createServerSocket(port);
 initServerSocket(socket);
 return socket;
@@ -157,7 +155,6 @@ public class JSSESocketFactory implement
 public ServerSocket createSocket (int port, int backlog)
 throws IOException
 {
-if (!initialized) init();
 ServerSocket socket = sslProxy.createServerSocket(port, backlog);
 initServerSocket(socket);
 return socket;
@@ -168,7 +165,6 @@ public class JSSESocketFactory implement
   InetAddress ifAddress)
 throws IOException
 {   
-if (!initialized) init();
 ServerSocket socket = sslProxy.createServerSocket(port, backlog,
   ifAddress);
 initServerSocket(socket);



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



buildbot success in ASF Buildbot on tomcat-trunk

2011-03-08 Thread buildbot
The Buildbot has detected a restored build of tomcat-trunk on ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/1409

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

Buildslave for this Build: bb-vm_ubuntu

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

Build succeeded!

sincerely,
 -The Buildbot


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



DO NOT REPLY [Bug 50890] Provide "onStartup" and "onShutdown" scripts that run on every scenario Tomcat starts up or shuts down

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50890

Evgeny Goldin  changed:

   What|Removed |Added

URL||http://old.nabble.com/Runni
   ||ng-Tomcat-as-service---is-i
   ||t-possible-to-make-%22tomca
   ||t7.exe%22-run-a-batch-file-
   ||each-time-it-starts--td3108
   ||1552.html
 OS/Version||All

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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



DO NOT REPLY [Bug 50890] New: Provide "onStartup" and "onShutdown" scripts that run on every scenario Tomcat starts up or shuts down

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50890

   Summary: Provide "onStartup" and "onShutdown" scripts that run
on every scenario Tomcat starts up or shuts down
   Product: Tomcat 7
   Version: 7.0.8
  Platform: PC
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: evge...@gmail.com


Please, see this thread - http://goo.gl/F4F7M. When Tomcat starts as a service
"startup.bat" or "catalina.bat" are not running and if any custom code is put
there it is not invoked as well.

It would be very convenient to have "onStartup.bat/sh" and "onShutdown.bat/sh"
scripts that are *always* invoked, regardless of how Tomcat was started or shut
down. This will allow to add any custom listeners without writing new code or
adding new Tomcat applications just for that purpose.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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: r1079360 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioEndpoint.java SSLImplementation.java SSLUtil.java jsse/JSSEImplementation.java jsse/JSSESocketFactory.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 14:03:20 2011
New Revision: 1079360

URL: http://svn.apache.org/viewvc?rev=1079360&view=rev
Log:
Add the hooks (no implementation yet) for BIO and NIO to share the code that is 
currently in JSSESocketFactory

Added:
tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java   (with props)
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1079360&r1=1079359&r2=1079360&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Mar  8 
14:03:20 2011
@@ -94,6 +94,8 @@ public class NioEndpoint extends Abstrac
  */
 protected ServerSocketChannel serverSock = null;
 
+protected SSLUtil sslUtil = null;
+
 /**
  * use send file
  */
@@ -477,6 +479,9 @@ public class NioEndpoint extends Abstrac
 
 // Initialize SSL if needed
 if (isSSLEnabled()) {
+if (sslUtil == null) {
+sslUtil = handler.getSslImplementation().getSSLUtil(this);
+}
 // Initialize SSL
 String keystorePass = getKeystorePass();
 if (keystorePass == null) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java?rev=1079360&r1=1079359&r2=1079360&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java Tue Mar 
 8 14:03:20 2011
@@ -86,4 +86,6 @@ public abstract class SSLImplementation 
 public abstract SSLSupport getSSLSupport(Socket sock);
 
 public abstract SSLSupport getSSLSupport(SSLSession session);
+
+public abstract SSLUtil getSSLUtil(AbstractEndpoint ep);
 }

Added: tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java?rev=1079360&view=auto
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java (added)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java Tue Mar  8 
14:03:20 2011
@@ -0,0 +1,21 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomcat.util.net;
+
+public interface SSLUtil {
+
+}

Propchange: tomcat/trunk/java/org/apache/tomcat/util/net/SSLUtil.java
--
svn:eol-style = native

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java?rev=1079360&r1=1079359&r2=1079360&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java 
Tue Mar  8 14:03:20 2011
@@ -25,6 +25,7 @@ import javax.net.ssl.SSLSocket;
 import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.SSLImplementation;
 import org.apache.tomcat.util.net.SSLSupport;
+import org.apache.tomcat.util.net.SSLUtil;
 import org.apache.tomcat.util.net.ServerSocketFactory;
 
 /* JSSEImplementation:
@@ -56,4 +57,8 @@ public class JSSEImplementation extends 
 return new JSSESupport(session);
 }
 
+@Override
+public SSLUtil getSSLUtil(AbstractEndpoint endpoint) {
+return new JSSESocketFac

svn commit: r1079359 - /tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 14:02:03 2011
New Revision: 1079359

URL: http://svn.apache.org/viewvc?rev=1079359&view=rev
Log:
Fix build failure and don't tie NIO connector to a single SSL implementation

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1079359&r1=1079358&r2=1079359&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue Mar  
8 14:02:03 2011
@@ -46,7 +46,6 @@ import org.apache.tomcat.util.net.NioEnd
 import org.apache.tomcat.util.net.SSLSupport;
 import org.apache.tomcat.util.net.SecureNioChannel;
 import org.apache.tomcat.util.net.SocketStatus;
-import org.apache.tomcat.util.net.jsse.JSSEFactory;
 
 
 /**
@@ -636,7 +635,9 @@ public class Http11NioProcessor extends 
 engine.setNeedClientAuth(true);
 try {
 sslChannel.rehandshake(endpoint.getSoTimeout());
-sslSupport = (new 
JSSEFactory()).getSSLSupport(engine.getSession());
+sslSupport =
+
endpoint.getHandler().getSslImplementation().getSSLSupport(
+engine.getSession());
 } catch (IOException ioe) {
 
log.warn(sm.getString("http11processor.socket.sslreneg",ioe));
 }



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



buildbot failure in ASF Buildbot on tomcat-trunk

2011-03-08 Thread buildbot
The Buildbot has detected a new failure of tomcat-trunk on ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/1408

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

Buildslave for this Build: bb-vm_ubuntu

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

BUILD FAILED: failed compile

sincerely,
 -The Buildbot


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



svn commit: r1079355 - /tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 13:50:46 2011
New Revision: 1079355

URL: http://svn.apache.org/viewvc?rev=1079355&view=rev
Log:
Better Javadoc

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java?rev=1079355&r1=1079354&r2=1079355&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SSLSupport.java Tue Mar  8 
13:50:46 2011
@@ -19,13 +19,9 @@ package org.apache.tomcat.util.net;
 
 import java.io.IOException;
 
-/* SSLSupport
-
-   Interface for SSL-specific functions
-
-   @author EKR
-*/
-
+/**
+ * Defines an interface to interact with SSL sessions.
+ */
 public interface SSLSupport {
 /**
  * The Request attribute key for the cipher suite.



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



svn commit: r1079354 - in /tomcat/trunk/java/org/apache/tomcat/util/net/jsse: JSSEFactory.java JSSEImplementation.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 13:50:07 2011
New Revision: 1079354

URL: http://svn.apache.org/viewvc?rev=1079354&view=rev
Log:
Remove JSSEFactory. Now we no longer need to support older JSSE versions, this 
layer of abstraction is not required.

Removed:
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEFactory.java
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java?rev=1079354&r1=1079353&r2=1079354&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSEImplementation.java 
Tue Mar  8 13:50:07 2011
@@ -20,6 +20,7 @@ package org.apache.tomcat.util.net.jsse;
 import java.net.Socket;
 
 import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocket;
 
 import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.SSLImplementation;
@@ -35,13 +36,6 @@ import org.apache.tomcat.util.net.Server
 
 public class JSSEImplementation extends SSLImplementation {
 
-private JSSEFactory factory = null;
-
-public JSSEImplementation() {
-factory = new JSSEFactory();
-}
-
-
 @Override
 public String getImplementationName(){
 return "JSSE";
@@ -49,20 +43,17 @@ public class JSSEImplementation extends 
   
 @Override
 public ServerSocketFactory getServerSocketFactory(AbstractEndpoint 
endpoint)  {
-ServerSocketFactory ssf = factory.getSocketFactory(endpoint);
-return ssf;
+return new JSSESocketFactory(endpoint);
 } 
 
 @Override
 public SSLSupport getSSLSupport(Socket s) {
-SSLSupport ssls = factory.getSSLSupport(s);
-return ssls;
+return new JSSESupport((SSLSocket) s);
 }
 
 @Override
 public SSLSupport getSSLSupport(SSLSession session) {
-SSLSupport ssls = factory.getSSLSupport(session);
-return ssls;
+return new JSSESupport(session);
 }
 
 }



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



DO NOT REPLY [Bug 48208] allow to configure a custom client certificate Trust Manager in server.xml per connector attribute "trustManagerClassName"

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48208

--- Comment #14 from Mark Thomas  2011-03-08 08:41:45 EST ---
(In reply to comment #12)
> Regarding implementation in 7.0.x: the tests added in r1078436 in 
> TestCustomSsl
> do work with BIO connector, but fail with NIO. I have not tested APR.

There is a lot of duplication between SSL Support in BIO and NIO. Removing that
duplication should fix this and any other (as yet undiscovered issues).

This attribute is not supported for APR.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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: r1079337 - /tomcat/trunk/test/org/apache/tomcat/util/net/TestCustomSsl.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 12:10:44 2011
New Revision: 1079337

URL: http://svn.apache.org/viewvc?rev=1079337&view=rev
Log:
Don't swallow exceptions when they are not expected

Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/TestCustomSsl.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestCustomSsl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestCustomSsl.java?rev=1079337&r1=1079336&r2=1079337&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestCustomSsl.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestCustomSsl.java Tue Mar  8 
12:10:44 2011
@@ -84,7 +84,8 @@ public class TestCustomSsl extends Tomca
 
 if (!TesterSupport.RFC_5746_SUPPORTED) {
 // Make sure SSL renegotiation is not disabled in the JVM
-System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", 
"true");
+System.setProperty("sun.security.ssl.allowUnsafeRenegotiation",
+"true");
 }
 
 Tomcat tomcat = getTomcatInstance();
@@ -124,10 +125,16 @@ public class TestCustomSsl extends Tomca
 try {
 rc = getUrl("https://localhost:"; + getPort() + "/protected", res,
 null, null);
-} catch (SocketException expected1) {
-// Ignore
-} catch (SSLHandshakeException expected2) {
-// Ignore
+} catch (SocketException se) {
+if (serverTrustAll) {
+fail(se.getMessage());
+se.printStackTrace();
+}
+} catch (SSLHandshakeException he) {
+if (serverTrustAll) {
+fail(he.getMessage());
+he.printStackTrace();
+}
 }
 if (serverTrustAll) {
 assertEquals(200, rc);



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



[Tomcat Wiki] Trivial Update of "PoweredBy" by robdean

2011-03-08 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "PoweredBy" page has been changed by robdean.
http://wiki.apache.org/tomcat/PoweredBy?action=diff&rev1=321&rev2=322

--

  #pragma section-numbers 2
  = Sites, Applications, and Systems that are Powered By Tomcat =
- This page is a list of some, in all likelihood a very small fraction 
actually, of the sites out there that use [[http://tomcat.apache.org|Apache 
Tomcat]] in production.  For security and other policy-related reasons, many 
organizations choose not to disclose the server they use.  Tomcat has been 
downloaded more than 10 million times: assuming even a 1% production adoption 
rate results in more than 10 installations.  As an aside for the curious, 
you can see recent Tomcat download statistics on 
[[http://people.apache.org/~vgritsenko/stats/projects/tomcat.html|Vadim 
Gritsenko's page]].  Note, however, that these represent downloads from 
apache.org servers only, and not from mirrors, so they are likely to represent 
only a small minority of downloads: the total number is much (more than an 
order of magnitude) greater.  Companies that support Tomcat, such as 
[[http://www.springsource.com|SpringSource]] claim more than half of the global 
Fortune 500 as their clients.
+ This page is a list of some, in all likelihood a very small fraction 
actually, of the sites out there that use [[http://tomcat.apache.org|Apache 
Tomcat]] in production. For security and other policy-related reasons, many 
organizations choose not to disclose the server they use. Tomcat has been 
downloaded more than 10 million times: assuming even a 1% production adoption 
rate results in more than 10 installations. As an aside for the curious, 
you can see recent Tomcat download statistics on 
[[http://people.apache.org/~vgritsenko/stats/projects/tomcat.html|Vadim 
Gritsenko's page]]. Note, however, that these represent downloads from 
apache.org servers only, and not from mirrors, so they are likely to represent 
only a small minority of downloads: the total number is much (more than an 
order of magnitude) greater. Companies that support Tomcat, such as 
[[http://www.springsource.com|SpringSource]] claim more than half of the global 
Fortune 500 as their clients.
  
- This page is organized by categories: [[#pub|sites with publications]], 
[[#user|sites added by users]], [[#surveys|independent surveys]], and 
[[#more|more]].  Anyone can and is encouraged to add to this page: please add 
your site, application, or system as you see fit.  You do need to register with 
the Apache wiki system to edit this page: simply click the login or user 
preferences links at the top right of your screen to do so.  Don't worry if you 
don't think it fits here or into any particular category: we would like to see 
your application listed no matter how big, how small, or how miscategorized ;)  
Some of these applications are simply compatible with, ship with, or run on 
Tomcat.  Others are specifically designed or documented with Tomcat as the 
container in mind.
+ This page is organized by categories: [[#pub|sites with publications]], 
[[#user|sites added by users]], [[#surveys|independent surveys]], and 
[[#more|more]]. Anyone can and is encouraged to add to this page: please add 
your site, application, or system as you see fit. You do need to register with 
the Apache wiki system to edit this page: simply click the login or user 
preferences links at the top right of your screen to do so. Don't worry if you 
don't think it fits here or into any particular category: we would like to see 
your application listed no matter how big, how small, or how miscategorized ;) 
Some of these applications are simply compatible with, ship with, or run on 
Tomcat. Others are specifically designed or documented with Tomcat as the 
container in mind.
  
- Please note that all the corporate logos and names used below are trademarked 
by their respective organizations.  These organizations are not affiliated with 
this web site or with The Apache Software Foundation, and make no claims 
regarding The Foundation or its products.  Further, in most cases the companies 
are not aware of their being listed on this site at all.
+ Please note that all the corporate logos and names used below are trademarked 
by their respective organizations. These organizations are not affiliated with 
this web site or with The Apache Software Foundation, and make no claims 
regarding The Foundation or its products. Further, in most cases the companies 
are not aware of their being listed on this site at all.
  
  <>
  
@@ -16, +16 @@

  This section contains cases that publicly described their Tomcat experience 
or installation.
  
  === AppFuse ===
- {{http://today.java.net/images/tiles/111-appfuse.gif}} Raible Designs' 
[[http://today.java.net/pub/a/today/2004/07/15/thefuse.html|AppFuse]] runs best 
on

svn commit: r1079329 - /tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 11:28:15 2011
New Revision: 1079329

URL: http://svn.apache.org/viewvc?rev=1079329&view=rev
Log:
Add missing message

Modified:
tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties?rev=1079329&r1=1079328&r2=1079329&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties Tue Mar  
8 11:28:15 2011
@@ -32,6 +32,7 @@ http11processor.request.finish=Error fin
 http11processor.response.finish=Error finishing response
 http11processor.socket.info=Exception getting socket information
 http11processor.socket.ssl=Exception getting SSL attributes
+http11processor.socket.sslreneg=Exception re-negotiating SSL connection
 http11processor.socket.timeout=Error setting socket timeout
 
 iib.eof.error=Unexpected EOF read on the socket



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



svn commit: r1079323 - /tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 11:15:37 2011
New Revision: 1079323

URL: http://svn.apache.org/viewvc?rev=1079323&view=rev
Log:
Refactor to address https://issues.apache.org/bugzilla/show_bug.cgi?id=48208#c13
Don't configure a TrustManagerFactory instance if it isn't going to be used.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=1079323&r1=1079322&r2=1079323&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
Tue Mar  8 11:15:37 2011
@@ -566,6 +566,19 @@ public class JSSESocketFactory implement
 throws Exception {
 String crlf = endpoint.getCrlFile();
 
+String className = endpoint.getTrustManagerClassName();
+if(className != null && className.length() > 0) {
+ ClassLoader classLoader = getClass().getClassLoader();
+ Class clazz = classLoader.loadClass(className);
+ if(!(TrustManager.class.isAssignableFrom(clazz))){
+throw new InstantiationException(sm.getString(
+"jsse.invalidTrustManagerClassName", className));
+ }
+ Object trustManagerObject = clazz.newInstance();
+ TrustManager trustManager = (TrustManager) trustManagerObject;
+ return new TrustManager[]{ trustManager };
+}
+
 TrustManager[] tms = null;
 
 KeyStore trustStore = getTrustStore(keystoreType, keystoreProvider);
@@ -574,7 +587,7 @@ public class JSSESocketFactory implement
 TrustManagerFactory tmf =
 TrustManagerFactory.getInstance(algorithm);
 tmf.init(trustStore);
-tms = getTrustManagers(tmf);
+tms = tmf.getTrustManagers();
 } else {
 TrustManagerFactory tmf =
 TrustManagerFactory.getInstance(algorithm);
@@ -583,7 +596,7 @@ public class JSSESocketFactory implement
 ManagerFactoryParameters mfp =
 new CertPathTrustManagerParameters(params);
 tmf.init(mfp);
-tms = getTrustManagers(tmf);
+tms = tmf.getTrustManagers();
 }
 }
 
@@ -591,35 +604,6 @@ public class JSSESocketFactory implement
 }
 
 /**
- * Gets the TrustManagers either from Connector's
- * trustManagerClassName attribute (if set) else from the
- * {@link TrustManagerFactory}.
- * @return The TrustManagers to use for this connector.
- * @throws NoSuchAlgorithmException 
- * @throws ClassNotFoundException 
- * @throws IllegalAccessException 
- * @throws InstantiationException 
-*/
-   protected TrustManager[] getTrustManagers(TrustManagerFactory tmf)
-   throws NoSuchAlgorithmException, ClassNotFoundException,
-   InstantiationException, IllegalAccessException {
-
-   String className = endpoint.getTrustManagerClassName();
-   if(className != null && className.length() > 0) {
-ClassLoader classLoader = getClass().getClassLoader();
-Class clazz = classLoader.loadClass(className);
-if(!(TrustManager.class.isAssignableFrom(clazz))){
-   throw new InstantiationException(sm.getString(
-   "jsse.invalidTrustManagerClassName", className));
-}
-Object trustManagerObject = clazz.newInstance();
-TrustManager trustManager = (TrustManager) trustManagerObject;
-return new TrustManager[]{ trustManager };
-}  
-   return tmf.getTrustManagers();
-   }
-
-/**
  * Return the initialization parameters for the TrustManager.
  * Currently, only the default PKIX is supported.
  * 



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



DO NOT REPLY [Bug 26701] Enabling web applications to register their own stream handlers

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=26701

--- Comment #2 from Mark Thomas  2011-03-08 06:05:33 EST ---
I would add that adding stream handlers via the java.protocol.handler.pkgs
system property was and remains an alternative option.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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: r1079320 - in /tomcat/trunk/java/org/apache/naming/resources: Constants.java DirContextURLStreamHandler.java jndi/ jndi/Handler.java

2011-03-08 Thread markt
Author: markt
Date: Tue Mar  8 11:04:38 2011
New Revision: 1079320

URL: http://svn.apache.org/viewvc?rev=1079320&view=rev
Log:
Restore the ability to register the Tomcat jndi URL handler via the 
java.protocol.handler.pkgs system property.

Added:
tomcat/trunk/java/org/apache/naming/resources/jndi/   (props changed)
  - copied from r1078797, 
tomcat/trunk/java/org/apache/naming/resources/jndi/
Modified:
tomcat/trunk/java/org/apache/naming/resources/Constants.java

tomcat/trunk/java/org/apache/naming/resources/DirContextURLStreamHandler.java
tomcat/trunk/java/org/apache/naming/resources/jndi/Handler.java

Modified: tomcat/trunk/java/org/apache/naming/resources/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/Constants.java?rev=1079320&r1=1079319&r2=1079320&view=diff
==
--- tomcat/trunk/java/org/apache/naming/resources/Constants.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/Constants.java Tue Mar  8 
11:04:38 2011
@@ -24,5 +24,9 @@ package org.apache.naming.resources;
  */
 
 public final class Constants {
+
+public static final String PROTOCOL_HANDLER_VARIABLE = 
+"java.protocol.handler.pkgs";
+
 public static final String Package = "org.apache.naming.resources";
 }

Modified: 
tomcat/trunk/java/org/apache/naming/resources/DirContextURLStreamHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/DirContextURLStreamHandler.java?rev=1079320&r1=1079319&r2=1079320&view=diff
==
--- 
tomcat/trunk/java/org/apache/naming/resources/DirContextURLStreamHandler.java 
(original)
+++ 
tomcat/trunk/java/org/apache/naming/resources/DirContextURLStreamHandler.java 
Tue Mar  8 11:04:38 2011
@@ -133,6 +133,23 @@ public class DirContextURLStreamHandler 
 
 
 /**
+ * Set the java.protocol.handler.pkgs system property. For use when
+ * embedding Tomcat and the embedding application has already set its own
+ * {@link java.net.URLStreamHandlerFactory}.
+ */
+public static void setProtocolHandler() {
+String value = System.getProperty(Constants.PROTOCOL_HANDLER_VARIABLE);
+if (value == null) {
+value = Constants.Package;
+System.setProperty(Constants.PROTOCOL_HANDLER_VARIABLE, value);
+} else if (value.indexOf(Constants.Package) == -1) {
+value += "|" + Constants.Package;
+System.setProperty(Constants.PROTOCOL_HANDLER_VARIABLE, value);
+}
+}
+
+
+/**
  * Returns true if the thread or the context class loader of the current 
  * thread is bound.
  */

Propchange: tomcat/trunk/java/org/apache/naming/resources/jndi/
--
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Mar  8 11:04:38 2011
@@ -0,0 +1 @@
+/tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/jndi:742915

Modified: tomcat/trunk/java/org/apache/naming/resources/jndi/Handler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/jndi/Handler.java?rev=1079320&r1=1078797&r2=1079320&view=diff
==
--- tomcat/trunk/java/org/apache/naming/resources/jndi/Handler.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/jndi/Handler.java Tue Mar  8 
11:04:38 2011
@@ -14,16 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */ 
-
 package org.apache.naming.resources.jndi;
 
 import org.apache.naming.resources.DirContextURLStreamHandler;
 
 /**
- * Stream handler to a JNDI directory context.
- * 
- * @author mailto:r...@apache.org";>Remy Maucherat
- * @version $Revision$
+ * Stream handler to a JNDI directory context. For use when
+ * embedding Tomcat and the embedding application has already set its own
+ * {@link java.net.URLStreamHandlerFactory} and the Tomcat jndi handler needs 
to
+ * be registered via the java.protocol.handler.pkgs system property.
  */
 public class Handler extends DirContextURLStreamHandler {
 



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



DO NOT REPLY [Bug 50872] Intermittent SSL failure - client certificate not found

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50872

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #3 from Mark Thomas  2011-03-08 05:38:13 EST ---
Outbound SSL connections are entirely an application concern. Tomcat plays no
role in them. This is not a Tomcat bug. The users list is the place to seek
help with this.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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



Re: svn commit: r1078595 - /tomcat/trunk/java/org/apache/naming/resources/DirContextURLStreamHandler.java

2011-03-08 Thread Mark Thomas
On 08/03/2011 01:56, Konstantin Kolinko wrote:
> 2011/3/7  :
>> Author: markt
>> Date: Sun Mar  6 22:02:28 2011
>> New Revision: 1078595
>>
>> URL: http://svn.apache.org/viewvc?rev=1078595&view=rev
>> Log:
>> Clean-up, mainly unused code
>>
>> Modified:
>>
>> tomcat/trunk/java/org/apache/naming/resources/DirContextURLStreamHandler.java
>>
> 
> Apparently it was the alternative method to configure protocol handler
> for the jndi: URLs,  instead of using a custom URLStreamHandlerFactory
> implementation, as documented in JavaDoc for constructors of
> java.net.URL. [1]

Ah. I went looking for that but didn't find it.

This raises a question about how to handle custom protocols for both
Tomcat's jndi protocol and and application protocols. Prior to the
recent changes:
- Tomcat registered a custom URLStreamHandlerFactory
- Web applications had to use java.protocol.handler.pkgs
- When embedded and already using a custom URLStreamHandlerFactory,
Tomcat's jndi handler had to be manually registered by the embedding
code either by calling DirContextURLStreamHandler#setProtocolHandler()
or by manually setting java.protocol.handler.pkgs

With all of the recent changes:
- Tomcat registers a custom URLStreamHandlerFactory
- Web applications can register with Tomcat's URLStreamHandlerFactory or
use java.protocol.handler.pkgs
- When embedded and already using a custom URLStreamHandlerFactory, the
embedding Tomcat's URLStreamHandlerFactory has to used by the
application's URLStreamHandlerFactory.

This looks like a step backwards for the embedded case. I'll restore
Tomcat 7's support for registration via java.protocol.handler.pkgs

Mark

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



DO NOT REPLY [Bug 50872] Intermittent SSL failure - client certificate not found

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50872

--- Comment #2 from Clive Nicholson  2011-03-08 
05:28:04 EST ---
(In reply to comment #1)
> Without the connector configuration and a reproducible test case, this is
> likely to get resolved as "WORKSFORME"

The connector from the Tomcat 'server.xml' file is shown below:
   

However, the servlet running under Tomcat initiates a SSL connection to an
external web service and it is not using the keystore configured in the http
connector (which I assume is for inbound SSL connections). The application has
its own configuration file where the location of its keystore, its password and
other parameters are defined. During the SSL handshake the external server
requests our server's certificate which it should obtain from this application
keystore. As stated previously, this works okay initally but seems to stop
working after some unknown time has elapsed. Could it be that somehow it is
searching the wrong keystore for the server's certificate (i.e. the keystore
configured in the connector as opposed to the application's keystore)?

I will enable the SSL debug option '-Djavax.net.debug="all"' in the Tomcat
start-up to see if I can get anymore information.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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



DO NOT REPLY [Bug 50887] Enhancement to set security-provider within AjpAprProcessor

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50887

--- Comment #1 from pkn...@mtg.de 2011-03-08 05:19:58 EST ---
Mark Thomas has commented by email:

>The patch raises a couple of questions for me.
> - Security providers are normally configured at the JVM level.
> - Patches that change one of 5 connectors usually mean the other
>connectors need changing too
> - There are other places where CertificateFactory is used that may
>conflict with this patch.


I will not define the provider in the JVM. For that I have to insert e.g.
bouncycastle at the first position to not get sun security-provider for X.509
CertificateFactory. With that definition bouncycastle is used anywhere within
the JVM first. This could lead to some other effects I cannot estimate.


I'm not able to see if the changes are necessary for other connectors. 
For Http11AprProcessor and AjpProcessor it is nearly the same as for
AjpArProcessor. 
Http11NioProcessor and Http11Processor are not using CertificateFactory. 

The last remark is unclear for me. With my proposed patch all other places are
unchanged. So there will be no conflict.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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



DO NOT REPLY [Bug 50887] New: Enhancement to set security-provider within AjpAprProcessor

2011-03-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50887

   Summary: Enhancement to set security-provider within
AjpAprProcessor
   Product: Tomcat 6
   Version: 6.0.32
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: pkn...@mtg.de


Created an attachment (id=26742)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26742)
Patches to set a securityProvider 

We need support of X.509 certificates using elliptic curves for client-auth
within an servlet-application.

The certificates we use are coded using DomainParameters within the
PublicKey object. When using the sun-jdk this will
lead to an error because the sun-jce implementation only supports elliptic
curves as NamedCurves.

The best way to fix this is to use another security-provider e.g.
bouncycastle.
For that we need a way to configure it within tomcat.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- 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