DO NOT REPLY [Bug 51624] Request is not forwarded to servlet... goes to 404 instead.

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

--- Comment #11 from Rui  2011-08-10 08:57:18 UTC ---
> If "." is valid, Tomcat would deploy "." and it will also detect every
> directory in "." (because it's the same as appBase) and separately, deploy 
> them
> as applications -
well in practice, i don't know if "." is valid, cause i never tried.
i do know that "" works nice.
understand that i'm not saying that what i have been doing is good practice...
but has never given any problems either (until the odd bug).

> each of those dirs is presumably missing a WEB-INF/web.xml,
sorry, got lost here... my web.xml works fine.

> which means that no security constraints are applied.
maybe... so how come no warning or error is reported.
i only use one.

> The extra applications
> take priority over the ROOT application (as they have a longer context path),
> so any requests to resources in them would be unprotected.
... i've only been using my single app, maybe that's why i got away with my old
config ;) 

> Now please, join to the Tomcat Users list (not because I'm user, but because
> *you* are) and we'll explain all of this to you, if you still don't understand
> why you are wrong.
i will not do that, because i don't like having lots of accounts, so i will
refuse your suggestion (like most others in the past month only, or the 100's
in the past years).
i was just trying to help you, tomcat developers, since i use tomcat since
version 3 or less, and think is nice that we have open source available to
use... and the bug, still quite real to me... not that tomcat should accept my
"" or ".", but that, if is not supposed to accept than it is to deny or
complain about miss configurations... either way you have a bug and you
documentation should have one line more... come on... is less harder to write
(or just copy the one bellow) than writing all these emails or making user
accounts.

i did solve my problem (mails ago), and not because you told me what it was
(initially you only said it was wrong) neither because the documentation
explains it... i just kind of guessed.

i still say that tomcat should report an error or warning, and the
documentation should explain this further, or at least say:

   you should not use "" or ".", but rather a path to a subdirectory, even if
deploying a single application, which may lead to broken security constraints
or the odd bug :P

... and thank you for this last much better reply.

[] r.

-- 
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 51644] New: Unable to deploy applications with the name a#b.xml

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

 Bug #: 51644
   Summary: Unable to deploy applications with the name a#b.xml
   Product: Tomcat 7
   Version: 7.0.19
  Platform: All
OS/Version: All
Status: NEW
  Severity: regression
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: suve...@gmail.com
Classification: Unclassified


When I try to deploy a context with the name "a#b.xml" I get the following
exception.


SEVERE: Unable to process JNDI URL [jndi:/localhost/sample/one/WEB-INF/classes]
for annotations
java.io.FileNotFoundException: jndi:/localhost/sample/one/WEB-INF/classes
at
org.apache.naming.resources.DirContextURLConnection.list(DirContextUR
LConnection.java:452)
at
org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(Cont
extConfig.java:1901)
at
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(Conte
xtConfig.java:1828)
at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.jav
a:1295)
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfi
g.java:896)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:322)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
se.java:89)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5103)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:812)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78
7)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)

at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
va:633)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
ava:558)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468
)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1363)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:294)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
se.java:89)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas
e.java:1233)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1391)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1401)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
un(ContainerBase.java:1380)
at java.lang.Thread.run(Thread.java:619)


I would have expected the application to be available in the URI a/b. The bug
seems to be in the "list()" method "of DirContextURLConnection.java. The method
assumes that context name does not have any "/" characters in it. See the
developer note just before the "if" block. I have added the "else if" condition
that seems to have solved the problem for me.

try {
String file = getURL().getFile();
// This will be of the form ///file name
// if  is not empty otherwise this will be of the
// form //file name
// Strip off the hostname and the contextpath
int start;
if(context instanceof ProxyDirContext &&
   
"".equals(((ProxyDirContext)context).getContextPath())){
start = file.indexOf('/',1);
}
else if(context instanceof ProxyDirContext){
start="/".length()
+((ProxyDirContext)context).getHostName().length()
   
+((ProxyDirContext)context).getContextPath().length();
/*
 * Seems like a bug in Tomcat. below was the code in
Tomcat.
 * How can it handle contextpath like "/sample/one". It
cannot
 */
//start = file.indexOf('/', file.indexOf('/', 1) + 1);
} else
start = file.indexOf('/', file.indexOf('/', 1) + 1);

NamingEnumeration enumeration =
context.list(file.substring(start));
while (enumeration.hasMoreElements()) {
NameClassPair ncp = enumeration.nextElement();
result.addElement(ncp.getName());
}
} catch (NamingException e) {

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.c

DO NOT REPLY [Bug 50316] Minor glitch with display of negative TTL on sessionDetail.jsp

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

--- Comment #3 from Christian Stöber  2011-08-10 11:26:38 
UTC ---
Konstantin,

you've mentioned the problem, that sessions with negative TTL are still alive
after a Tomcat restart. I can't find a bug report. Is this problem fixed, too?

Christian

-- 
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: r1156111 - /tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 11:38:25 2011
New Revision: 1156111

URL: http://svn.apache.org/viewvc?rev=1156111&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51641
Connections map uses NioChannel, not 

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1156111&r1=1156110&r2=1156111&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java 
Wed Aug 10 11:38:25 2011
@@ -204,7 +204,8 @@ public class Http11NioProtocol extends A
  */
 @Override
 public void release(SocketWrapper socket) {
-Http11NioProcessor processor = connections.remove(socket);
+Http11NioProcessor processor =
+connections.remove(socket.getSocket());
 if (processor != null) {
 processor.recycle();
 recycledProcessors.offer(processor);



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



svn commit: r1156113 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 11:41:51 2011
New Revision: 1156113

URL: http://svn.apache.org/viewvc?rev=1156113&view=rev
Log:
Update change log

Modified:
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1156113&r1=1156112&r2=1156113&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Aug 10 11:41:51 2011
@@ -53,6 +53,14 @@
   They eventually become mixed with the numbered issues. (I.e., numbered
   issues to not "pop up" wrt. others).
 -->
+
+  
+
+  51641: Use correct key when removing processor instances from
+  the connections map during clean-up. Patch provided by zhh. (mark)
+
+  
+
 
   
 



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



svn commit: r1156115 - /tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 11:43:09 2011
New Revision: 1156115

URL: http://svn.apache.org/viewvc?rev=1156115&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51641
Connections map uses NioChannel, not 

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

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1156115&r1=1156114&r2=1156115&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Wed Aug 
10 11:43:09 2011
@@ -204,7 +204,8 @@ public class Http11NioProtocol extends A
  */
 @Override
 public void release(SocketWrapper socket) {
-Http11NioProcessor processor = connections.remove(socket);
+Http11NioProcessor processor =
+connections.remove(socket.getSocket());
 if (processor != null) {
 processor.recycle();
 recycledProcessors.offer(processor);



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



DO NOT REPLY [Bug 51641] Http11NioProcessor not correct release

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas  2011-08-10 11:44:27 UTC ---
Thanks for the report. This has been fixed in trunk and 7.0.x.

I couldn't see a way to trigger this in normal operation. Did you see a memory
leak due to this or did you find it some other way?

-- 
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: r1156119 - /tomcat/tc7.0.x/trunk/modules/

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 11:58:48 2011
New Revision: 1156119

URL: http://svn.apache.org/viewvc?rev=1156119&view=rev
Log:
Externals relative to current dir won't work when tagging so use repository root

Modified:
tomcat/tc7.0.x/trunk/modules/   (props changed)

Propchange: tomcat/tc7.0.x/trunk/modules/
--
--- svn:externals (original)
+++ svn:externals Wed Aug 10 11:58:48 2011
@@ -1 +1 @@
--r 1155255 ../../../trunk/modules/jdbc-pool jdbc-pool
+^/tomcat/trunk/modules/jdbc-pool@1155255 jdbc-pool



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



[ANN] End of life for Apache Tomcat 5.5.x

2011-08-10 Thread Mark Thomas
The Apache Tomcat team announces that support for Apache Tomcat 5.5.x
will end on 30 September 2012.

This means that after 30 September 2012:
- releases from the 5.5.x branch are highly unlikely
- bugs affecting only the 5.5.x branch will not be addressed
- security vulnerability reports will not be checked against the 5.5.x
branch

Three months later (i.e. after 31 December 2012)
- the 5.5.x download pages will be removed
- the latest 5.5.x release will be removed from the mirror system
- the 5.5.x branch in svn will move from /tomcat/tc5.5.x to
/tomcat/archive/tc5.5.x
- the links to the 5.5.x documentation will be removed from
tomcat.apache.org
- The bugzilla project for 5.5.x will be made read-only

Note that all 5.5.x releases will always be available from the archive.

It is anticipated that the final 5.5.x release will be made shortly
before 30 September 2012.

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



svn commit: r1156171 - in /tomcat/trunk: java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java webapps/docs/config/listeners.xml

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 13:22:52 2011
New Revision: 1156171

URL: http://svn.apache.org/viewvc?rev=1156171&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51640
Improve memory leak protection for DriverManager

Modified:

tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
tomcat/trunk/webapps/docs/config/listeners.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1156171&r1=1156170&r2=1156171&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 
Wed Aug 10 13:22:52 2011
@@ -23,6 +23,7 @@ import java.lang.reflect.Method;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
+import java.sql.DriverManager;
 
 import javax.imageio.ImageIO;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -150,8 +151,8 @@ public class JreMemoryLeakPreventionList
 }
 
 /**
- * com.sun.jndi.ldap.LdapPoolManager class spawns a thread 
when it
- * is initialized if the system property
+ * com.sun.jndi.ldap.LdapPoolManager class spawns a thread 
when
+ * it is initialized if the system property
  * com.sun.jndi.ldap.connect.pool.timeout is greater than 0.
  * That thread inherits the context class loader of the current thread, so
  * that there may be a web application class loader leak if the web app
@@ -162,7 +163,21 @@ public class JreMemoryLeakPreventionList
 public void setLdapPoolProtection(boolean ldapPoolProtection) {
 this.ldapPoolProtection = ldapPoolProtection;
 }
-
+
+/**
+ * The first access to {@link DriverManager} will trigger the loading of
+ * all {@link java.sql.Driver}s in the the current class loader. The web
+ * application level memory leak protection can take care of this in most
+ * cases but triggering the loading here has fewer side-effects. 
+ */
+private boolean driverManagerProtection = true;
+public boolean isDriverManagerProtection() {
+return driverManagerProtection;
+}
+public void setDriverManagerProtection(boolean driverManagerProtection) {
+this.driverManagerProtection = driverManagerProtection;
+}
+
 @Override
 public void lifecycleEvent(LifecycleEvent event) {
 // Initialise these classes when Tomcat starts
@@ -178,6 +193,14 @@ public class JreMemoryLeakPreventionList
 ClassLoader.getSystemClassLoader());
 
 /*
+ * First call to this loads all drivers in the current class
+ * loader
+ */
+if (driverManagerProtection) {
+DriverManager.getDrivers();
+}
+
+/*
  * Several components end up calling:
  * sun.awt.AppContext.getAppContext()
  * 

Modified: tomcat/trunk/webapps/docs/config/listeners.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/listeners.xml?rev=1156171&r1=1156170&r2=1156171&view=diff
==
--- tomcat/trunk/webapps/docs/config/listeners.xml (original)
+++ tomcat/trunk/webapps/docs/config/listeners.xml Wed Aug 10 13:22:52 2011
@@ -174,6 +174,14 @@
 is true.
   
 
+  
+The first use of java.sql.DriverManager will trigger 
the
+loading of JDBNC Driver in the the current class loader. The web
+application level memory leak protection can take care of this in most
+cases but triggering the loading here has fewer side-effects. The
+default is true
+  
+
   
 Enables protection so that calls to
 sun.misc.GC.requestLatency(long) triggered by a web



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



svn commit: r1156174 - in /tomcat/trunk: java/org/apache/catalina/ha/backend/ java/org/apache/naming/resources/jndi/ java/org/apache/tomcat/ res/META-INF/ test/webapp-3.0/

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 13:33:59 2011
New Revision: 1156174

URL: http://svn.apache.org/viewvc?rev=1156174&view=rev
Log:
Remove unnecessary svn:mergeinfo properties

Modified:
tomcat/trunk/java/org/apache/catalina/ha/backend/   (props changed)
tomcat/trunk/java/org/apache/naming/resources/jndi/   (props changed)
tomcat/trunk/java/org/apache/tomcat/InstanceManager.java   (props changed)
tomcat/trunk/java/org/apache/tomcat/PeriodicEventListener.java   (props 
changed)
tomcat/trunk/res/META-INF/jsp-api.jar.manifest   (props changed)
tomcat/trunk/res/META-INF/servlet-api.jar.manifest   (props changed)
tomcat/trunk/test/webapp-3.0/el-method.jsp   (props changed)

Propchange: tomcat/trunk/java/org/apache/catalina/ha/backend/
('svn:mergeinfo' removed)

Propchange: tomcat/trunk/java/org/apache/naming/resources/jndi/
('svn:mergeinfo' removed)

Propchange: tomcat/trunk/java/org/apache/tomcat/InstanceManager.java
('svn:mergeinfo' removed)

Propchange: tomcat/trunk/java/org/apache/tomcat/PeriodicEventListener.java
('svn:mergeinfo' removed)

Propchange: tomcat/trunk/res/META-INF/jsp-api.jar.manifest
('svn:mergeinfo' removed)

Propchange: tomcat/trunk/res/META-INF/servlet-api.jar.manifest
('svn:mergeinfo' removed)

Propchange: tomcat/trunk/test/webapp-3.0/el-method.jsp
('svn:mergeinfo' removed)



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



svn commit: r1156179 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/ha/backend/ java/org/apache/naming/resources/jndi/ java/org/apache/tomcat/ res/META-INF/ test/webapp-3.0/

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 13:38:24 2011
New Revision: 1156179

URL: http://svn.apache.org/viewvc?rev=1156179&view=rev
Log:
Remove unnecessary svn:mergeinfo properties

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/backend/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/jndi/   (props 
changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/InstanceManager.java   (props 
changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/PeriodicEventListener.java   
(props changed)
tomcat/tc7.0.x/trunk/res/META-INF/jsp-api.jar.manifest   (props changed)
tomcat/tc7.0.x/trunk/res/META-INF/servlet-api.jar.manifest   (props changed)
tomcat/tc7.0.x/trunk/test/webapp-3.0/el-method.jsp   (props changed)

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/backend/
('svn:mergeinfo' removed)

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/jndi/
('svn:mergeinfo' removed)

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/InstanceManager.java
('svn:mergeinfo' removed)

Propchange: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/PeriodicEventListener.java
('svn:mergeinfo' removed)

Propchange: tomcat/tc7.0.x/trunk/res/META-INF/jsp-api.jar.manifest
('svn:mergeinfo' removed)

Propchange: tomcat/tc7.0.x/trunk/res/META-INF/servlet-api.jar.manifest
('svn:mergeinfo' removed)

Propchange: tomcat/tc7.0.x/trunk/test/webapp-3.0/el-method.jsp
('svn:mergeinfo' removed)



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



svn commit: r1156180 - in /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util: bcel/ http/fileupload/

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 13:40:13 2011
New Revision: 1156180

URL: http://svn.apache.org/viewvc?rev=1156180&view=rev
Log:
Future changes will be merged from tomcat/trunk so remove the svn:mergeinfo 
props to keep merge commits cleaner.

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/fileupload/   (props 
changed)

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
('svn:mergeinfo' removed)

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/fileupload/
('svn:mergeinfo' removed)



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



svn commit: r1156182 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java webapps/docs/changelog.xml webapps/docs/config/listeners.xml

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 13:42:20 2011
New Revision: 1156182

URL: http://svn.apache.org/viewvc?rev=1156182&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51640
Improve the memory leak prevention for leaks triggered by 
java.sql.DriverManager.

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

tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml

Propchange: tomcat/tc7.0.x/trunk/
--
svn:mergeinfo = /tomcat/trunk:1156171

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1156182&r1=1156181&r2=1156182&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
 Wed Aug 10 13:42:20 2011
@@ -23,6 +23,7 @@ import java.lang.reflect.Method;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
+import java.sql.DriverManager;
 
 import javax.imageio.ImageIO;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -150,8 +151,8 @@ public class JreMemoryLeakPreventionList
 }
 
 /**
- * com.sun.jndi.ldap.LdapPoolManager class spawns a thread 
when it
- * is initialized if the system property
+ * com.sun.jndi.ldap.LdapPoolManager class spawns a thread 
when
+ * it is initialized if the system property
  * com.sun.jndi.ldap.connect.pool.timeout is greater than 0.
  * That thread inherits the context class loader of the current thread, so
  * that there may be a web application class loader leak if the web app
@@ -162,7 +163,21 @@ public class JreMemoryLeakPreventionList
 public void setLdapPoolProtection(boolean ldapPoolProtection) {
 this.ldapPoolProtection = ldapPoolProtection;
 }
-
+
+/**
+ * The first access to {@link DriverManager} will trigger the loading of
+ * all {@link java.sql.Driver}s in the the current class loader. The web
+ * application level memory leak protection can take care of this in most
+ * cases but triggering the loading here has fewer side-effects. 
+ */
+private boolean driverManagerProtection = true;
+public boolean isDriverManagerProtection() {
+return driverManagerProtection;
+}
+public void setDriverManagerProtection(boolean driverManagerProtection) {
+this.driverManagerProtection = driverManagerProtection;
+}
+
 @Override
 public void lifecycleEvent(LifecycleEvent event) {
 // Initialise these classes when Tomcat starts
@@ -178,6 +193,14 @@ public class JreMemoryLeakPreventionList
 ClassLoader.getSystemClassLoader());
 
 /*
+ * First call to this loads all drivers in the current class
+ * loader
+ */
+if (driverManagerProtection) {
+DriverManager.getDrivers();
+}
+
+/*
  * Several components end up calling:
  * sun.awt.AppContext.getAppContext()
  * 

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1156182&r1=1156181&r2=1156182&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Aug 10 13:42:20 2011
@@ -54,6 +54,14 @@
   issues to not "pop up" wrt. others).
 -->
 
+  
+
+  
+51640: Improve the memory leak prevention for leaks 
triggered
+by java.sql.DriverManager. (markt)
+  
+
+  
   
 
   51641: Use correct key when removing processor instances from

Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml?rev=1156182&r1=1156181&r2=1156182&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/listeners.xml Wed Aug 10 13:42:20 
2011
@@ -174,6 +174,14 @@
 is true.
   
 
+  
+The first use of java.sql.DriverManager will trigger 
the
+loading of JDBNC Driver in the the current class loader. The web
+application level memory leak protection can take care of this in most
+cases but triggeri

DO NOT REPLY [Bug 51640] clearReferencesJdbc seems to be causing leaks with com.oracle.ojdbc5 driver

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas  2011-08-10 13:42:42 UTC ---
clearReferencesJdbc should not (and does not) leave any JDBC drivers loaded.

However, clearReferencesJdbc uses DriverManager to see what JDBC drivers are
currently loaded. Unfortunately, the first ever call to DriverManager has the
side-effect that any JDBC drivers in the current class loader will also be
loaded. clearReferencesJdbc does ensure that any Driver loaded that way is
immediately unloaded but when the Oracle driver is loaded it also creates the
MBean and that triggers the leak.

The automatic creation of the MBean on driver load looks like a bug to me since
there is no way for that MBean to be automatically destroyed when the Driver is
unloaded. To my mind these things should be symmetric. You load the driver, you
unload the driver. The MBean is automatically created, it should be
automatically destroyed. Neither DriverManager nor Oracle's JDBC driver appear
to follow this principle. Sigh.

What I also realised while looking at this is that only the first web
application to use DriverManager will have it's JDBC drivers automatically
loaded (since initialised is a static in DriverManager). That could lead to an
application working or not working depending on application start order.

It looks like the best way to fix both issues is to call
DriverManager.getDrivers() from the JreMemoryLeakPreventionListener. That fixes
the problem described here and ensures that web application behaviour will be
consistent regardless of start order and usage of DriverManager.

Note that even with this fix, if you use that Driver in a web application you
will get a leak caused by the creation of the MBean.

This has been fixed in trunk and 7.0.x and will be included in 7.0.21 onwards.

-- 
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: ServletRequestListener.requestDestroyed is called before request leaves a webapp

2011-08-10 Thread Christopher Schultz
Mark,

On 8/9/2011 4:35 PM, Mark Thomas wrote:
> Addressing this would mean either:
> a) moving the error handling to the context (inside the calls to the
> ServletRequestListener) or

+1

This just feels like the right state management level to me. Certainly
the default error handler can be called just as easily from this level
of the code.

-chris



signature.asc
Description: OpenPGP digital signature


DO NOT REPLY [Bug 51294] Since 7.0.12 do not work option unpackWARs=true for WARs outside appBase

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

--- Comment #6 from archmisha  2011-08-10 14:14:11 UTC ---
I have the same problem when upgraded to the new version.

But reviewing the following documentation link:
http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Automatic%20Application%20Deployment
Section "Automatic Application Deployment" explicitly states: "...The docBase
attribute of this  element must only be set if the docBase is outside
the Host's appBase"

What resolution you proposed in our 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



DO NOT REPLY [Bug 51640] clearReferencesJdbc seems to be causing leaks with com.oracle.ojdbc5 driver

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

--- Comment #2 from Patrick M  2011-08-10 16:09:23 UTC ---
Sorry if this is an abuse of the bug tracker, but I'm hoping you might be able
to answer two questions about this so I have a workaround:

1) If I make sure to load the driver every time, then consistently unload it
every time, then unload the MBean every time, should that work before and after
the fix?

2) If I put the jar in $CATALINA/lib, should that make sure the app's
classloader is never leaked?


Finally, that you for the quick help.

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



[Tomcat Wiki] Update of "HowTo" by DomaLajos

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

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

The "HowTo" page has been changed by DomaLajos:
http://wiki.apache.org/tomcat/HowTo?action=diff&rev1=111&rev2=112

  
  
  = Meta =
- 
  == How do I add a question to this page? ==
  Anyone may edit this page to add their own content. That is why this page is 
part of a Wiki and not a hardcoded static file in the FAQ.
  
  However, ''do not'' add questions without answers to this page. If you have a 
question about how to do something in Tomcat which has not been addressed yet, 
ask the [[http://tomcat.apache.org/lists.html#tomcat-users|tomcat-user list]]. 
Once you've figured out how to fix your problem, come back and update the Wiki 
to allow the rest of us to benefit from what you've learned!
  
  == How do I contribute to Tomcat's documentation? ==
- 
  Download the source bundle or grab the source XML file from 
[[http://tomcat.apache.org/svn.html|Subversion repository]]. If you are not 
familiar with Subversion, see http://www.apache.org/dev/contributors.html.
  
  The docs are in the webapps/docs subdirectory.  They are in XML format and 
get processed into the HTML documentation as part of the Tomcat release.
@@ -26, +24 @@

  
  
  = Installation =
- 
  == How do I set up and run Tomcat on Macintosh OS X? ==
  See [[TomcatOnMacOS]]
  
  == How do I set up and run Tomcat on Solaris 10? ==
  See TomcatOnSolaris10
  
- 
  == How do I set up another tomcat service on Windows, sharing the same Tomcat 
Home ? ==
  This script sets up a a tomcat base directory and calls tomcat5.exe to create 
a windows service which will use the tomcat home given for the binaries and 
tomcat base you create See TomcatCreateWindowsService
  
@@ -48, +44 @@

  
   . (!) It also makes a lot of sense to use the JavaServiceWrapper.
  
- 
  == How to run Tomcat without root privileges? ==
  The best way is to use jsvc, available as part of the 
[[http://commons.apache.org/daemon/jsvc.html|commons-daemon]] project.
  
@@ -99, +94 @@

  {{{
  sudo ipfw add 100 fwd 127.0.0.1,8080 tcp from any to any 80 in
  }}}
- 
- 
  
+ Yet another way is to use authbind (part of Debian- and CentOS based 
distributions) which allows a program that would normally require superuser 
privileges to access privileged network services to run as a non-privileged 
user. The article at 
http://java-notes.com/index.php/installing-tomcat-with-http-port-80-on-linux 
discusses how to install and configure the authbind package with Tomcat 6.0 on 
Linux.
+ 
  = Configuration =
- 
  == How do I set up multiple sites sharing the same war application/war file? 
==
  See CreateVirtualHosts
  
@@ -256, +250 @@

  
   1. Now when you visit ''http://localhost:8080/admin'' you should see a page 
that asks for a user name and password.  If you still see the "no longer 
loaded" error message in your browser, you must either force a full reload of 
the web page (in Firefox, hold down Shift key while clicking on the Reload 
button) or just restart your browser completely.
  
- 
  == How do I add JARs or classes to the common classloader without adding them 
to $CATALINA_HOME/lib? ==
- 
  Either
  
  a) Run Tomcat with separate {{{$CATALINA_BASE}}} and {{{$CATALINA_HOME}}} (as 
documented in {{{RUNNING.txt}}}) and place those classes into 
{{{$CATALINA_BASE/lib}}}, or
@@ -332, +324 @@

  == How do I set up Tomcat virtual hosts in a development environment? ==
  See TomcatDevelopmentVirtualHosts
  
- 
  
  = Programming =
- 
  == How do call tomcat ant tasks to deploy webapps? ==
  See AntDeploy
  
@@ -385, +375 @@

  p.load(is);
  is.close();
  }}}
- 
  == How do I share sessions across web apps? ==
  You cannot share sessions directly across web apps, as that would be a 
violation of the Servlet Specification.  There are workarounds, including using 
a singleton class loaded from the common classloader repository to hold shared 
information, or putting some of this shared information in a database or 
another data store.  Some of these approaches have been discussed on the 
[[http://tomcat.apache.org/lists.html#tomcat-users|tomcat-user mailing list]], 
whose archives you should search for more information.
  
@@ -460, +449 @@

  Context context = (Context) host.findChild("myContext");
  Realm realm = context.getRealm();
  }}}
- 
  == How do I redirect System.out and System.err to my web page? ==
  I have met a situation where I needed to redirect a portion of standard ouput 
(`System.out`, STDOUT) and standard error (`System.err`, STDERR) to my web page 
instead of a log file. An example of such an application is a compiler research 
platform that our resarch team is putting online for anybody to be able to 
quickly compile-test their programs on line. Naturally, the compilers dump some 
of their stuff to STDERR or STDOUT and they are not web application `.jar`. 
Thus, I needed badly these streams related to the compiler output to be 
redirecte

[Tomcat Wiki] Update of "HowTo" by DomaLajos

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

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

The "HowTo" page has been changed by DomaLajos:
http://wiki.apache.org/tomcat/HowTo?action=diff&rev1=112&rev2=113

  
  == HowTo SSL Client Authentication with Fallback to FORM Authentication ==
  See [[SSLWithFORMFallback]]
+ 
+ == How to configure two-way SSL authentication on Tomcat using self-signed 
certificates for testing/development ==
+ See http://java-notes.com/index.php/two-way-ssl-on-tomcat
  
  == How do I make Tomcat startup faster? ==
  See HowTo/FasterStartUp

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



svn commit: r1156276 - /tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 17:57:25 2011
New Revision: 1156276

URL: http://svn.apache.org/viewvc?rev=1156276&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51644
Annotation scanning was broken for contexts with a multi-level context path 
such as /a/b

Modified:
tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java

Modified: 
tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java?rev=1156276&r1=1156275&r2=1156276&view=diff
==
--- tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java 
(original)
+++ tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java 
Wed Aug 10 17:57:25 2011
@@ -436,14 +436,20 @@ public class DirContextURLConnection 
 // This will be of the form ///file name
 // if  is not empty otherwise this will be of the
 // form //file name
-// Strip off the hostname and the contextpath
+// Strip off the hostname and the contextpath (note that 
context
+// path may contain '/'
 int start;
-if(context instanceof ProxyDirContext &&
-
"".equals(((ProxyDirContext)context).getContextPath())){
-start = file.indexOf('/',1);
-}
-else
+if (context instanceof ProxyDirContext) {
+String cp = ((ProxyDirContext)context).getContextPath();
+String h = ((ProxyDirContext)context).getHostName();
+if ("".equals(cp)) {
+start = h.length() + 2;
+} else {
+start = h.length() + cp.length() + 2;
+}
+} else {
 start = file.indexOf('/', file.indexOf('/', 1) + 1);
+}
 
 NamingEnumeration enumeration =
 context.list(file.substring(start));



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



svn commit: r1156280 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/naming/resources/DirContextURLConnection.java webapps/docs/changelog.xml

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 18:00:24 2011
New Revision: 1156280

URL: http://svn.apache.org/viewvc?rev=1156280&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51644
Annotation scanning was broken for contexts with a multi-level context path 
such as /a/b

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

tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 18:00:24 2011
@@ -1 +1 @@
-/tomcat/trunk:1156171
+/tomcat/trunk:1156171,1156276

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/DirContextURLConnection.java?rev=1156280&r1=1156279&r2=1156280&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
 Wed Aug 10 18:00:24 2011
@@ -436,14 +436,20 @@ public class DirContextURLConnection 
 // This will be of the form ///file name
 // if  is not empty otherwise this will be of the
 // form //file name
-// Strip off the hostname and the contextpath
+// Strip off the hostname and the contextpath (note that 
context
+// path may contain '/'
 int start;
-if(context instanceof ProxyDirContext &&
-
"".equals(((ProxyDirContext)context).getContextPath())){
-start = file.indexOf('/',1);
-}
-else
+if (context instanceof ProxyDirContext) {
+String cp = ((ProxyDirContext)context).getContextPath();
+String h = ((ProxyDirContext)context).getHostName();
+if ("".equals(cp)) {
+start = h.length() + 2;
+} else {
+start = h.length() + cp.length() + 2;
+}
+} else {
 start = file.indexOf('/', file.indexOf('/', 1) + 1);
+}
 
 NamingEnumeration enumeration =
 context.list(file.substring(start));

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1156280&r1=1156279&r2=1156280&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Aug 10 18:00:24 2011
@@ -60,6 +60,10 @@
 51640: Improve the memory leak prevention for leaks 
triggered
 by java.sql.DriverManager. (markt)
   
+  
+51644: Fix annotation scanning for contexts with a
+multi-level context path such as /a/b. (markt)
+  
 
   
   



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



DO NOT REPLY [Bug 51644] Unable to deploy applications with the name a#b.xml

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas  2011-08-10 18:00:49 UTC ---
Thanks for the report. This has been fixed in trunk and 7.0.x and will be
included in 7.0.21 onwards.

-- 
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 18500] Host aliases to match by regular expression

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

Mark Thomas  changed:

   What|Removed |Added

Summary|Host aliases to match by|Host aliases to match by
   |regular expression  |regular expression
   |(trivial)   |

--- Comment #4 from Mark Thomas  2011-08-10 18:20:55 UTC ---
With the re-factoring of the mapper since this was requested it is no longer
trivial so edit the title

-- 
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: r1156304 - in /tomcat/trunk/java/org/apache/jasper/compiler: DefaultErrorHandler.java ErrorDispatcher.java

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 18:37:56 2011
New Revision: 1156304

URL: http://svn.apache.org/viewvc?rev=1156304&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=41673
Use platform line endings when reporting error messages

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java?rev=1156304&r1=1156303&r2=1156304&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java Wed 
Aug 10 18:37:56 2011
@@ -17,6 +17,7 @@
 
 package org.apache.jasper.compiler;
 
+import org.apache.jasper.Constants;
 import org.apache.jasper.JasperException;
 
 /**
@@ -76,24 +77,28 @@ class DefaultErrorHandler implements Err
 args = new Object[] {
 Integer.valueOf(details[i].getJspBeginLineNumber()), 
 details[i].getJspFileName() };
-buf.append("\n\n");
+buf.append(Constants.NEWLINE);
+buf.append(Constants.NEWLINE);
 buf.append(Localizer.getMessage("jsp.error.single.line.number",
 args));
-buf.append("\n");
+buf.append(Constants.NEWLINE);
 buf.append(details[i].getErrorMessage());
-buf.append("\n");
+buf.append(Constants.NEWLINE);
 buf.append(details[i].getJspExtract());
 } else {
 args = new Object[] {
 Integer.valueOf(details[i].getJavaLineNumber()) };
-buf.append("\n\n");
+buf.append(Constants.NEWLINE);
+buf.append(Constants.NEWLINE);
 buf.append(Localizer.getMessage("jsp.error.java.line.number",
 args));
-buf.append("\n");
+buf.append(Constants.NEWLINE);
 buf.append(details[i].getErrorMessage());
 }
 }
-buf.append("\n\nStacktrace:");
+buf.append(Constants.NEWLINE);
+buf.append(Constants.NEWLINE);
+buf.append("Stacktrace:");
 throw new JasperException(
 Localizer.getMessage("jsp.error.unable.compile") + ": " + buf);
 }

Modified: tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java?rev=1156304&r1=1156303&r2=1156304&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java Wed Aug 
10 18:37:56 2011
@@ -22,6 +22,7 @@ import java.io.StringReader;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
 
+import org.apache.jasper.Constants;
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
 import org.xml.sax.SAXException;
@@ -473,7 +474,7 @@ public class ErrorDispatcher {
 // Ignore messages preceding first error
 if (errMsgBuf != null) {
 errMsgBuf.append(line);
-errMsgBuf.append("\n");
+errMsgBuf.append(Constants.NEWLINE);
 }
 }
 



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



svn commit: r1156313 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/DefaultErrorHandler.java java/org/apache/jasper/compiler/ErrorDispatcher.java webapps/docs/changelog.xml

2011-08-10 Thread markt
Author: markt
Date: Wed Aug 10 18:51:11 2011
New Revision: 1156313

URL: http://svn.apache.org/viewvc?rev=1156313&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=41673
Use platform line endings when reporting error messages

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

tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 18:51:11 2011
@@ -1 +1 @@
-/tomcat/trunk:1156171,1156276
+/tomcat/trunk:1156171,1156276,1156304

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java?rev=1156313&r1=1156312&r2=1156313&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java 
Wed Aug 10 18:51:11 2011
@@ -17,6 +17,7 @@
 
 package org.apache.jasper.compiler;
 
+import org.apache.jasper.Constants;
 import org.apache.jasper.JasperException;
 
 /**
@@ -76,24 +77,28 @@ class DefaultErrorHandler implements Err
 args = new Object[] {
 Integer.valueOf(details[i].getJspBeginLineNumber()), 
 details[i].getJspFileName() };
-buf.append("\n\n");
+buf.append(Constants.NEWLINE);
+buf.append(Constants.NEWLINE);
 buf.append(Localizer.getMessage("jsp.error.single.line.number",
 args));
-buf.append("\n");
+buf.append(Constants.NEWLINE);
 buf.append(details[i].getErrorMessage());
-buf.append("\n");
+buf.append(Constants.NEWLINE);
 buf.append(details[i].getJspExtract());
 } else {
 args = new Object[] {
 Integer.valueOf(details[i].getJavaLineNumber()) };
-buf.append("\n\n");
+buf.append(Constants.NEWLINE);
+buf.append(Constants.NEWLINE);
 buf.append(Localizer.getMessage("jsp.error.java.line.number",
 args));
-buf.append("\n");
+buf.append(Constants.NEWLINE);
 buf.append(details[i].getErrorMessage());
 }
 }
-buf.append("\n\nStacktrace:");
+buf.append(Constants.NEWLINE);
+buf.append(Constants.NEWLINE);
+buf.append("Stacktrace:");
 throw new JasperException(
 Localizer.getMessage("jsp.error.unable.compile") + ": " + buf);
 }

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java?rev=1156313&r1=1156312&r2=1156313&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java 
Wed Aug 10 18:51:11 2011
@@ -22,6 +22,7 @@ import java.io.StringReader;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
 
+import org.apache.jasper.Constants;
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
 import org.xml.sax.SAXException;
@@ -473,7 +474,7 @@ public class ErrorDispatcher {
 // Ignore messages preceding first error
 if (errMsgBuf != null) {
 errMsgBuf.append(line);
-errMsgBuf.append("\n");
+errMsgBuf.append(Constants.NEWLINE);
 }
 }
 

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1156313&r1=1156312&r2=1156313&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Aug 10 18:51:11 2011
@@ -72,6 +72,14 @@
   the connections map during clean-up. Patch provided by zhh. (mark)
 
   
+  
+
+  
+41673: Use platform line-endings when reporting compilation
+errors. (markt)
+  
+
+  
 
 
   



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



DO NOT REPLY [Bug 41673] Jasper output the message of compiling error using LF(\n) on ANY OS.

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

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mark Thomas  2011-08-10 18:51:46 UTC ---
Fixed in trunk and 7.0.x and will be included in 7.0.21 onwards.

I do not plan to back-port this to 6.0.x or 5.5.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



Re: [VOTE] Release Apache Tomcat 7.0.20

2011-08-10 Thread Keiichi Fujino
2011/8/9 Mark Thomas :
> [X] Stable - go ahead and release as 7.0.20 Stable
>

Tested by my simple test applications.


-- 
Keiichi.Fujino

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