Re: Enable RAW headers by default in IIS Tomcat connector

2010-02-08 Thread Rainer Jung

On 08.02.2010 08:46, Mladen Turk wrote:

On 02/08/2010 08:38 AM, Tim Whittington wrote:

There's a USE_RAW_HEADERS define that will force the use of the raw HTTP
headers and avoid this problem, so I'd propose that we make that
behaviour
the default.


I agree with having it default, but is it possible to have additional
configure option that would allow legacy mode?


I agree. I'm not sure, whether there could be some compatibility 
problems with existing apps, so changing default but still being able to 
switch back lets us move forward and in case someone complains he can 
switch back.


Regards,

Rainer

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



Re: Enable RAW headers by default in IIS Tomcat connector

2010-02-08 Thread Tim Whittington
OK, the most conservative change will be to enable USE_RAW_HEADERS in the
makefiles/projects and leave the code untouched - I'll make the change after
1.2.29 is out.

cheers
tim

On Mon, Feb 8, 2010 at 9:03 PM, Rainer Jung  wrote:

> On 08.02.2010 08:46, Mladen Turk wrote:
>
>> On 02/08/2010 08:38 AM, Tim Whittington wrote:
>>
>>> There's a USE_RAW_HEADERS define that will force the use of the raw HTTP
>>> headers and avoid this problem, so I'd propose that we make that
>>> behaviour
>>> the default.
>>>
>>
>> I agree with having it default, but is it possible to have additional
>> configure option that would allow legacy mode?
>>
>
> I agree. I'm not sure, whether there could be some compatibility problems
> with existing apps, so changing default but still being able to switch back
> lets us move forward and in case someone complains he can switch back.
>
> Regards,
>
> Rainer
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


[g...@vmgump]: Project tomcat-trunk (in module tomcat-trunk) failed

2010-02-08 Thread Bill Barker
To whom it may engage...

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

Project tomcat-trunk has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 9 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk :  Java Servlet 3.0 & Server Pages JSP 2.1 implementation 
(for ...


Full details are available at:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on eclipse exists, no need to add for property jdt.jar.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.jsvc.tar.gz.
 -DEBUG- Dependency on junit exists, no need to add for property junit.jar.
 -INFO- Failed with reason build failed
 -INFO- Failed to extract fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk/gump_work/build_tomcat-trunk_tomcat-trunk.html
Work Name: build_tomcat-trunk_tomcat-trunk (Type: Build)
Work ended in a state of : Failed
Elapsed: 1 sec
Command Line: /usr/lib/jvm/java-6-sun/bin/java -Djava.awt.headless=true 
org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbuild.sysclasspath=only 
-Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-08022010.jar 
-Dnsis.exe=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt 
-Djson-lib.home=. 
-Dcommons-daemon.jsvc.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/jsvc.tar.gz
 -Djdt.jar 
-Dtomcat-native.dll.x64=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-08022010.jar
 
-Djasper-jdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
 -Dcommons-dbcp.home=/srv/gump/public/workspace/apache-commons 
-Dcommons-pool.home=/srv/gump/public/workspace/apache-commons 
-Dtomcat-native.dll.win32=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt 
-Dcomm
 
ons-logging-api.jar=/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-08022010.jar
 -Dtomcat-native.dll.i64=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt 
-Djson-lib.jar=BUILDING.txt 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-jdbc-08022010.jar
 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-6-sun/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/classes:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/ant/dist/lib/ant-trax.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-nodeps.jar:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/packages/junit3.8.1/junit.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/public/workspace/junit/dist/junit-08022010.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-08022010.jar:/srv
 
/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-jdbc-08022010.jar:/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-08022010.jar
-
Buildfile: /srv/gump/public/workspace/tomcat-trunk/build.xml

build-prepare:
[mkdir] Created dir: /srv/gump/public/workspace/tomcat-trunk/output/classes
[mkdir] Created dir: /srv/gump/public/workspace/tomcat-trunk/output/build
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/bin
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/conf
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/lib
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/logs
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/temp
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/webapps

download:

proxyflags:

setproxy:

testexist:
 [echo] Testing  for /srv/gump/public/workspace/tomcat-trunk/BUILDING.txt

downloadfile:

proxyflags

DO NOT REPLY [Bug 48688] Tomcat apache-tomcat-6.0.24 service fails with jdk-6u18-windows-i586

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48688

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME

--- Comment #1 from Mark Thomas  2010-02-08 03:24:50 UTC ---
This works for me in both 32-bit and 64-bit environments. Please use the users
list if you require further assistance.

-- 
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 48584] Error or ACCESS_VIOLATION on shutdown

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48584

--- Comment #10 from Konstantin Kolinko  2010-02-08 
04:46:37 UTC ---
I still wonder, what is causing this at the Java side:

(see 5. in Comment 8): what is closing those sockets and whether it is possible
to wait for termination of those Acceptor threads before going on and calling
Library.terminate()?


Due to asynchronous nature of this issue, there is still a time frame in
r907567 between if(tcn_global_pool) check and apr_pool_destroy(p) call when apr
termination can occur.  Though that is probably negligible. It is better to go
with r907567 than without.

The TCN_THROW_IF_ERR can still be called with terminated APR, but that is
probably safe -- I think that apr_strerror() call (inside
tcn_ThrowAPRException() that is called from TCN_THROW_IF_ERR macro) should
still work even after APR is terminated.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



Re: svn commit: r907538 - /tomcat/trunk/java/org/apache/jasper/compiler/Parser.java

2010-02-08 Thread Konstantin Kolinko
2010/2/8  :
> Author: markt
> Date: Mon Feb  8 02:00:58 2010
> New Revision: 907538
>
> URL: http://svn.apache.org/viewvc?rev=907538&view=rev
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48668
> Don't look for EL matches (which swallow the EL match string) if EL is not 
> enabled
>
> Modified:
>    tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
>

> -        } else if (reader.matches("${") && !pageInfo.isELIgnored()) {
> +        } else if (!pageInfo.isELIgnored() && reader.matches("${")) {
>             parseELExpression(parent, '$');
> -        } else if (reader.matches("#{") && !pageInfo.isELIgnored()) {
> +        } else if (!pageInfo.isELIgnored() && reader.matches("#{")) {
>             parseELExpression(parent, '#');
>         } else if (reader.matches("

DO NOT REPLY [Bug 48584] Error or ACCESS_VIOLATION on shutdown

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48584

--- Comment #11 from Mladen Turk  2010-02-08 04:55:03 UTC ---
It is caused by calling Library.terminate before all sockets are closed,
Checking for tcn_global_pool is safe because it is set to NULL before
it is actually destroyed.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



Re: svn commit: r907538 - /tomcat/trunk/java/org/apache/jasper/compiler/Parser.java

2010-02-08 Thread Mark Thomas
On 08/02/2010 12:49, Konstantin Kolinko wrote:
> 2010/2/8  :
>> Author: markt
>> Date: Mon Feb  8 02:00:58 2010
>> New Revision: 907538
>>
>> URL: http://svn.apache.org/viewvc?rev=907538&view=rev
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48668
>> Don't look for EL matches (which swallow the EL match string) if EL is not 
>> enabled
>>
>> Modified:
>>tomcat/trunk/java/org/apache/jasper/compiler/Parser.java
>>
> 
>> -} else if (reader.matches("${") && !pageInfo.isELIgnored()) {
>> +} else if (!pageInfo.isELIgnored() && reader.matches("${")) {
>> parseELExpression(parent, '$');
>> -} else if (reader.matches("#{") && !pageInfo.isELIgnored()) {
>> +} else if (!pageInfo.isELIgnored() && reader.matches("#{")) {
>> parseELExpression(parent, '#');
>> } else if (reader.matches(" 
> For the "#{" expression the deferredSyntaxAllowedAsLiteral option
> should be taken care as well.

I wrote the 48668b.jsp[ test case explicitly to check for that and it is
already correctly handled.

Mark



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



svn commit: r907646 - in /tomcat/trunk/test/org/apache/catalina/loader: ./ TestWebappClassLoaderMemoryLeak.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 12:57:08 2010
New Revision: 907646

URL: http://svn.apache.org/viewvc?rev=907646&view=rev
Log:
Add a test case for TimerThread thread/memory leaks on reload as I have some 
ideas on how to safely terminate those threads

Added:
tomcat/trunk/test/org/apache/catalina/loader/

tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
   (with props)

Added: 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java?rev=907646&view=auto
==
--- 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
 (added)
+++ 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
 Mon Feb  8 12:57:08 2010
@@ -0,0 +1,94 @@
+package org.apache.catalina.loader;
+
+import java.io.IOException;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.startup.TomcatBaseTest;
+
+public class TestWebappClassLoaderMemoryLeak extends TomcatBaseTest {
+
+public void testTimerThreadLeak() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+// Must have a real docBase - just use temp
+StandardContext ctx = 
+tomcat.addContext("/", System.getProperty("java.io.tmpdir"));
+
+Tomcat.addServlet(ctx, "taskServlet", new TaskServlet());
+ctx.addServletMapping("/", "taskServlet");
+
+tomcat.start();
+
+// This will trigger the timer & thread creation
+getUrl("http://localhost:"; + getPort() + "/");
+
+// Stop the context
+ctx.stop();
+
+// If the thread still exists, we have a thread/memory leak
+Thread[] threads = getThreads();
+for (Thread thread : threads) {
+if (thread.getName().equals(TaskServlet.TIMER_THREAD_NAME)) {
+fail("Timer thread still running");
+}
+}
+}
+
+/*
+ * Get the set of current threads as an array.
+ * Copied from WebappClassLoader
+ */
+private Thread[] getThreads() {
+// Get the current thread group 
+ThreadGroup tg = Thread.currentThread( ).getThreadGroup( );
+// Find the root thread group
+while (tg.getParent() != null) {
+tg = tg.getParent();
+}
+
+int threadCountGuess = tg.activeCount() + 50;
+Thread[] threads = new Thread[threadCountGuess];
+int threadCountActual = tg.enumerate(threads);
+// Make sure we don't miss any threads
+while (threadCountActual == threadCountGuess) {
+threadCountGuess *=2;
+threads = new Thread[threadCountGuess];
+// Note tg.enumerate(Thread[]) silently ignores any threads that
+// can't fit into the array 
+threadCountActual = tg.enumerate(threads);
+}
+
+return threads;
+}
+
+private static final class TaskServlet extends HttpServlet {
+
+private static final long serialVersionUID = 1L;
+private static final String TIMER_THREAD_NAME = "leaked-thread";
+
+@Override
+protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+Timer timer = new Timer(TIMER_THREAD_NAME);
+timer.schedule(new LocalTask(), 0, 1);
+}
+
+}
+
+private static final class LocalTask extends TimerTask {
+
+@Override
+public void run() {
+// Doesn't actually need to do anything.
+}
+
+}
+}

Propchange: 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
--
svn:eol-style = native

Propchange: 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
--
svn:keywords = Date Author Id Revision



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



Re: Tagging Tomcat Native 1.1.20

2010-02-08 Thread jean-frederic clere
On 02/08/2010 08:25 AM, Mladen Turk wrote:
> Hi,
> 
> We have a nasty bug that crashes the JVM on shutdown cause
> by Library.terminate call while we are inside Socket.accept
> 
> The reason for crash is that we reference later in code the
> memory that was already destroyed with apr_pool_terminate, and
> can lead to a JVM core.
> 
> The fix is quite simple (r907567) and I plan to tag 1.1.20
> and propose a vote.
> 
> 
> Comments?

Cool :-)

Cheers

Jean-Frederic

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



Re: SPNEGO/NEGOTIATE implementation for Apache Geronimo

2010-02-08 Thread Ashish Jain
Dear Developers,

I have successfully developed a patch which enables spnego authentication in
Tomcat. This patch also enables fallback in case Spnego authentication
fails. Can you kindly review and provide comments on the attached patch.
Here is the link for the bug raised in b'zilla (
https://issues.apache.org/bugzilla/show_bug.cgi?id=48685).

Thanks
Ashish

On Thu, Dec 10, 2009 at 1:50 PM, Ashish Jain  wrote:

> Yes I am using a Spnego enabled browser and my motto is to enable single
> sign in geronimo through spnego. As of now I have a small POC of spnego
> working were it is able to recoganise the src machine, target machine and is
> able to establish a security context between client and server. However
> current implementation requires me to override one of the Basic, digest or
> form as these are the ones which can be specified in web.xml  and we cannot
> specify Negotiate. So my  questions are:
>
> Q1. Can you think of a way were we need not override any of the above
> mentioned mechanism?
> Q2. I need to disable the prompt for credentials by the browser. because
> once the user is logged into a machine which is part of
> domain controller he should be able to access the apps w/o any prompt.
>
>  I have referred the following link to understand how spnego is supposed to
> work.
>
>
> http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/csec_SPNEGO_explain.html
>
> Thanks
> Ashish
>
>
>
> On Thu, Dec 10, 2009 at 6:26 AM, David Jencks wrote:
>
>>
>> On Dec 9, 2009, at 5:03 AM, Ashish Jain wrote:
>>
>>  Hi folks,
>>>
>>> Can you please suggest if there is anyway to disable the prompt for
>>> username and password when using basic authentication??
>>>
>>
>> That's browser behavior, so the only thing you can do from the server side
>> is not use plain BASIC auth.  Are you using a SPNEGO enabled browser on a
>> platform where it can recognize your (client side) kerberos login?  Do you
>> have a link to a description of how SPNEGO is supposed to work?
>>
>> thanks
>> david jencks
>>
>>
>>
>>> Thanks and Regards
>>> Ashish
>>>
>>> On 11/13/09, Costin Manolache  wrote:
>>>
 On Fri, Nov 13, 2009 at 6:44 AM, Mark Thomas  wrote:

  Ashish Jain wrote:
>
>  4) Does this require code changes to BasicAuthenticator
>>
> FormAuthenticator,
>
>> AuthenticatorBase of tomcat.
>>
>
> Basic and form - no. Base - maybe.
>
>  Please provide your comment and suggestions.
>>
>
> My instinct (that may be wrong) is that you'll need a new
> authenticator.
> If
> you
> get this working then I'd certainly consider it for inclusion in
> Tomcat.
>
>
>  An OpenID would be nice too :-)

 Costin



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

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


svn commit: r907651 - /tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 13:27:45 2010
New Revision: 907651

URL: http://svn.apache.org/viewvc?rev=907651&view=rev
Log:
Protect against NPE whilst running the test

Modified:

tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java

Modified: 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java?rev=907651&r1=907650&r2=907651&view=diff
==
--- 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
 (original)
+++ 
tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
 Mon Feb  8 13:27:45 2010
@@ -36,7 +36,8 @@
 // If the thread still exists, we have a thread/memory leak
 Thread[] threads = getThreads();
 for (Thread thread : threads) {
-if (thread.getName().equals(TaskServlet.TIMER_THREAD_NAME)) {
+if (thread != null &&
+TaskServlet.TIMER_THREAD_NAME.equals(thread.getName())) {
 fail("Timer thread still running");
 }
 }



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



svn commit: r907652 - in /tomcat/trunk/java/org/apache/catalina/loader: LocalStrings.properties WebappClassLoader.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 13:29:13 2010
New Revision: 907652

URL: http://svn.apache.org/viewvc?rev=907652&view=rev
Log:
More memory leak protection on reload.
Use of java.util.Timer

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

Modified: tomcat/trunk/java/org/apache/catalina/loader/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/LocalStrings.properties?rev=907652&r1=907651&r2=907652&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/LocalStrings.properties Mon 
Feb  8 13:29:13 2010
@@ -40,8 +40,10 @@
 webappClassLoader.clearThreadLocal=A web application created a ThreadLocal 
with key of type [{0}] (value [{1}]) and a value of type [{2}] (value [{3}]) 
but failed to remove it when the web application was stopped. To prevent a 
memory leak, the ThreadLocal has been forcibly removed.
 webappClassLoader.clearThreadLocalFail=Failed to clear ThreadLocal references
 webappClassLoader.stopThreadFail=Failed to terminate thread named [{0}]
+webappClassLoader.stopTimerThreadFail=Failed to terminate TimerThread named 
[{0}]
 webappClassLoader.validationErrorJarPath=Unable to validate JAR entry with 
name {0}
 webappClassLoader.warnThread=A web application appears to have started a 
thread named [{0}] but has failed to stop it. This is very likely to create a 
memory leak. 
+webappClassLoader.warnTimerThread=A web application appears to have started a 
TimerThread named [{0}] via the java.util.Timer API but has failed to stop it. 
To prevent a memory leak, the timer (and hence the associated thread) has been 
forcibly cancelled. 
 webappClassLoader.wrongVersion=(unable to load class {0})
 webappLoader.addRepository=Adding repository {0}
 webappLoader.deploy=Deploying class repositories to work directory {0}

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=907652&r1=907651&r2=907652&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Mon Feb 
 8 13:29:13 2010
@@ -47,6 +47,7 @@
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.TimerTask;
 import java.util.Vector;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.jar.Attributes;
@@ -430,7 +431,9 @@
  * instability. As such, enabling this should be viewed as an option of 
last
  * resort in a development environment and is not recommended in a
  * production environment. If not specified, the default value of
- * false will be used. 
+ * false will be used. Note that instances of
+ * java.util.TimerThread will always be terminate since a safe method 
exists
+ * to do so.
  */
 private boolean clearReferencesStopThreads = false;
 
@@ -1960,6 +1963,13 @@
 continue;
 }

+// TimerThread is not normally visible
+if (thread.getClass().getName().equals(
+"java.util.TimerThread")) {
+clearReferencesStopTimerThread(thread);
+continue;
+}
+
 log.error(sm.getString("webappClassLoader.warnThread",
 thread.getName()));
 
@@ -2017,6 +2027,53 @@
 }
 
 
+private void clearReferencesStopTimerThread(Thread thread) {
+
+// Need to get references to:
+// - newTasksMayBeScheduled field
+// - queue field
+// - queue.clear()
+
+try {
+Field newTasksMayBeScheduledField =
+thread.getClass().getDeclaredField("newTasksMayBeScheduled");
+newTasksMayBeScheduledField.setAccessible(true);
+Field queueField = thread.getClass().getDeclaredField("queue");
+queueField.setAccessible(true);
+
+Object queue = queueField.get(thread);
+
+Method clearMethod = queue.getClass().getDeclaredMethod("clear");
+clearMethod.setAccessible(true);
+
+synchronized(queue) {
+newTasksMayBeScheduledField.setBoolean(thread, false);
+clearMethod.invoke(queue);
+queue.notify();  // In case queue was already empty.
+}
+
+log.error(sm.getString("webappClassLoader.warnTimerThread",
+thread.getName()));

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

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 13:32:08 2010
New Revision: 907653

URL: http://svn.apache.org/viewvc?rev=907653&view=rev
Log:
Proposal

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=907653&r1=907652&r2=907653&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Feb  8 13:32:08 2010
@@ -318,3 +318,9 @@
   http://svn.apache.org/viewvc?rev=907544&view=rev
   +1: markt
   -1: 
+
+* More memory leak protection
+  We can do something about threads started via java.util.Timer
+  http://svn.apache.org/viewvc?rev=907652&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 48685] Spnego Support in Tomcat

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48685

jfclere  changed:

   What|Removed |Added

 CC||jfcl...@gmail.com

-- 
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 48701] New: jsp:getProperty broken for certain cases

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48701

   Summary: jsp:getProperty broken for certain cases
   Product: Tomcat 6
   Version: 6.0.24
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: major
  Priority: P2
 Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: bo...@folgmann.de


I've updated from tomcat6-6.0.18-9.jpp5 to tomcat6-6.0.24-2.jpp5

This breaks a lot of JSPs! Jasper simply denies to compile them. I hunted down
the bug to a very simple example:

<%...@taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>



This will simply output the current unix time (e.g. 1265641020987).
On tomcat 6.0.24 I get this:

org.apache.jasper.JasperException: jsp:getProperty for bean with name 'now'.
Name was not previously introduced as per JSP.5.3
at
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1083)
at org.apache.jasper.compiler.Node$GetProperty.accept(Node.java:1124)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
at org.apache.jasper.compiler.Generator.generate(Generator.java:3383)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:216)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

My JDK is
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Server VM (build 14.3-b01, mixed mode)

Please fix that! I assume that a lot of apps will break out there ...

-- 
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 48701] jsp:getProperty broken for certain cases

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48701

--- Comment #1 from Boris Folgmann  2010-02-08 07:29:50 UTC 
---
To make it even more clear, this works:




But getProperty always fails when the bean is not created with useBean. It's
not specific to . Other constructions also fail.

-- 
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 48701] jsp:getProperty broken for certain cases

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48701

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #2 from Mark Thomas  2010-02-08 07:39:12 UTC ---
As per the error message at the beginning of the stack trace, the JSP is not
valid.

-- 
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 48701] jsp:getProperty broken for certain cases

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48701

Kris Schneider  changed:

   What|Removed |Added

 Resolution|INVALID |FIXED

--- Comment #3 from Kris Schneider  2010-02-08 07:47:42 
UTC ---
(In reply to comment #2)
> As per the error message at the beginning of the stack trace, the JSP is not
> valid.

I'll just add that  does not create a scripting variable, it creates a
scoped variable. Here's part of the spec section referenced in the stack trace
(JSP.5.3):

The object named by the name must have been “introduced” to the JSP processor
using either the jsp:useBean action or a custom action with an associated
VariableInfo entry for this name. If the object was not introduced in this
manner, the container implementation is recommended (but not required) to raise
a translation error, since the page implementation is in violation of the
specification.

Looks like that's what's happening...

-- 
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 48701] jsp:getProperty broken for certain cases

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48701

Kris Schneider  changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

-- 
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 48689] Jar abstraction for Jasper

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48689

--- Comment #5 from Jarek Gawor  2010-02-08 08:01:38 UTC ---
Thanks for the pointers. I am aware of that code but it doesn't really help or
address the problem described in this bug. Jasper shouldn't require (as it
doesn't really need) a jar url to be passed from TldLocationsCache just to
parse the TLD or tag files within it. The problem is not with TLD scanning
itself but what TldLocationsCache.getLocation() method forces me to return and
rest of the Jasper code that uses the location information to do its stuff.

-- 
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: r907713 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 16:13:21 2010
New Revision: 907713

URL: http://svn.apache.org/viewvc?rev=907713&view=rev
Log:
Make the tesst easier to debug

Modified:
tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=907713&r1=907712&r2=907713&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Mon Feb  
8 16:13:21 2010
@@ -25,6 +25,8 @@
 import java.net.URL;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.ConsoleHandler;
+import java.util.logging.LogManager;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
@@ -68,6 +70,13 @@
 
 @Override
 public void setUp() throws Exception {
+// Need to use JULI and to configure a ConsoleHandler so log messages
+// from the tests are visible
+System.setProperty("java.util.logging.config.class",
+"org.apache.juli.ClassLoaderLogManager");
+LogManager.getLogManager().getLogger("").addHandler(
+new ConsoleHandler());
+
 tempDir = new File("output/tmp");
 tempDir.mkdir();
 



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



svn commit: r907717 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 16:25:13 2010
New Revision: 907717

URL: http://svn.apache.org/viewvc?rev=907717&view=rev
Log:
Ensure appBase is valid. Prevents spurious stacktraces in tests

Modified:
tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=907717&r1=907716&r2=907717&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Mon Feb  
8 16:25:13 2010
@@ -44,7 +44,7 @@
 public abstract class TomcatBaseTest extends TestCase {
 private Tomcat tomcat;
 private File tempDir;
-private static int port = 8001;
+private static int port = 8000;
 
 /**
  * Make Tomcat instance accessible to sub-classes.
@@ -79,15 +79,16 @@
 
 tempDir = new File("output/tmp");
 tempDir.mkdir();
+File appBase = new File(tempDir, "webapps");
+appBase.mkdir();
 
 tomcat = new Tomcat();
 tomcat.setBaseDir(tempDir.getAbsolutePath());
-tomcat.getHost().setAppBase(tempDir.getAbsolutePath() + "/webapps");
+tomcat.getHost().setAppBase(appBase.getAbsolutePath());
   
 // If each test is running on same port - they
 // may interfere with each other (on unix at least)
-port++;
-tomcat.setPort(port);
+tomcat.setPort(getNextPort());
 }
 
 @Override



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



DO NOT REPLY [Bug 48701] jsp:getProperty broken for certain cases

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48701

--- Comment #4 from Boris Folgmann  2010-02-08 08:29:26 UTC 
---
That's really bad because that worked up to 6.0.18. I can't remember any
problems with such JSPs since tomcat 4 and 5. What about a compatibility switch
to keep all that 3rd party apps from breaking?

-- 
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: r907720 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 16:45:08 2010
New Revision: 907720

URL: http://svn.apache.org/viewvc?rev=907720&view=rev
Log:
Avoid adding the package twice

Modified:
tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=907720&r1=907719&r2=907720&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Mon Feb  8 
16:45:08 2010
@@ -581,13 +581,19 @@
 server.addLifecycleListener(new NamingContextListener());
 
 System.setProperty("catalina.useNaming", "true");
+
 String value = "org.apache.naming";
 String oldValue =
 System.getProperty(javax.naming.Context.URL_PKG_PREFIXES);
 if (oldValue != null) {
-value = value + ":" + oldValue;
+if (oldValue.contains(value)) {
+value = value + ":" + oldValue;
+} else {
+value = oldValue;
+}
 }
 System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, value);
+
 value = System.getProperty
 (javax.naming.Context.INITIAL_CONTEXT_FACTORY);
 if (value == null) {



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



svn commit: r907721 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 16:47:47 2010
New Revision: 907721

URL: http://svn.apache.org/viewvc?rev=907721&view=rev
Log:
Get logic right way around

Modified:
tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=907721&r1=907720&r2=907721&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Mon Feb  8 
16:47:47 2010
@@ -587,9 +587,9 @@
 System.getProperty(javax.naming.Context.URL_PKG_PREFIXES);
 if (oldValue != null) {
 if (oldValue.contains(value)) {
-value = value + ":" + oldValue;
-} else {
 value = oldValue;
+} else {
+value = value + ":" + oldValue;
 }
 }
 System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, value);



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



svn commit: r907727 - /tomcat/trunk/java/org/apache/naming/factory/ResourceLinkFactory.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 17:07:28 2010
New Revision: 907727

URL: http://svn.apache.org/viewvc?rev=907727&view=rev
Log:
Allow the global naming context to be reset. Useful when running multiple 
embedded instances in series since it allows each instance to configure its own 
global naming context.
Doesn't help with multiple instances in parallel - but that was broken anyway.

Modified:
tomcat/trunk/java/org/apache/naming/factory/ResourceLinkFactory.java

Modified: tomcat/trunk/java/org/apache/naming/factory/ResourceLinkFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/factory/ResourceLinkFactory.java?rev=907727&r1=907726&r2=907727&view=diff
==
--- tomcat/trunk/java/org/apache/naming/factory/ResourceLinkFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/naming/factory/ResourceLinkFactory.java Mon 
Feb  8 17:07:28 2010
@@ -62,8 +62,6 @@
  * @param newGlobalContext new global context value
  */
 public static void setGlobalContext(Context newGlobalContext) {
-if (globalContext != null)
-return;
 globalContext = newGlobalContext;
 }
 



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



DO NOT REPLY [Bug 48694] WebappClassLoader deadlock if web application uses it's own classloader

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48694

--- Comment #1 from Mark Thomas  2010-02-08 10:28:29 UTC ---
I'd like to avoid making WebappClassLoader#loadClass synchronized if at all
possible. Could you try this patch instead?

Index: java/org/apache/catalina/loader/WebappClassLoader.java
===
--- java/org/apache/catalina/loader/WebappClassLoader.java(revision 907621)
+++ java/org/apache/catalina/loader/WebappClassLoader.java(working copy)
@@ -989,9 +989,7 @@
 }
 if ((clazz == null) && hasExternalRepositories) {
 try {
-synchronized (this) {
-clazz = super.findClass(name);
-}
+clazz = super.findClass(name);
 } catch(AccessControlException ace) {
 log.warn("WebappClassLoader.findClassInternal(" + name
 + ") security exception: " + ace.getMessage(),
ace);
@@ -2273,7 +2271,7 @@
 if (clazz != null)
 return clazz;

-synchronized (this) {
+synchronized (name.intern()) {
 clazz = entry.loadedClass;
 if (clazz != null)
 return clazz;

Thanks,

Mark

-- 
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: r907768 - in /tomcat/trunk/java/org/apache/catalina/core: LocalStrings.properties StandardServer.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 19:29:53 2010
New Revision: 907768

URL: http://svn.apache.org/viewvc?rev=907768&view=rev
Log:
Log when a valid shutdown command is received. This may help in tracking down 
"Tomcat just stops" style reports.

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

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=907768&r1=907767&r2=907768&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Mon Feb  
8 19:29:53 2010
@@ -191,6 +191,7 @@
 standardPipeline.noValve=No more Valves in the Pipeline processing this request
 standardServer.addContainer.ise=No connectors available to associate this 
container with
 standardServer.initialize.initialized=This server has already been initialized
+standardServer.shutdownViaPort=A valid shutdown command was received via the 
shutdown port. Stopping the Server instance.
 standardServer.start.connectors=At least one connector is not associated with 
any container
 standardServer.start.started=This server has already been started
 standardServer.stop.notStarted=This server has not yet been started

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardServer.java?rev=907768&r1=907767&r2=907768&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardServer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardServer.java Mon Feb  8 
19:29:53 2010
@@ -445,6 +445,7 @@
 // Match against our command string
 boolean match = command.toString().equals(shutdown);
 if (match) {
+log.info(sm.getString("standardServer.shutdownViaPort"));
 break;
 } else
 log.warn("StandardServer.await: Invalid command '" +



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



svn commit: r907819 - /tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 22:07:24 2010
New Revision: 907819

URL: http://svn.apache.org/viewvc?rev=907819&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48109
Extent try catch block (diff is a lot simpler if you ignore whitespace) to 
ensure InputStream is closed.

Modified:
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=907819&r1=907818&r2=907819&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Mon Feb 
 8 22:07:24 2010
@@ -2541,151 +2541,154 @@
 
 synchronized (jarFiles) {
 
-if (!openJARs()) {
-return null;
-}
-for (i = 0; (entry == null) && (i < jarFilesLength); i++) {
-
-jarEntry = jarFiles[i].getJarEntry(path);
-
-if (jarEntry != null) {
-
-entry = new ResourceEntry();
-try {
-entry.codeBase = getURL(jarRealFiles[i], false);
-String jarFakeUrl = getURI(jarRealFiles[i]).toString();
-jarFakeUrl = "jar:" + jarFakeUrl + "!/" + path;
-entry.source = new URL(jarFakeUrl);
-entry.lastModified = jarRealFiles[i].lastModified();
-} catch (MalformedURLException e) {
-return null;
-}
-contentLength = (int) jarEntry.getSize();
-try {
-entry.manifest = jarFiles[i].getManifest();
-binaryStream = jarFiles[i].getInputStream(jarEntry);
-} catch (IOException e) {
-return null;
-}
-
-// Extract resources contained in JAR to the workdir
-if (antiJARLocking && !(path.endsWith(".class"))) {
-byte[] buf = new byte[1024];
-File resourceFile = new File
-(loaderDir, jarEntry.getName());
-if (!resourceFile.exists()) {
-Enumeration entries =
-jarFiles[i].entries();
-while (entries.hasMoreElements()) {
-JarEntry jarEntry2 =  entries.nextElement();
-if (!(jarEntry2.isDirectory()) 
-&& (!jarEntry2.getName().endsWith
-(".class"))) {
-resourceFile = new File
-(loaderDir, jarEntry2.getName());
-try {
-if 
(!resourceFile.getCanonicalPath().startsWith(
-canonicalLoaderDir)) {
-throw new IllegalArgumentException(
-
sm.getString("webappClassLoader.illegalJarPath",
-jarEntry2.getName()));
-}
-} catch (IOException ioe) {
-throw new IllegalArgumentException(
-
sm.getString("webappClassLoader.validationErrorJarPath",
-jarEntry2.getName()), 
ioe);
-} 
-resourceFile.getParentFile().mkdirs();
-FileOutputStream os = null;
-InputStream is = null;
-try {
-is = jarFiles[i].getInputStream
-(jarEntry2);
-os = new FileOutputStream
-(resourceFile);
-while (true) {
-int n = is.read(buf);
-if (n <= 0) {
-break;
-}
-os.write(buf, 0, n);
-}
-} catch (IOException e) {
-// Ignore
-   

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

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 22:08:38 2010
New Revision: 907821

URL: http://svn.apache.org/viewvc?rev=907821&view=rev
Log:
Proposal

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=907821&r1=907820&r2=907821&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Feb  8 22:08:38 2010
@@ -324,3 +324,9 @@
   http://svn.apache.org/viewvc?rev=907652&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48109
+  Extend try/finally to ensure InputStream is closed
+  http://svn.apache.org/viewvc?rev=907819&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 48109] Improve binaryStream processing in WebappClassLoader#findResourceInternal

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48109

--- Comment #1 from Mark Thomas  2010-02-08 14:08:51 UTC ---
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: r907824 - /tomcat/trunk/java/javax/servlet/jsp/JspFactory.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 22:15:36 2010
New Revision: 907824

URL: http://svn.apache.org/viewvc?rev=907824&view=rev
Log:
Tab police and line length

Modified:
tomcat/trunk/java/javax/servlet/jsp/JspFactory.java

Modified: tomcat/trunk/java/javax/servlet/jsp/JspFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/jsp/JspFactory.java?rev=907824&r1=907823&r2=907824&view=diff
==
--- tomcat/trunk/java/javax/servlet/jsp/JspFactory.java (original)
+++ tomcat/trunk/java/javax/servlet/jsp/JspFactory.java Mon Feb  8 22:15:36 2010
@@ -35,8 +35,8 @@
  * the instance created with this class via the
  * static  setDefaultFactory()  method.
  * 
- * The PageContext and the JspEngineInfo classes are the only 
implementation-dependent
- * classes that can be created from the factory.
+ * The PageContext and the JspEngineInfo classes are the only
+ * implementation-dependent classes that can be created from the factory.
  * 
  * JspFactory objects should not be used by JSP page authors.
  */
@@ -59,11 +59,11 @@
  * any principal other than the JSP Engine runtime to call this method.
  * 
  *
- * @param defltThe default factory implementation
+ * @param defltThe default factory implementation
  */
 
 public static synchronized void setDefaultFactory(JspFactory deflt) {
-   JspFactory.deflt = deflt;
+JspFactory.deflt = deflt;
 }
 
 /**
@@ -73,7 +73,7 @@
  */
 
 public static synchronized JspFactory getDefaultFactory() {
-   return deflt;
+return deflt;
 }
 
 /**
@@ -97,45 +97,44 @@
  * by invoking releasePageContext().
  * 
  *
- * @param servlet   the requesting servlet
- * @param request  the current request pending on the servlet
- * @param response the current response pending on the servlet
- * @param errorPageURL the URL of the error page for the requesting JSP, 
or null
+ * @param servlet  the requesting servlet
+ * @param request  the current request pending on the servlet
+ * @param response the current response pending on the servlet
+ * @param errorPageURL the URL of the error page for the requesting JSP, or
+ * null
  * @param needsSession true if the JSP participates in a session
- * @param buffer   size of buffer in bytes, PageContext.NO_BUFFER if no 
buffer,
- * PageContext.DEFAULT_BUFFER if implementation default.
- * @param autoflushshould the buffer autoflush to the output 
stream on buffer
- * overflow, or throw an IOException?
+ * @param buffer   size of buffer in bytes, PageContext.NO_BUFFER if no
+ * buffer, PageContext.DEFAULT_BUFFER if
+ * implementation default.
+ * @param autoflushshould the buffer autoflush to the output stream on
+ * buffer overflow, or throw an IOException?
  *
  * @return the page context
  *
  * @see javax.servlet.jsp.PageContext
  */
 
-public abstract PageContext getPageContext(Servletservlet,
-  ServletRequest  request,
-  ServletResponse response,
-  String  errorPageURL,
-  boolean needsSession,
-  int buffer,
-  boolean autoflush);
+public abstract PageContext getPageContext(Servlet servlet,
+ServletRequest request, ServletResponse response,
+String errorPageURL, boolean needsSession, int buffer,
+boolean autoflush);
 
 /**
  * 
  * called to release a previously allocated PageContext object.
  * Results in PageContext.release() being invoked.
- * This method should be invoked prior to returning from the _jspService() 
method of a JSP implementation
- * class.
+ * This method should be invoked prior to returning from the _jspService()
+ * method of a JSP implementation class.
  * 
  *
  * @param pc A PageContext previously obtained by getPageContext()
  */
-
 public abstract void releasePageContext(PageContext pc);
 
 /**
  * 
- * called to get implementation-specific information on the current JSP 
engine.
+ * called to get implementation-specific information on the current JSP
+ * engine.
  * 
  *
  * @return a JspEngineInfo object describing the current JSP engine
@@ -145,13 +144,15 @@
 
 /**
  * 
- * Obtain the JspApplicationContext instance that was 
associated
- * within the passed ServletContext for this web application.
+ * Obtain the JspApplicationContext in

buildbot failure in ASF Buildbot on tomcat-trunk

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

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

Buildslave for this Build: bb-vm_ubuntu

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

BUILD FAILED: failed compile

sincerely,
 -The ASF Buildbot


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



buildbot success in ASF Buildbot on tomcat-6-trunk

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

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: 
Build Source Stamp: [branch tomcat/tc6.0.x/trunk] 907821
Blamelist: markt

Build succeeded!

sincerely,
 -The ASF Buildbot


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



svn commit: r907825 - /tomcat/trunk/java/javax/servlet/jsp/JspFactory.java

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 22:20:55 2010
New Revision: 907825

URL: http://svn.apache.org/viewvc?rev=907825&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48170
Remove unnecessary syncs that cause issues under heavy load

Modified:
tomcat/trunk/java/javax/servlet/jsp/JspFactory.java

Modified: tomcat/trunk/java/javax/servlet/jsp/JspFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/jsp/JspFactory.java?rev=907825&r1=907824&r2=907825&view=diff
==
--- tomcat/trunk/java/javax/servlet/jsp/JspFactory.java (original)
+++ tomcat/trunk/java/javax/servlet/jsp/JspFactory.java Mon Feb  8 22:20:55 2010
@@ -43,7 +43,7 @@
 
 public abstract class JspFactory {
 
-private static JspFactory deflt = null;
+private static volatile JspFactory deflt = null;
 
 /**
  * Sole constructor. (For invocation by subclass constructors, 
@@ -62,7 +62,7 @@
  * @param defltThe default factory implementation
  */
 
-public static synchronized void setDefaultFactory(JspFactory deflt) {
+public static void setDefaultFactory(JspFactory deflt) {
 JspFactory.deflt = deflt;
 }
 
@@ -72,7 +72,7 @@
  * @return the default factory for this implementation
  */
 
-public static synchronized JspFactory getDefaultFactory() {
+public static JspFactory getDefaultFactory() {
 return deflt;
 }
 



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



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

2010-02-08 Thread markt
Author: markt
Date: Mon Feb  8 22:22:10 2010
New Revision: 907827

URL: http://svn.apache.org/viewvc?rev=907827&view=rev
Log:
Proposal

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=907827&r1=907826&r2=907827&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Feb  8 22:22:10 2010
@@ -330,3 +330,9 @@
   http://svn.apache.org/viewvc?rev=907819&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48170
+  Remove unnecessary syncs that cause issues under load
+  http://svn.apache.org/viewvc?rev=907825&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 48170] Unnecessary synchronization by JspFactory.getDefaultFactory contributes to stability problems

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48170

--- Comment #4 from Mark Thomas  2010-02-08 14:24:41 UTC ---
Fixed in trunk and proposed for 6.0.x

Note as a part of the JSP API, the changes permitted are limited.

-- 
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 48694] WebappClassLoader deadlock if web application uses it's own classloader

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48694

--- Comment #2 from aullr...@blackducksoftware.com 2010-02-08 14:27:08 UTC ---
This fix works for us here. It's not checked into trunk yet, though?


In our case a well known 3rd party library calls 
first WebappClassLoader.load(...), catches and eats any Throwable including
CNFException and then delegates to Class.forName(..).

Therefore two threads trying to literally load a class with the name "x" end up
being deadlocked on the name of the class and the class loader instance.

at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1362)
- waiting to lock <0x2aaab67f1090> (a java.lang.String)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
- locked <0x2aaab9f0b4d8> (a
org.apache.catalina.loader.WebappClassLoader)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)

---

at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:993)
- waiting to lock <0x2aaab9f0b4d8> (a
org.apache.catalina.loader.WebappClassLoader)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1451)
- locked <0x2aaab67f1090> (a java.lang.String)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)

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



buildbot success in ASF Buildbot on tomcat-trunk

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

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

Buildslave for this Build: bb-vm_ubuntu

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

Build succeeded!

sincerely,
 -The ASF Buildbot


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



DO NOT REPLY [Bug 48004] setHeader() does not replace the previous value for a "Server"

2010-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48004

--- Comment #4 from quartz  2010-02-08 14:51:27 UTC ---
This fix is imcomplete.

There should be a distinction between setting a header to an empty string ""
and setting it to null (which should clear the header entirely since there is
no .removeHeader() on http response).

Nevertheless, there is no way to completely avoid sending the "Server" header.
Security audits fail just because of the header presence, under the assupmtion
that the specific header, even if blank, is still revealing something about the
server.

The solution I have is this (Http11Processor for now):

1-add a field
"protected boolean addServerHeader = true;"


2-Implement the setServer() this way, to distinguish the desire to avoid the
header completely. If the server.xml doesn't have a server property, the
setServer() shouldn't be called and the default is to add server header.

public void setServer( String server ) {
if (server==null) {
this.server = null;
this.addServerHeader = true;
} else if (server.equals("")) {
this.server = null;
this.addServerHeader = false;
} else {
this.server = server;
this.addServerHeader = true;
}
}


3-At the end of prepareResponse(), conditionally add the server header:

if(addServerHeader) {
if (server != null) {
// Always overrides anything the app might set
headers.setValue("Server").setString(server);
} else if (headers.getValue("Server") == null) {
// If app didn't set the header, use the default
outputBuffer.write(Constants.SERVER_BYTES);
}
}


This is the proper fix which at least is tomcat specific and doesn't break the
servlet spec. I won't argue about the httpresponse.setHeader("Server", null)
since it is not specified in the servelt spec (which means it should be legal
to remove the header!).

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

2010-02-08 Thread kkolinko
Author: kkolinko
Date: Tue Feb  9 00:18:24 2010
New Revision: 907855

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

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=907855&r1=907854&r2=907855&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Feb  9 00:18:24 2010
@@ -322,17 +322,17 @@
 * More memory leak protection
   We can do something about threads started via java.util.Timer
   http://svn.apache.org/viewvc?rev=907652&view=rev
-  +1: markt
+  +1: markt, kkolinko
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48109
   Extend try/finally to ensure InputStream is closed
   http://svn.apache.org/viewvc?rev=907819&view=rev
-  +1: markt
+  +1: markt, kkolinko
   -1: 
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48170
   Remove unnecessary syncs that cause issues under load
   http://svn.apache.org/viewvc?rev=907825&view=rev
-  +1: markt
+  +1: markt, kkolinko
   -1: 



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



svn commit: r907860 - /tomcat/trunk/test/webapp/bug48668b.jsp

2010-02-08 Thread kkolinko
Author: kkolinko
Date: Tue Feb  9 01:01:23 2010
New Revision: 907860

URL: http://svn.apache.org/viewvc?rev=907860&view=rev
Log:
Additional test from review of r907538

Modified:
tomcat/trunk/test/webapp/bug48668b.jsp

Modified: tomcat/trunk/test/webapp/bug48668b.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/bug48668b.jsp?rev=907860&r1=907859&r2=907860&view=diff
==
--- tomcat/trunk/test/webapp/bug48668b.jsp (original)
+++ tomcat/trunk/test/webapp/bug48668b.jsp Tue Feb  9 01:01:23 2010
@@ -20,6 +20,7 @@
   Bug 48668b test case
   
 #{foo.bar}
+#{foo${1 + 1}
   
 
 



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



svn commit: r907862 - /tomcat/trunk/test/org/apache/jasper/compiler/TestParser.java

2010-02-08 Thread kkolinko
Author: kkolinko
Date: Tue Feb  9 01:02:12 2010
New Revision: 907862

URL: http://svn.apache.org/viewvc?rev=907862&view=rev
Log:
Additional test from review of r907538

Modified:
tomcat/trunk/test/org/apache/jasper/compiler/TestParser.java

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestParser.java?rev=907862&r1=907861&r2=907862&view=diff
==
--- tomcat/trunk/test/org/apache/jasper/compiler/TestParser.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestParser.java Tue Feb  9 
01:02:12 2010
@@ -75,8 +75,8 @@
 ByteChunk res = getUrl("http://localhost:"; + getPort() +
 "/test/bug48668b.jsp");
 String result = res.toString();
-System.out.println(result);
 assertEcho(result, "00-Hello world#{foo.bar}");
+assertEcho(result, "01-Hello world#{foo2");
 }
 
 /** Assertion for text printed by tags:echo */



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



svn commit: r907864 - /tomcat/trunk/java/org/apache/jasper/compiler/Parser.java

2010-02-08 Thread kkolinko
Author: kkolinko
Date: Tue Feb  9 01:06:01 2010
New Revision: 907864

URL: http://svn.apache.org/viewvc?rev=907864&view=rev
Log:
Fix parsing bug spotted when reviewing r907538
Allowing #{} expressions to be parsed even when they are disabled breaks ${} 
expressions if they are intermixed with them. See the testcase added in 
r907860, r907862.

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=907864&r1=907863&r2=907864&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Tue Feb  9 
01:06:01 2010
@@ -1415,7 +1415,9 @@
 parseXMLTemplateText(parent);
 } else if (!pageInfo.isELIgnored() && reader.matches("${")) {
 parseELExpression(parent, '$');
-} else if (!pageInfo.isELIgnored() && reader.matches("#{")) {
+} else if (!pageInfo.isELIgnored()
+&& !pageInfo.isDeferredSyntaxAllowedAsLiteral()
+&& reader.matches("#{")) {
 parseELExpression(parent, '#');
 } else if (reader.matches("

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

2010-02-08 Thread kkolinko
Author: kkolinko
Date: Tue Feb  9 01:09:38 2010
New Revision: 907866

URL: http://svn.apache.org/viewvc?rev=907866&view=rev
Log:
vote and proposal

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=907866&r1=907865&r2=907866&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Feb  9 01:09:38 2010
@@ -310,9 +310,14 @@
   Don't look for EL matches (which swallow the EL match string) if EL is not
   enabled
   http://svn.apache.org/viewvc?rev=907538&view=rev
-  +1: markt
+  +1: markt, kkolinko
   -1: 
 
+  Additional patch:
+  http://svn.apache.org/viewvc?rev=907864&view=rev
+  +1: kkolinko
+  -1:
+
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48660
   Vary should add to Vary header rather than over-write it
   http://svn.apache.org/viewvc?rev=907544&view=rev



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



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

2010-02-08 Thread kkolinko
Author: kkolinko
Date: Tue Feb  9 01:17:18 2010
New Revision: 907869

URL: http://svn.apache.org/viewvc?rev=907869&view=rev
Log:
proposal

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

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=907869&r1=907868&r2=907869&view=diff
==
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Tue Feb  9 01:17:18 2010
@@ -186,3 +186,10 @@
   https://issues.apache.org/bugzilla/attachment.cgi?id=24918
   +1: kkolinko
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48109
+  Extend try/finally to ensure InputStream is closed
+  Patch by markt
+  http://svn.apache.org/viewvc?rev=907819&view=rev
+  +1: kkolinko
+  -1: 



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



buildbot failure in ASF Buildbot on tomcat-6-trunk

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

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: 
Build Source Stamp: [branch tomcat/tc6.0.x/trunk] 907866
Blamelist: kkolinko

BUILD FAILED: failed compile

sincerely,
 -The ASF Buildbot


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



Re: Gump failures

2010-02-08 Thread Konstantin Kolinko
Regarding Gump failures with building tomcat-trunk:

Looking here
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk/gump_work/build_tomcat-trunk_tomcat-trunk.html

I see
Command Line

/usr/lib/jvm/java-6-sun/bin/java -Djava.awt.headless=true
org.apache.tools.ant.Main
-Dgump.merge=/srv/gump/public/gump/work/merge.xml
-Dbuild.sysclasspath=only
-Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-08022010.jar
-Dnsis.exe=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt

-Dtomcat-native.tar.gz=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt
-Djson-lib.home=.

-Dcommons-daemon.jsvc.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/jsvc.tar.gz
-Djdt.jar

-Dtomcat-native.dll.x64=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt

-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-08022010.jar

-Djasper-jdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
-Dcommons-dbcp.home=/srv/gump/public/workspace/apache-commons
-Dcommons-pool.home=/srv/gump/public/workspace/apache-commons

-Dtomcat-native.dll.win32=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt

-Dcommons-logging-api.jar=/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-08022010.jar

-Dtomcat-native.dll.i64=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt
-Djson-lib.jar=BUILDING.txt

-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-jdbc-08022010.jar

-Djdt.jar  does not have '=' after it. That is probably the cause why
-Dtomcat-native.dll.x64=... is not recognized and thus results in
build failure.

testexist:
 [echo] Testing  for /usr/share/java/tomcat-native-1.1.19/tcnative-1.dll.x64

BUILD FAILED
/srv/gump/public/workspace/tomcat-trunk/build.xml:1636: The following
error occurred while executing this line:
/srv/gump/public/workspace/tomcat-trunk/build.xml:1804: Directory
/usr/share/java/tomcat-native-1.1.19 creation was not successful for
an unknown reason


Best regards,
Konstantin Kolinko

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



Re: Gump failures

2010-02-08 Thread Bill Barker
Yes, there was a typo in the Gump metadata defining the value of jdt.jar. 
I've checked in a fix to the Gump repository so hopefully it should work for 
the next Gump run.  Of course, I could have given Gump a valid place to 
download, but that is a waste of time downloading things it doesn't need to 
build the jars.  Adding tomcat-native to Gump would be an idea as well, but 
the Windows files still wouldn't be available.


"Konstantin Kolinko"  wrote in message 
news:427155181002081749s25dee12fx44578d4199a93...@mail.gmail.com...

Regarding Gump failures with building tomcat-trunk:

Looking here
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk/gump_work/build_tomcat-trunk_tomcat-trunk.html

I see
Command Line

/usr/lib/jvm/java-6-sun/bin/java -Djava.awt.headless=true
   org.apache.tools.ant.Main
-Dgump.merge=/srv/gump/public/gump/work/merge.xml
   -Dbuild.sysclasspath=only
   -Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-08022010.jar
   -Dnsis.exe=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt
   
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt
   -Djson-lib.home=.
   
-Dcommons-daemon.jsvc.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/jsvc.tar.gz
   -Djdt.jar
   
-Dtomcat-native.dll.x64=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt
   
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-08022010.jar
   
-Djasper-jdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
   -Dcommons-dbcp.home=/srv/gump/public/workspace/apache-commons
   -Dcommons-pool.home=/srv/gump/public/workspace/apache-commons
   
-Dtomcat-native.dll.win32=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt
   
-Dcommons-logging-api.jar=/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-08022010.jar
   
-Dtomcat-native.dll.i64=/srv/gump/public/workspace/tomcat-trunk/BUILDING.txt
   -Djson-lib.jar=BUILDING.txt
   
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-jdbc-08022010.jar

-Djdt.jar  does not have '=' after it. That is probably the cause why
-Dtomcat-native.dll.x64=... is not recognized and thus results in
build failure.

testexist:
[echo] Testing  for 
/usr/share/java/tomcat-native-1.1.19/tcnative-1.dll.x64


BUILD FAILED
/srv/gump/public/workspace/tomcat-trunk/build.xml:1636: The following
error occurred while executing this line:
/srv/gump/public/workspace/tomcat-trunk/build.xml:1804: Directory
/usr/share/java/tomcat-native-1.1.19 creation was not successful for
an unknown reason


Best regards,
Konstantin Kolinko 




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