DO NOT REPLY [Bug 43548] xml schema for tomcat-users.xml

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43548





--- Comment #6 from Mark Thomas   2009-06-05 16:53:10 PST ---
No problem. http://www.apache.org/dev/contributors.html is probably the best we
have. If you have any questions just ask on the dev list.

-- 
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 47318] Tomcat 6.0.20 does not include imports from included JSP

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47318





--- Comment #5 from Mark Thomas   2009-06-05 16:49:32 PST ---
Yep, that patch was the culprit although a little indirectly.

It has been fixed in trunk and the patch proposed for 6.0.x. I've also added it
to the 5.5.x back port

-- 
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: r782171 - /tomcat/current/tc5.5.x/STATUS.txt

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 23:48:57 2009
New Revision: 782171

URL: http://svn.apache.org/viewvc?rev=782171&view=rev
Log:
Add extra patch required to prevent regression

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

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=782171&r1=782170&r2=782171&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Fri Jun  5 23:48:57 2009
@@ -30,9 +30,16 @@
   This patch includes a port of the work from TC6 that removed the need for the
   text replacement hack as part of the EL processing.
   http://people.apache.org/~markt/patches/2009-01-01-bug36923.patch
+  *NOTE* Following patch is also required to prevent regression as per bug 
47318
   +1: markt, kkolinko
   -1: 
 
+* Patch to prevent regression with above fix for 36923 (ie bug 47318)
+  http://svn.apache.org/viewvc?rev=782168&view=rev
+  +1: markt
+  -1:
+
+
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=38483
   Make access log valves thread safe
   http://people.apache.org/~markt/patches/2009-02-04-bug38483.patch



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



DO NOT REPLY [Bug 43548] xml schema for tomcat-users.xml

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43548





--- Comment #5 from Olivier Croisier   2009-06-05 
16:46:18 PST ---
(In reply to comment #4)
> Bugs aren't closed until a patch has been applied to a release branch.

Sorry, that was my first patch submission ever (but not the last I hope).
Are there any guidelines available I could read for the patch submission
process ?

-- 
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: r782168 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 23:37:21 2009
New Revision: 782168

URL: http://svn.apache.org/viewvc?rev=782168&view=rev
Log:
Propose fix for 47318

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=782168&r1=782167&r2=782168&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Jun  5 23:37:21 2009
@@ -151,3 +151,9 @@
   http://svn.apache.org/viewvc?rev=782145&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47318
+  Process include preludes and codas for directivesOnly as well as full pages
+  http://svn.apache.org/viewvc?rev=782166&view=rev
+  +1: markt
+  -1: 



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



DO NOT REPLY [Bug 43548] xml schema for tomcat-users.xml

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43548


Mark Thomas  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |




--- Comment #4 from Mark Thomas   2009-06-05 16:36:47 PST ---
Bugs aren't closed until a patch has been applied to a release branch.

-- 
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: r782166 - /tomcat/trunk/java/org/apache/jasper/compiler/Parser.java

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 23:35:14 2009
New Revision: 782166

URL: http://svn.apache.org/viewvc?rev=782166&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47318
Process include preludes and codas when processing directives and whole pages.

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

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=782166&r1=782165&r2=782166&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Fri Jun  5 
23:35:14 2009
@@ -124,25 +124,24 @@
 root.setIsDefaultPageEncoding(isDefaultPageEncoding);
 root.setIsBomPresent(isBomPresent);
 
-if (directivesOnly) {
-parser.parseTagFileDirectives(root);
-return new Node.Nodes(root);
-}
 
-// For the Top level page, add inlcude-prelude and include-coda
+// For the Top level page, add include-prelude and include-coda
 PageInfo pageInfo = pc.getCompiler().getPageInfo();
 if (parent == null) {
 parser.addInclude(root, pageInfo.getIncludePrelude());
 }
-while (reader.hasMoreInput()) {
-parser.parseElements(root);
+if (directivesOnly) {
+parser.parseTagFileDirectives(root);
+} else {
+while (reader.hasMoreInput()) {
+parser.parseElements(root);
+}
 }
 if (parent == null) {
 parser.addInclude(root, pageInfo.getIncludeCoda());
 }
 
-Node.Nodes page = new Node.Nodes(root);
-return page;
+return new Node.Nodes(root);
 }
 
 /**



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



DO NOT REPLY [Bug 43548] xml schema for tomcat-users.xml

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43548


Olivier Croisier  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from Olivier Croisier   2009-06-05 
16:34:02 PST ---
Here is a patch for the tomcat-users.xml file that adds the DTD import header,
and the corresponding DTD file.

-- 
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 43548] xml schema for tomcat-users.xml

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43548





--- Comment #2 from Olivier Croisier   2009-06-05 
16:32:12 PST ---
Created an attachment (id=23767)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23767)
A proposed tomcat-users DTD

-- 
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 43548] xml schema for tomcat-users.xml

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43548





--- Comment #1 from Olivier Croisier   2009-06-05 
16:31:13 PST ---
Created an attachment (id=23766)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23766)
Added a DTD import header in tomcat-users.xml

-- 
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 47149] Build fail (encoding error)on Chinese version Windows XP OS

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47149





--- Comment #8 from Xie Xiaodong   2009-06-05 15:52:16 PST 
---
Just add encoding="ISO-8859-1" at the end of all javac element.

-- 
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 47149] Build fail (encoding error)on Chinese version Windows XP OS

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47149





--- Comment #7 from Xie Xiaodong   2009-06-05 15:51:22 PST 
---
The patch proposed by Konstantin Kolinko works fine for me. I think we could
close this issue.

-- 
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 47149] Build fail (encoding error)on Chinese version Windows XP OS

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47149





--- Comment #6 from Konstantin Kolinko   2009-06-05 
15:00:11 PST ---
One correction: There is an easier way: use encoding="ISO-8859-1" attribute on
the javac task. I see no need for the explicit .

-- 
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 47299] Cannot override StandardContext in embedding case because of StandardSession.fireContainerEvent

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47299





--- Comment #2 from Mark Thomas   2009-06-05 14:40:52 PST ---
Fixed in trunk and proposed for 6.0.x

-- 
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: r782147 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 21:40:48 2009
New Revision: 782147

URL: http://svn.apache.org/viewvc?rev=782147&view=rev
Log:
Propose fix for 47299

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=782147&r1=782146&r2=782147&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Jun  5 21:40:48 2009
@@ -145,3 +145,9 @@
   https://issues.apache.org/bugzilla/attachment.cgi?id=23764
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47299
+  Simply code. Make it work with classes that extend StandardContext
+  http://svn.apache.org/viewvc?rev=782145&view=rev
+  +1: markt
+  -1: 



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



svn commit: r782145 - /tomcat/trunk/java/org/apache/catalina/session/StandardSession.java

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 21:38:44 2009
New Revision: 782145

URL: http://svn.apache.org/viewvc?rev=782145&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47299
Simplify fireContainerEvent method and enable it to work with implementations 
that extend StandardContext.
See http://svn.apache.org/viewvc?view=rev&revision=287710 for why it was 
written this way originally.

Modified:
tomcat/trunk/java/org/apache/catalina/session/StandardSession.java

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=782145&r1=782144&r2=782145&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Fri Jun  
5 21:38:44 2009
@@ -25,7 +25,6 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
-import java.lang.reflect.Method;
 import java.security.AccessController;
 import java.security.Principal;
 import java.security.PrivilegedAction;
@@ -57,6 +56,7 @@
 import org.apache.catalina.util.Enumerator;
 import org.apache.catalina.util.StringManager;
 
+import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.security.SecurityUtil;
 
 /**
@@ -142,24 +142,6 @@
 
 
 /**
- * The java.lang.Method for the
- * fireContainerEvent() method of the
- * org.apache.catalina.core.StandardContext method,
- * if our Context implementation is of this class.  This value is
- * computed dynamically the first time it is needed, or after
- * a session reload (since it is declared transient).
- */
-protected transient Method containerEventMethod = null;
-
-
-/**
- * The method signature for the fireContainerEvent method.
- */
-protected static final Class containerEventTypes[] =
-{ String.class, Object.class };
-
-
-/**
  * The time this session was created, in milliseconds since midnight,
  * January 1, 1970 GMT.
  */
@@ -1594,21 +1576,10 @@
 String type, Object data)
 throws Exception {
 
-if (!"org.apache.catalina.core.StandardContext".equals
-(context.getClass().getName())) {
-return; // Container events are not supported
-}
-// NOTE:  Race condition is harmless, so do not synchronize
-if (containerEventMethod == null) {
-containerEventMethod =
-context.getClass().getMethod("fireContainerEvent",
- containerEventTypes);
-}
-Object containerEventParams[] = new Object[2];
-containerEventParams[0] = type;
-containerEventParams[1] = data;
-containerEventMethod.invoke(context, containerEventParams);
-
+if (context instanceof StandardContext) {
+// NOTE:  Race condition is harmless, so do not synchronize
+((StandardContext) context).fireContainerEvent(type, data);
+}
 }
   
 



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



DO NOT REPLY [Bug 47149] Build fail (encoding error)on Chinese version Windows XP OS

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47149





--- Comment #5 from Mark Thomas   2009-06-05 14:21:29 PST ---
Created an attachment (id=23765)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23765)
Proposed patch using ISO-8859-1

The source files aren't UTF-8 encoded. They are ISO-8859-1.

Whilst I can get a Chinese copy of XP, I doubt I;d be able to use it. Could you
test the attached patch and see if it works for you? If it does, I'll modify
the other build scripts in the same way, apply the patch to trunk and propose
it for 6.0.x

-- 
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 47149] Build fail (encoding error)on Chinese version Windows XP OS

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47149





--- Comment #4 from Mark Thomas   2009-06-05 14:13:49 PST ---
Ignore my last comment. This isn't fixed in trunk yet.

-- 
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 47318] Tomcat 6.0.20 does not include imports from included JSP

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47318





--- Comment #4 from Mark Thomas   2009-06-05 13:59:28 PST ---
I'll take a look.

-- 
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 47318] Tomcat 6.0.20 does not include imports from included JSP

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47318


Tim Funk  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW




--- Comment #3 from Tim Funk   2009-06-05 11:53:30 PST ---
It seems like this might be the culprit:

http://svn.apache.org/viewvc?view=rev&revision=708165

This does look a little serious since its convenient to stick directives into a
include-prelude so that all (or a group) of files can all get the same
directives.

Also moving status back to new - since the attached patch does reproduce the
issue.

-- 
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: r782074 - /tomcat/current/tc5.5.x/STATUS.txt

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 17:38:03 2009
New Revision: 782074

URL: http://svn.apache.org/viewvc?rev=782074&view=rev
Log:
Propose fix for regression

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

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=782074&r1=782073&r2=782074&view=diff
==
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Fri Jun  5 17:38:03 2009
@@ -123,3 +123,11 @@
   
http://people.apache.org/~kkolinko/patches/2009-06-03_nsis-download-tc55.patch
   +1: kkolinko
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47316
+  Remove use of ServerFactory to enable MapperListener to start when service
+  name != engine name
+  This is a regression caused by the fix for bug 42707
+  https://issues.apache.org/bugzilla/attachment.cgi?id=23764
+  +1: markt
+  -1: 
\ 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



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

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 17:34:13 2009
New Revision: 782073

URL: http://svn.apache.org/viewvc?rev=782073&view=rev
Log:
Propose fix for 47316

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=782073&r1=782072&r2=782073&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Jun  5 17:34:13 2009
@@ -138,3 +138,10 @@
   http://svn.apache.org/viewvc?rev=781779&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47316
+  Remove use of ServerFactory to enable MapperListener to start when service
+  name != engine name
+  https://issues.apache.org/bugzilla/attachment.cgi?id=23764
+  +1: markt
+  -1: 



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



DO NOT REPLY [Bug 47316] In config file, Service and engine names must match

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47316





--- Comment #3 from Mark Thomas   2009-06-05 10:32:12 PST ---
Created an attachment (id=23764)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23764)
Proposed patch to fix this issue

Given it was me who removed ServerFactory from trunk, you'd think I would have
figured that out.

Thanks for the tip. Patch attached.

-- 
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 47318] Tomcat 6.0.20 does not include imports from included JSP

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47318


fitness_ma...@yahoo.com changed:

   What|Removed |Added

  Attachment #23763|include-prelude issue   |include-prelude sample
description||




-- 
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 47318] Tomcat 6.0.20 does not include imports from included JSP

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47318





--- Comment #2 from fitness_ma...@yahoo.com  2009-06-05 08:46:05 PST ---
Created an attachment (id=23763)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23763)
include-prelude issue

I forgot to mention that this happened when using JSP include-prelude. I did
not try include-coda though.

I have attached a sample.

-- 
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 47320] New: Decoding jsessionid bug on z/os

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47320

   Summary: Decoding jsessionid bug on z/os
   Product: Tomcat 6
   Version: 6.0.18
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: dav...@attachmate.com


If you receive a rewritten URL on z/os with uss (unix on a mainframe), Tomcat
does not properly decode the jsessionid portion of the URL.

The problem is in org.apache.catalina.connector.CoyoteAdapter in the
parseSessionId method.

The two instantiations of a String object do not specify the encdoding to use.

e.g. String sid = new String(uriBC.getBuffer(), start + sessionIdStart,
semicolon2 - sessionIdStart); 

...as well as the second String instantiation in this method.

Consequently z/os uses its default encoding which (I think) is EBCDIC.

If I recompile with a hardcoded "UTF-8" for the encoding then the jsessionid
decodes properly.  Not that I am suggesting this literally for the official
fix.

e.g. String sid = new String(uriBC.getBuffer(), start + sessionIdStart,
semicolon2 - sessionIdStart, "UTF-8");

-- 
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: r782032 - in /tomcat/trunk/java/org/apache/catalina: connector/Connector.java core/AprLifecycleListener.java

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 14:42:43 2009
New Revision: 782032

URL: http://svn.apache.org/viewvc?rev=782032&view=rev
Log:
Differentiate between APR having been initialised and being available. Changes 
the meaning of aprInitialized so will not propose for back port.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Connector.java
tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=782032&r1=782031&r2=782032&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Fri Jun  5 
14:42:43 2009
@@ -595,7 +595,7 @@
  */
 public void setProtocol(String protocol) {
 
-if (AprLifecycleListener.isAprInitialized()) {
+if (AprLifecycleListener.isAprAvailable()) {
 if ("HTTP/1.1".equals(protocol)) {
 setProtocolHandlerClassName
 ("org.apache.coyote.http11.Http11AprProtocol");

Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=782032&r1=782031&r2=782032&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Fri 
Jun  5 14:42:43 2009
@@ -34,7 +34,7 @@
 /**
  * Implementation of LifecycleListener that will init and
  * and destroy APR.
- *
+ * 
  * @author Remy Maucherat
  * @author Filip Hanik
  * @version $Revision$ $Date$
@@ -49,7 +49,7 @@
 /**
  * The string manager for this package.
  */
-protected StringManager sm =
+protected static StringManager sm =
 StringManager.getManager(Constants.Package);
 
 
@@ -68,9 +68,12 @@
 protected static String SSLRandomSeed = "builtin";
 protected static boolean sslInitialized = false;
 protected static boolean aprInitialized = false;
+protected static boolean sslAvailable = false;
+protected static boolean aprAvailable = false;
 
-public static boolean isAprInitialized() {
-return aprInitialized;
+public static boolean isAprAvailable() {
+init();
+return aprAvailable;
 }
 
 // -- LifecycleListener Methods
@@ -83,8 +86,8 @@
 public void lifecycleEvent(LifecycleEvent event) {
 
 if (Lifecycle.INIT_EVENT.equals(event.getType())) {
-aprInitialized = init();
-if (aprInitialized) {
+init();
+if (aprAvailable) {
 try {
 initializeSSL();
 } catch (Throwable t) {
@@ -92,7 +95,7 @@
 }
 }
 } else if (Lifecycle.AFTER_STOP_EVENT.equals(event.getType())) {
-if (!aprInitialized) {
+if (!aprAvailable) {
 return;
 }
 try {
@@ -114,14 +117,16 @@
 method.invoke(null, (Object []) null);
 }
 
-private boolean init()
+private static void init()
 {
 int major = 0;
 int minor = 0;
 int patch = 0;
 if (aprInitialized) {
-return true;
+return;
 }
+aprInitialized = true;
+
 try {
 String methodName = "initialize";
 Class paramTypes[] = new Class[1];
@@ -137,7 +142,7 @@
 } catch (Throwable t) {
 log.info(sm.getString("aprListener.aprInit",
 System.getProperty("java.library.path")));
-return false;
+return;
 }
 if ((major != TCN_REQUIRED_MAJOR)  ||
 (minor < TCN_REQUIRED_MINOR) ||
@@ -154,7 +159,7 @@
 } catch (Throwable t) {
 // Ignore
 }
-return false;
+return;
 }
 if (minor < TCN_RECOMMENDED_MIN ||
 (minor == TCN_RECOMMENDED_MIN && patch <  TCN_RECOMMENDED_PV)) 
{
@@ -174,7 +179,7 @@
 Boolean.valueOf(Library.APR_HAS_SENDFILE), 
 Boolean.valueOf(Library.APR_HAS_SO_ACCEPTFILTER),
 Boolean.valueOf(Library.APR_HAS_RANDOM)));
-return true;
+aprAvailable = true;
 }
 
 private static synchronized void initializeSSL()
@@ -189,6 +194,8 @@
  //only once per VM
 return;
 }
+sslInitialized = true;
+
 String methodName = "randSet";
 Class paramTypes[] = new Class[1];
 paramTypes[0] = String.class;
@@ -204,7 +211,7 @@
 method = clazz.getMeth

DO NOT REPLY [Bug 47316] In config file, Service and engine names must match

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47316





--- Comment #2 from Remy Maucherat   2009-06-05 07:09:48 PST 
---
Actually, you can fix it by removing the use of ServerFactory, and get the
engine through the connector.

-- 
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: r782021 - /tomcat/tc6.0.x/trunk/STATUS.txt

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 14:05:38 2009
New Revision: 782021

URL: http://svn.apache.org/viewvc?rev=782021&view=rev
Log:
Cancel patch proposal. It stops APR working altogether. My local testing 
initially showed this was OK. Must have got something wrong in my test env 
somewhere. Working on a better solution...

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=782021&r1=782020&r2=782021&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Jun  5 14:05:38 2009
@@ -138,9 +138,3 @@
   http://svn.apache.org/viewvc?rev=781779&view=rev
   +1: markt
   -1: 
-
-* Only enable APR via the listener. Prevents unexpected enabling of APR when
-  Listener is disabled
-  http://svn.apache.org/viewvc?rev=782000&view=rev
-  +1: markt
-  -1: 



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



svn commit: r782013 - /tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 13:47:50 2009
New Revision: 782013

URL: http://svn.apache.org/viewvc?rev=782013&view=rev
Log:
Fix the logic for the min version tests

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

Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=782013&r1=782012&r2=782013&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Fri 
Jun  5 13:47:50 2009
@@ -141,7 +141,7 @@
 }
 if ((major != TCN_REQUIRED_MAJOR)  ||
 (minor < TCN_REQUIRED_MINOR) ||
-(patch <  TCN_REQUIRED_PATCH)) {
+(minor == TCN_REQUIRED_MINOR && patch <  TCN_REQUIRED_PATCH)) {
 log.error(sm.getString("aprListener.tcnInvalid", major + "."
 + minor + "." + patch,
 TCN_REQUIRED_MAJOR + "." +
@@ -157,7 +157,7 @@
 return false;
 }
 if (minor < TCN_RECOMMENDED_MIN ||
-(minor >= TCN_RECOMMENDED_MIN && patch <  TCN_RECOMMENDED_PV)) 
{
+(minor == TCN_RECOMMENDED_MIN && patch <  TCN_RECOMMENDED_PV)) 
{
 log.info(sm.getString("aprListener.tcnVersion", major + "."
 + minor + "." + patch,
 TCN_REQUIRED_MAJOR + "." +



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



svn commit: r782010 - /tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 13:17:28 2009
New Revision: 782010

URL: http://svn.apache.org/viewvc?rev=782010&view=rev
Log:
Allow trunk to work with native trunk (1.2.x) and the 1.1.x branch.
Update recommended version to latest.
Note minor version number changes are meant to be binary compatible with 
previous versions.

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

Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=782010&r1=782009&r2=782010&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Fri 
Jun  5 13:17:28 2009
@@ -59,7 +59,8 @@
 protected static final int TCN_REQUIRED_MAJOR = 1;
 protected static final int TCN_REQUIRED_MINOR = 1;
 protected static final int TCN_REQUIRED_PATCH = 8;
-protected static final int TCN_RECOMMENDED_PV = 10;
+protected static final int TCN_RECOMMENDED_MIN = 1;
+protected static final int TCN_RECOMMENDED_PV = 16;
 
 
 // -- Properties
@@ -139,7 +140,7 @@
 return false;
 }
 if ((major != TCN_REQUIRED_MAJOR)  ||
-(minor != TCN_REQUIRED_MINOR) ||
+(minor < TCN_REQUIRED_MINOR) ||
 (patch <  TCN_REQUIRED_PATCH)) {
 log.error(sm.getString("aprListener.tcnInvalid", major + "."
 + minor + "." + patch,
@@ -155,11 +156,12 @@
 }
 return false;
 }
-if (patch <  TCN_RECOMMENDED_PV) {
+if (minor < TCN_RECOMMENDED_MIN ||
+(minor >= TCN_RECOMMENDED_MIN && patch <  TCN_RECOMMENDED_PV)) 
{
 log.info(sm.getString("aprListener.tcnVersion", major + "."
 + minor + "." + patch,
 TCN_REQUIRED_MAJOR + "." +
-TCN_REQUIRED_MINOR + "." +
+TCN_RECOMMENDED_MIN + "." +
 TCN_RECOMMENDED_PV));
 }
 



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



svn commit: r782007 - /tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 13:11:42 2009
New Revision: 782007

URL: http://svn.apache.org/viewvc?rev=782007&view=rev
Log:
Fix wording on version warning message

Modified:
tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties?rev=782007&r1=782006&r2=782007&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Fri Jun  
5 13:11:42 2009
@@ -39,7 +39,7 @@
 applicationResponse.badResponse=Response is not a 
javax.servlet.ServletResponseWrapper
 aprListener.aprInit=The APR based Apache Tomcat Native library which allows 
optimal performance in production environments was not found on the 
java.library.path: {0}
 aprListener.tcnInvalid=An incompatible version {0} of the APR based Apache 
Tomcat Native library is installed, while Tomcat requires version {1} 
-aprListener.tcnVersion=An older version {0} of the APR based Apache Tomcat 
Native library is installed, while Tomcat recommends version greater then {1}
+aprListener.tcnVersion=An older version {0} of the APR based Apache Tomcat 
Native library is installed, while Tomcat recommends a minimum version of {1}
 aprListener.aprDestroy=Failed shutdown of APR based Apache Tomcat Native 
library
 aprListener.sslInit=Failed to initialize the SSLEngine.
 aprListener.tcnValid=Loaded APR based Apache Tomcat Native library {0}.



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



svn commit: r782005 - /tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 13:04:27 2009
New Revision: 782005

URL: http://svn.apache.org/viewvc?rev=782005&view=rev
Log:
Simplify logging.

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

Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=782005&r1=782004&r2=782005&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Fri 
Jun  5 13:04:27 2009
@@ -87,11 +87,7 @@
 try {
 initializeSSL();
 } catch (Throwable t) {
-if (!log.isDebugEnabled()) {
-log.info(sm.getString("aprListener.sslInit"));
-} else {
-log.debug(sm.getString("aprListener.sslInit"), t);
-}
+log.info(sm.getString("aprListener.sslInit"));
 }
 }
 } else if (Lifecycle.AFTER_STOP_EVENT.equals(event.getType())) {
@@ -101,11 +97,7 @@
 try {
 terminateAPR();
 } catch (Throwable t) {
-if (!log.isDebugEnabled()) {
-log.info(sm.getString("aprListener.aprDestroy"));
-} else {
-log.debug(sm.getString("aprListener.aprDestroy"), t);
-}
+log.info(sm.getString("aprListener.aprDestroy"));
 }
 }
 
@@ -142,13 +134,8 @@
 minor = clazz.getField("TCN_MINOR_VERSION").getInt(null);
 patch = clazz.getField("TCN_PATCH_VERSION").getInt(null);
 } catch (Throwable t) {
-if (!log.isDebugEnabled()) {
-log.info(sm.getString("aprListener.aprInit",
-System.getProperty("java.library.path")));
-} else {
-log.debug(sm.getString("aprListener.aprInit",
-System.getProperty("java.library.path")), t);
-}
+log.info(sm.getString("aprListener.aprInit",
+System.getProperty("java.library.path")));
 return false;
 }
 if ((major != TCN_REQUIRED_MAJOR)  ||
@@ -169,28 +156,16 @@
 return false;
 }
 if (patch <  TCN_RECOMMENDED_PV) {
-if (!log.isDebugEnabled()) {
-log.info(sm.getString("aprListener.tcnVersion", major + "."
-+ minor + "." + patch,
-TCN_REQUIRED_MAJOR + "." +
-TCN_REQUIRED_MINOR + "." +
-TCN_RECOMMENDED_PV));
-} else {
-log.debug(sm.getString("aprListener.tcnVersion", major + "."
-+ minor + "." + patch,
-TCN_REQUIRED_MAJOR + "." +
-TCN_REQUIRED_MINOR + "." +
-TCN_RECOMMENDED_PV));
-}
+log.info(sm.getString("aprListener.tcnVersion", major + "."
++ minor + "." + patch,
+TCN_REQUIRED_MAJOR + "." +
+TCN_REQUIRED_MINOR + "." +
+TCN_RECOMMENDED_PV));
 }
-if (!log.isDebugEnabled()) {
-   log.info(sm.getString("aprListener.tcnValid", major + "."
+
+log.info(sm.getString("aprListener.tcnValid", major + "."
 + minor + "." + patch));
-}
-else {
-   log.debug(sm.getString("aprListener.tcnValid", major + "."
- + minor + "." + patch));
-}
+
 // Log APR flags
 log.info(sm.getString("aprListener.flags",
 Boolean.valueOf(Library.APR_HAVE_IPV6),



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



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

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 12:47:21 2009
New Revision: 782002

URL: http://svn.apache.org/viewvc?rev=782002&view=rev
Log:
Propose patch

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=782002&r1=782001&r2=782002&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Jun  5 12:47:21 2009
@@ -138,3 +138,9 @@
   http://svn.apache.org/viewvc?rev=781779&view=rev
   +1: markt
   -1: 
+
+* Only enable APR via the listener. Prevents unexpected enabling of APR when
+  Listener is disabled
+  http://svn.apache.org/viewvc?rev=782000&view=rev
+  +1: markt
+  -1: 



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



svn commit: r782000 - in /tomcat/trunk/java/org/apache/catalina: connector/Connector.java core/AprLifecycleListener.java

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 12:45:13 2009
New Revision: 782000

URL: http://svn.apache.org/viewvc?rev=782000&view=rev
Log:
Don't try an init APR in the connector. Let the listener do it. Prevents 
unexpected enabling of APR just because the DLL is present.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Connector.java
tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=782000&r1=781999&r2=782000&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Fri Jun  5 
12:45:13 2009
@@ -18,7 +18,6 @@
 
 package org.apache.catalina.connector;
 
-import java.lang.reflect.Method;
 import java.net.URLEncoder;
 import java.util.HashMap;
 
@@ -32,6 +31,7 @@
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.Service;
+import org.apache.catalina.core.AprLifecycleListener;
 import org.apache.catalina.core.StandardEngine;
 import org.apache.catalina.util.LifecycleSupport;
 import org.apache.catalina.util.StringManager;
@@ -587,54 +587,6 @@
 
 }
 
-// -- APR Version Constants
-
-private static final int TCN_REQUIRED_MAJOR = 1;
-private static final int TCN_REQUIRED_MINOR = 1;
-private static final int TCN_REQUIRED_PATCH = 3;
-private static boolean aprInitialized = false;
-
-// APR init support
-private static synchronized void initializeAPR()
-{
-if (aprInitialized) {
-return;
-}
-int major = 0;
-int minor = 0;
-int patch = 0;
-try {
-String methodName = "initialize";
-Class paramTypes[] = new Class[1];
-paramTypes[0] = String.class;
-Object paramValues[] = new Object[1];
-paramValues[0] = null;
-Class clazz = Class.forName("org.apache.tomcat.jni.Library");
-Method method = clazz.getMethod(methodName, paramTypes);
-method.invoke(null, paramValues);
-major = clazz.getField("TCN_MAJOR_VERSION").getInt(null);
-minor = clazz.getField("TCN_MINOR_VERSION").getInt(null);
-patch = clazz.getField("TCN_PATCH_VERSION").getInt(null);
-} catch (Throwable t) {
-return;
-}
-if ((major != TCN_REQUIRED_MAJOR) ||
-(minor != TCN_REQUIRED_MINOR) ||
-(patch <  TCN_REQUIRED_PATCH)) {
-try {
-// Terminate the APR in case the version
-// is below required.
-String methodName = "terminate";
-Method method = Class.forName("org.apache.tomcat.jni.Library")
-.getMethod(methodName, (Class [])null);
-method.invoke(null, (Object []) null);
-} catch (Throwable t) {
-// Ignore
-}
-return;
-}
-aprInitialized = true;
-}
 
 /**
  * Set the Coyote protocol which will be used by the connector.
@@ -643,10 +595,7 @@
  */
 public void setProtocol(String protocol) {
 
-// Test APR support
-initializeAPR();
-
-if (aprInitialized) {
+if (AprLifecycleListener.isAprInitialized()) {
 if ("HTTP/1.1".equals(protocol)) {
 setProtocolHandlerClassName
 ("org.apache.coyote.http11.Http11AprProtocol");

Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=782000&r1=781999&r2=782000&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Fri 
Jun  5 12:45:13 2009
@@ -68,6 +68,10 @@
 protected static boolean sslInitialized = false;
 protected static boolean aprInitialized = false;
 
+public static boolean isAprInitialized() {
+return aprInitialized;
+}
+
 // -- LifecycleListener Methods
 
 /**
@@ -241,4 +245,5 @@
 public void setSSLRandomSeed(String SSLRandomSeed) {
 AprLifecycleListener.SSLRandomSeed = SSLRandomSeed;
 }
+
 }



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



DO NOT REPLY [Bug 47319] New: With APR, getRemoteHost() returns NULL for unknown clients

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47319

   Summary: With APR, getRemoteHost() returns NULL for unknown
clients
   Product: Tomcat Native
   Version: unspecified
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P3
 Component: Library
AssignedTo: dev@tomcat.apache.org
ReportedBy: pauls...@yahoo.com


Hello,

I posted this info to the tomcat users mailing list and am following Mark
Thomas' advice to open a bug report:

My setup is a RedHat 5 server (32 bit) running Tomcat 6.0.20 with Tomcat Native
1.1.16 libraries and Sun JDK 1.6.0_14.  I've built and installed Tomcat Native
as described in http://tomcat.apache.org/native-doc/

The server.xml file has been modified to add enableLookups="true" to the HTTP
Connector entry:



Now, when the client exists in the DNS, reverse lookups via
HttpServletRequest.getRemoteHost() work fine whether or not I'm using APR.

The problem is, when attempting a reverse lookup for a client that is not found
in the naming service, the behaviour of getRemoteHost() depends on whether or
not APR is being used.  Specifically, without APR, the method returns the
dotted-string form of the IP address (consistent with the doc
http://java.sun.com/webservices/docs/1.6/api/javax/servlet/ServletRequest.html#getRemoteHost()
).  However, when APR is enabled, the method returns NULL.

I can reproduce the problem using a simple test servlet:

# cat GetAddress.java
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class GetAddress extends HttpServlet {
  public void doGet(HttpServletRequest request,HttpServletResponse response)
throws IOException, ServletException{
response.setContentType("text/html");
PrintWriter out = response.getWriter();   
out.println("Hostname of request : "
+request.getRemoteHost()+"");
out.println("IP Address of request : "
+request.getRemoteAddr());
  }
}

If LD_LIBRARY_PATH is set to $CATALINA_HOME/lib, catalina.out confirms APR is
enabled:

05-Jun-2009 11:09:01 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.16.
05-Jun-2009 11:09:01 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false],
random [true].
05-Jun-2009 11:09:02 org.apache.coyote.http11.Http11AprProtocol init

>From my client unknown to the DNS, the web page shows "Hostname of request:
null ... IP Address of request: "

Now, after simply unsetting LD_LIBRARY_PATH and restarting Tomcat (catalina.out
confirms APR is not used), a request from the same client correctly shows
"Hostname of request: ... IP Address of request: "


This behaviour with APR is causing problems for a third-party application that
relies on identifying the client IP/host for authentication - as the code does
not expect NULL from getRemoteHost() it denies access to the client (coming
from another company via LAN-to-LAN VPN).

Any ideas on how to debug this further?  Nothing is logged to catalina.out when
the error occurs.  I also had a quick look in the APR source but couldn't find
any reference to getRemoteHost or enableLookups so I'm not sure where this side
effect is coming from.

Thanks in advance for any feedback,

Best regards


- Paul.

-- 
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 47318] Tomcat 6.0.20 does not include imports from included JSP

2009-06-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=47318


Tim Funk  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO




--- Comment #1 from Tim Funk   2009-06-05 04:32:53 PST ---
please attach an example which reproduces this situation. I was unable to
reproduce in a very simplistic setting.

-- 
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



[SECURITY] CVE-2009-0580 UPDATED Apache Tomcat User enumeration vulnerability with FORM authentication

2009-06-05 Thread Mark Thomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Updated to clarify affected versions as they vary for each affected Realm.

CVE-2009-0580: Tomcat information disclosure vulnerability

Severity: Low

Vendor:
The Apache Software Foundation

Versions Affected:
MemoryRealm:
 Tomcat 4.1.0 to 4.1.39
 Tomcat 5.5.0 to 5.5.27
 Tomcat 6.0.0 to 6.0.18
DataSourceRealm:
 Tomcat 4.1.17 to 4.1.31
 Tomcat 5.5.0  to 5.5.5
JDBCRealm:
 Tomcat 4.1.0 to 4.1.31
 Tomcat 5.5.0 to 5.5.5

The unsupported Tomcat 3.x, 4.0.x and 5.0.x versions may be also affected.

Description:
Due to insufficient error checking in some authentication classes,
Tomcat allows for the enumeration (brute force testing) of usernames by
supplying illegally URL encoded passwords. The attack is possible if
form based authenticiaton (j_security_check) with one of the following
authentication realms is used:
 * MemoryRealm
 * DataSourceRealm
 * JDBCRealm

Mitigation:
6.0.x users should do one of the following:
 - upgrade to 6.0.20
 - apply this patch http://svn.apache.org/viewvc?rev=747840&view=rev
5.5.x users should do one of the following:
 - upgrade to 5.5.28 when released
 - apply this patch http://svn.apache.org/viewvc?rev=781379&view=rev
4.1.x users should do one of the following:
 - upgrade to 4.1.40 when released
 - apply this patch http://svn.apache.org/viewvc?rev=781382&view=rev

Example:
The following POST request should trigger an error (500 server error or
empty response, depending on the configuration) if the ROOT web
application is configured to use FORM authentication:

POST /j_security_check HTTP/1.1
Host: localhost

j_username=tomcat&j_password=%

Credit:
This issue was discovered by D. Matscheko and T. Hackner of SEC Consult.

References:
http://tomcat.apache.org/security.html

Mark Thomas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoo/a0ACgkQb7IeiTPGAkOwBgCgg32bOh5/3FWwmg+qnazFuJLy
UGAAnjGl3psau6THn7UDBjpHfSG8LZ4a
=SIJ6
-END PGP SIGNATURE-


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



svn propchange: r781751 - svn:log

2009-06-05 Thread markt
Author: markt
Revision: 781751
Modified property: svn:log

Modified: svn:log at Fri Jun  5 07:45:26 2009
--
--- svn:log (original)
+++ svn:log Fri Jun  5 07:45:26 2009
@@ -0,0 +1 @@
+Fix various WebDAV compliance issues identified by the Litmus test suite.


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



svn propchange: r781763 - svn:log

2009-06-05 Thread markt
Author: markt
Revision: 781763
Modified property: svn:log

Modified: svn:log at Fri Jun  5 07:44:53 2009
--
--- svn:log (original)
+++ svn:log Fri Jun  5 07:44:53 2009
@@ -0,0 +1,2 @@
+Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46984
+Reject requests with invalid HTTP methods with a 400 rather than a 501.


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



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

2009-06-05 Thread Mark Thomas
Konstantin Kolinko wrote:
> 2009/6/4  :
> ==
>> --- tomcat/tc6.0.x/trunk/STATUS.txt (original)
>> +++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Jun  4 15:39:21 2009
>> @@ -132,3 +132,9 @@
>> http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/
>> The rest of the change is OK.
>>   )
>> +
>> +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47158
>> +  Thread safety issues in AccessLogValve
>> +  http://svn.apache.org/viewvc?rev=781770&view=rev
>> +  +1: markt
>> +  -1:
>>
> 
> Hi, Mark!
> 
> I do not understand, what is the point of this proposal?
> I see that it just removes generics.
> 
> Tomcat 6.0 runs on JRE 1.5 or later and is built with
> compile.source=1.5
> compile.target=1.5
> 
> There is no need to avoid generics there.

No, that wouldn't make any sense at all :)

There was a typo in the svn revision number. It should make more sense now.

Mark



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



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

2009-06-05 Thread markt
Author: markt
Date: Fri Jun  5 07:37:58 2009
New Revision: 781933

URL: http://svn.apache.org/viewvc?rev=781933&view=rev
Log:
Fix typo in patch reference

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=781933&r1=781932&r2=781933&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Jun  5 07:37:58 2009
@@ -135,6 +135,6 @@
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47158
   Thread safety issues in AccessLogValve
-  http://svn.apache.org/viewvc?rev=781770&view=rev
+  http://svn.apache.org/viewvc?rev=781779&view=rev
   +1: markt
   -1: 



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