DO NOT REPLY [Bug 10903] - Unbalanced tags do not generate compile time error

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=10903





--- Additional Comments From [EMAIL PROTECTED]  2005-11-30 09:22 ---
I don't have a modified version of Tomcat. The classes you see in the stackTrace
are mine. I extended the Tomcat JSPServlet for my needs.
Anyway, I never touched the JSP parse & compile code, and the Tomcat I run is an
unmodified 5.5.12 coming straight from the the jakarta web site.
I will remove my servlet to replace it with the default jsp servlet and post the
stacktrace.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 26363] - JSP Compiler does not recognize unbalanced Struts tag

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26363





--- Additional Comments From [EMAIL PROTECTED]  2005-11-30 09:27 ---
GRAVE: "Servlet.service()" pour la servlet default a lancé une exception
org.apache.jasper.JasperException: /WebV3Page_3-view.jsp(11,1) The end tag
"

svn commit: r349922 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup: ContextConfig.java EngineConfig.java

2005-11-30 Thread remm
Author: remm
Date: Wed Nov 30 03:10:55 2005
New Revision: 349922

URL: http://svn.apache.org/viewcvs?rev=349922&view=rev
Log:
- Make some classes non final, as has been done for others.

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/EngineConfig.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java?rev=349922&r1=349921&r2=349922&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
 Wed Nov 30 03:10:55 2005
@@ -67,7 +67,7 @@
  * @version $Revision$ $Date$
  */
 
-public final class ContextConfig
+public class ContextConfig
 implements LifecycleListener {
 
 protected static org.apache.commons.logging.Log log=
@@ -79,7 +79,7 @@
 /*
  * Custom mappings of login methods to authenticators
  */
-private Map customAuthenticators;
+protected Map customAuthenticators;
 
 
 /**
@@ -170,7 +170,7 @@
 protected static long deploymentCount = 0L;
 
 
-private static final LoginConfig DUMMY_LOGIN_CONFIG =
+protected static final LoginConfig DUMMY_LOGIN_CONFIG =
 new LoginConfig("NONE", null, null, null);
 
 

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/EngineConfig.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/EngineConfig.java?rev=349922&r1=349921&r2=349922&view=diff
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/EngineConfig.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/EngineConfig.java
 Wed Nov 30 03:10:55 2005
@@ -33,11 +33,11 @@
  * @version $Revision$ $Date$
  */
 
-public final class EngineConfig
+public class EngineConfig
 implements LifecycleListener {
 
 
-private static org.apache.commons.logging.Log log=
+protected static org.apache.commons.logging.Log log=
 org.apache.commons.logging.LogFactory.getLog( EngineConfig.class );
 
 // - Instance Variables
@@ -46,13 +46,13 @@
 /**
  * The Engine we are associated with.
  */
-private Engine engine = null;
+protected Engine engine = null;
 
 
 /**
  * The string resources for this package.
  */
-private static final StringManager sm =
+protected static final StringManager sm =
 StringManager.getManager(Constants.Package);
 
 
@@ -83,13 +83,13 @@
 }
 
 
-//  Private Methods
+//  Protected 
Methods
 
 
 /**
  * Process a "start" event for this Engine.
  */
-private void start() {
+protected void start() {
 
 if (engine.getLogger().isDebugEnabled())
 engine.getLogger().debug(sm.getString("engineConfig.start"));
@@ -100,7 +100,7 @@
 /**
  * Process a "stop" event for this Engine.
  */
-private void stop() {
+protected void stop() {
 
 if (engine.getLogger().isDebugEnabled())
 engine.getLogger().debug(sm.getString("engineConfig.stop"));



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37692] - RequestProcessors are no longer registered in JMX

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37692


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |




--- Additional Comments From [EMAIL PROTECTED]  2005-11-30 16:56 ---
Sorry about not recognizing the sarcasm Remy, I'm new here.

But I do believe this problem exists. It appears to only happen when NOT using
APR. Can you verify that this problem does not exist on a fresh, no-APR Tomcat
install before closing again?

Not trying to be a pest - this is happening consistently on all of my Tomcat
5.5.12 instances that are non-APR. I just now realized that it still works fine
on instances that use APR.


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37692] - RequestProcessors are no longer registered in JMX

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37692


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||WORKSFORME




--- Additional Comments From [EMAIL PROTECTED]  2005-11-30 17:22 ---
As I said, it works for me. Please do not reopen the report.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getContext() - spec interpretation

2005-11-30 Thread Jan Luehe
Mark,

Mark Thomas wrote On 11/29/05 12:46,:
> Jan,
> 
> Jan Luehe wrote:
> 
>>Hi Mark,
> 
> 
> 
>>I agree the current javadocs of ServletContext.getContext() are
>>ambiguous, and I agree we need to present this case to the
>>Servlet EG. Maybe there is a small chance to have this resolved
>>in the Servlet 2.5 timeframe ...
>>
>>I think it would be more useful to have the "uripath" argument be
>>interpreted as a full URI rather than a context root, and have
>>ServletContext.getContext() determine the longest match of the given
>>"uripath" with the context roots of any deployed contexts.
> 
> 
>   I agree the current behaviour, which "hides" any foreign contexts
> 
>>whose context roots match a subdir of the current context, is broken
>>(in part because of the spec ambiguity), because it returns different
>>results depending on the context from which the getContext() call is
>>made.
>>
>>I don't see why we need to restrict "uripath" to be a context root in
>>order to fix the current behaviour, though. As I said, returning
>>the context whose context root has the longest match with the given
>>"uripath" may make more sense.
>>
>>Would you agree?
>>
>>
>>Jan
> 
> 
> I have just re-read the spec keeping score of number of times the 
> wording suggests an exact match or a longest match. The result was a 
> draw so I am happy to interpret it either way. Given that the longest 
> match makes the most sense to me and won't break any existing 
> functionality I will take this approach until the EG issues some 
> clarification. Hopefully they will clarify it the "right" way.

Makes sense.

So it seems we could apply the patch proposed by Bill to achieve the new
semantics of getContext():

 MessageBytes uriMB = new MessageBytes();
 uriMB.setString(uri);
 MappingData md = new MappingData();
 MessageBytes serverName = request.getCoyoteRequest().serverName();
 request.getConnector().getMapper().map(serverName, uriMB, md);
 if(md.context == null) {
return null;
 }
 return ((Context)md.context).getServletContext();

I've rewritten the javadocs of getContext(), as follows:

/**
 * Returns the ServletContext object to which the
 * specified URI has been mapped.
 *
 * This method allows servlets to gain access to foreign servlet
 * contexts deployed on the same container, from which
 * [EMAIL PROTECTED] RequestDispatcher} objects may be obtained.
 * A servlet context is considered foreign to a servlet if it is
 * different from the servlet's own servlet context.
 *
 * The given URI must be begin with "/".
 *
 * A security conscious servlet container may return
 * null if the specified URI maps to a foreign context.
 *
 * @param uripath The URI to map
 *
 * @return The ServletContext to which the given URI
 * has been mapped, or null if the given URI does not map to any of
 * the servlet contexts deployed on the container, or if the URI
 * maps to a foreign context and access to foreign contexts has been
 * disabled by the container
 *
 * @see RequestDispatcher
 *
 */
public ServletContext getContext(String uripath);


If we all agree, I will send this proposal to the Servlet EG.


Thanks,


Jan


> 
> Mark
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37692] - RequestProcessors are no longer registered in JMX

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37692





--- Additional Comments From [EMAIL PROTECTED]  2005-11-30 21:30 ---
I have fixed this issue for 5.5.13.

Thanks for reporting this.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



directory listings

2005-11-30 Thread Rafael H. Schloming
Hi,

I've been looking into the performance problems associated with many
concurrent requests of large directories. After doing some informal
benchmarking I've come up with the attached patch that improves
performance in this scenario. The patch adds a size limited Map with a 5
second timeout for caching rendered directory listings. My tests show a
significant performance improvement and the server no longer keels over
from OutOfMemory exceptions at higher concurrency levels.

Below are the results of the benchmarks I performed against the
unmodified server.

c | total | mean
  -
1 | 33.72985 seconds  | 330.730 ms
   10 | 12.807910 seconds | 1280.791 ms
   20 | 12.641188 seconds | 2528.238 ms
   30 | 12.930321 seconds | 3879.096 ms
   40 | --| --
   50 | --| --
   60 | --| --
   70 | --| --
   80 | --| --
   90 | --| --
  100 | --| --


Here are the same benchmarks with the attached patch applied:

c | total | mean
  -
1 | 0.949313 seconds  | 9.493 ms
   10 | 0.148746 seconds  | 14.875 ms
   20 | 0.167047 seconds  | 33.409 ms
   30 | 0.198910 seconds  | 59.673 ms
   40 | 0.202527 seconds  | 81.011 ms
   50 | 0.176821 seconds  | 88.410 ms
   60 | 0.203042 seconds  | 121.825 ms
   70 | 0.257176 seconds  | 180.023 ms
   80 | 0.283165 seconds  | 226.532 ms
   90 | 0.304787 seconds  | 274.308 ms
  100 | 0.196776 seconds  | 196.776 ms

  c = number of concurrent requests (see the -c flag for ab)
  total = total time for benchmark to complete
  mean = the average time until each request is complete
  -- = benchmark timed out

  In all cases the total number of requests is 100 and the test
  directory being listed contains 2000 empty files.

-- 
Rafael H. Schloming <[EMAIL PROTECTED]>
Index: container/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
===
--- container/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java	(revision 347964)
+++ container/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java	(working copy)
@@ -32,7 +32,10 @@
 import java.io.Reader;
 import java.io.StringReader;
 import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
 import java.util.Enumeration;
+import java.util.LinkedHashMap;
+import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.Vector;
 
@@ -,22 +1114,64 @@
 return result;
 }
 
+private long cacheTTL = 5000; // 5 seconds
+private int cacheMax = 1000; // keep at most 1000 listings
 
+// cache for directory listings
+private Map cache = new LinkedHashMap(100, (float) 0.75, true) {
+protected boolean removeEldestEntry(Map.Entry entry) {
+return size() > cacheMax;
+}
+};
 
 /**
+ * Struct for storing directory listing and timestamp.
+ */
+private static class Listing {
+public byte[] bytes;
+public long timestamp;
+}
+
+/**
+ * Return true if the directory listing is expired.
+ */
+private boolean isExpired(Listing lst) {
+return System.currentTimeMillis() - lst.timestamp > cacheTTL;
+}
+
+protected InputStream render
+(String contextPath, CacheEntry cacheEntry) throws IOException {
+synchronized (cache) {
+Listing lst = (Listing) cache.get(contextPath);
+if (lst == null || isExpired(lst)) {
+if (lst == null) { lst = new Listing(); }
+lst.bytes = doRender(contextPath, cacheEntry);
+lst.timestamp = System.currentTimeMillis();
+cache.put(contextPath, lst);
+}
+return new ByteArrayInputStream(lst.bytes);
+}
+}
+
+/**
  *  Decide which way to render. HTML or XML.
  */
-protected InputStream render
-(String contextPath, CacheEntry cacheEntry) {
+protected byte[] doRender
+(String contextPath, CacheEntry cacheEntry) throws IOException {
 InputStream xsltInputStream =
 findXsltInputStream(cacheEntry.context);
 
+String str;
 if (xsltInputStream==null) {
-return renderHtml(contextPath, cacheEntry);
+str = renderHtml(contextPath, cacheEntry);
 } else {
-return renderXml(contextPath, cacheEntry, xsltInputStream);
+str = renderXml(contextPath, cacheEntry, xsltInputStream);
 }
-
+try {
+return str.getBytes("UTF8");
+} catch (UnsupportedEncodingException e) {
+return str.getBytes();
+}
 }
 
 /**
@@ -1136,9 +1181,9 @@
  * @param contextPath Context path to which our internal paths are
  *  relative
  */
-protec

svn commit: r350056 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java

2005-11-30 Thread markt
Author: markt
Date: Wed Nov 30 13:31:50 2005
New Revision: 350056

URL: http://svn.apache.org/viewcvs?rev=350056&view=rev
Log:
Fix bug 17970. Use of multi-level contexts could result in multiple

deployment attempts. This patch is a sticking plaster. If TC4 was

less mature I would port Remy's changes from TC5.

This patch based based on one submitted by Richard June.

Modified:

tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java

Modified: 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java
URL: 
http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java?rev=350056&r1=350055&r2=350056&view=diff
==
--- 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java
 (original)
+++ 
tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java
 Wed Nov 30 13:31:50 2005
@@ -27,6 +27,7 @@
 import javax.naming.NamingException;
 import javax.naming.directory.DirContext;
 import org.apache.naming.resources.ResourceAttributes;
+import org.apache.catalina.Container;
 import org.apache.catalina.Context;
 import org.apache.catalina.Deployer;
 import org.apache.catalina.Host;
@@ -37,6 +38,7 @@
 import org.apache.catalina.Logger;
 import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.util.StringManager;
+import org.apache.commons.digester.Digester;
 
 
 /**
@@ -62,6 +64,12 @@
 
 
 /**
+ * The Context that was added via a call to
+ * addChild() while parsing the configuration descriptor.
+ */
+private Context context = null;
+
+/**
  * The Java class name of the Context implementation we should use.
  */
 protected String contextClass = "org.apache.catalina.core.StandardContext";
@@ -81,6 +89,15 @@
 
 
 /**
+ * The Digester instance to use for parsing web application
+ * deployment descriptors.  WARNING - Usage of this
+ * instance must be appropriately synchronized to prevent simultaneous
+ * access by multiple threads.
+ */
+private Digester digester = null;
+
+
+/**
  * The Host we are associated with.
  */
 protected Host host = null;
@@ -382,6 +399,10 @@
 String contextPath = "/" + file;
 if (file.equals("ROOT")) {
 contextPath = "";
+} else {
+   String path = getContextPath(dir);
+   if (path != null)
+   contextPath = path;
 }
 if (host.findChild(contextPath) != null) {
 continue;
@@ -404,6 +425,74 @@
 
 }
 
+
+/**
+ * Get the path from a context defined by an XML context descriptor.
+ */
+protected synchronized String getContextPath(File configFile) {
+InputStream stream = null;
+String contextPath = null;
+try {
+URL config = new URL("file", null, configFile.getCanonicalPath());
+stream = config.openStream();
+Digester digester = createDigester();
+digester.setDebug(getDebug());
+digester.clear();
+digester.push(this);
+digester.parse(stream);
+stream.close();
+stream = null;
+if (context !=null) {
+   contextPath = context.getPath();
+}
+} catch (Exception e) {
+  log( "Parse exception :", e );
+  return null;
+} finally {
+if (stream != null) {
+try {
+stream.close();
+} catch (Throwable t) {
+;
+}
+}
+   digester.push(null);
+context = null;
+}
+return contextPath;
+}
+
+
+/**
+ * Create (if necessary) and return a Digester configured to process the
+ * context configuration descriptor for an application.
+ */
+protected Digester createDigester() {
+
+if (digester == null) {
+digester = new Digester();
+digester.setValidating(false);
+digester.addRuleSet(new ContextRuleSet(""));
+digester.addRuleSet(new NamingRuleSet("Context/"));
+}
+return (digester);
+}
+
+
+/**
+ * Used by digester to add a context in [EMAIL PROTECTED] getContextPath}.
+ */
+public void addChild(Container child) {
+context = (Context) child;
+}
+
+
+/**
+ * Delegate a request for the parent class loader to our associated Host.
+ */
+public ClassLoader getParentClassLoader() {
+return (host.getParentClassLoader());
+}
 
 /**
  * Deploy WAR files.



-

DO NOT REPLY [Bug 17970] - Webapp contexts deployed twice when multi-level context path is specified

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=17970


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Additional Comments From [EMAIL PROTECTED]  2005-11-30 22:33 ---
Rather a long time after the patch was submitted but I have now committed a
variant of this to TC4. It will be included in 4.1.32 onwards.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getContext() - spec interpretation

2005-11-30 Thread Mark Thomas

Jan,

This looks good to me.

I have patches ready to go for TC4 and TC5. They are based on the 
existing code but implement the spirit of Bill's proposed solution and 
add handling for crossContext.


I'll give people a little longer in case they want to add to this 
discussion and then I'll commit them.


Mark

Jan Luehe wrote:

I've rewritten the javadocs of getContext(), as follows:

/**
 * Returns the ServletContext object to which the
 * specified URI has been mapped.
 *
 * This method allows servlets to gain access to foreign servlet
 * contexts deployed on the same container, from which
 * [EMAIL PROTECTED] RequestDispatcher} objects may be obtained.
 * A servlet context is considered foreign to a servlet if it is
 * different from the servlet's own servlet context.
 *
 * The given URI must be begin with "/".
 *
 * A security conscious servlet container may return
 * null if the specified URI maps to a foreign context.
 *
 * @param uripath The URI to map
 *
 * @return The ServletContext to which the given URI
 * has been mapped, or null if the given URI does not map to any of
 * the servlet contexts deployed on the container, or if the URI
 * maps to a foreign context and access to foreign contexts has been
 * disabled by the container
 *
 * @see RequestDispatcher
 *
 */
public ServletContext getContext(String uripath);


If we all agree, I will send this proposal to the Servlet EG.


Thanks,


Jan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getContext() - spec interpretation

2005-11-30 Thread Jan Luehe


Mark Thomas wrote On 11/30/05 13:42,:
> Jan,
> 
> This looks good to me.
> 
> I have patches ready to go for TC4 and TC5. They are based on the 
> existing code but implement the spirit of Bill's proposed solution and 
> add handling for crossContext.
> 
> I'll give people a little longer in case they want to add to this 
> discussion and then I'll commit them.

Sounds good!

Thanks, Mark!


Jan


> 
> Mark
> 
> Jan Luehe wrote:
> 
>>I've rewritten the javadocs of getContext(), as follows:
>>
>>/**
>> * Returns the ServletContext object to which the
>> * specified URI has been mapped.
>> *
>> * This method allows servlets to gain access to foreign servlet
>> * contexts deployed on the same container, from which
>> * [EMAIL PROTECTED] RequestDispatcher} objects may be obtained.
>> * A servlet context is considered foreign to a servlet if it is
>> * different from the servlet's own servlet context.
>> *
>> * The given URI must be begin with "/".
>> *
>> * A security conscious servlet container may return
>> * null if the specified URI maps to a foreign context.
>> *
>> * @param uripath The URI to map
>> *
>> * @return The ServletContext to which the given URI
>> * has been mapped, or null if the given URI does not map to any of
>> * the servlet contexts deployed on the container, or if the URI
>> * maps to a foreign context and access to foreign contexts has been
>> * disabled by the container
>> *
>> * @see RequestDispatcher
>> *
>> */
>>public ServletContext getContext(String uripath);
>>
>>
>>If we all agree, I will send this proposal to the Servlet EG.
>>
>>
>>Thanks,
>>
>>
>>Jan
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350078 - /tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java

2005-11-30 Thread remm
Author: remm
Date: Wed Nov 30 15:32:20 2005
New Revision: 350078

URL: http://svn.apache.org/viewcvs?rev=350078&view=rev
Log:
- Remove useless commented out code.

Modified:

tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java

Modified: 
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: 
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=350078&r1=350077&r2=350078&view=diff
==
--- 
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java
 (original)
+++ 
tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11AprProtocol.java
 Wed Nov 30 15:32:20 2005
@@ -636,19 +636,6 @@
 ((ActionHook) processor).action(ActionCode.ACTION_START, 
null);
 }
 
-// FIXME: SSL implementation
-/*
-if( proto.secure ) {
-SSLSupport sslSupport=null;
-if(proto.sslImplementation != null)
-sslSupport = 
proto.sslImplementation.getSSLSupport(socket);
-processor.setSSLSupport(sslSupport);
-} else {
-processor.setSSLSupport( null );
-}
-processor.setSocket( socket );
-*/
-
 return processor.process(socket);
 
 } catch(java.net.SocketException e) {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350083 - /tomcat/container/tc5.5.x/webapps/docs/apr.xml

2005-11-30 Thread remm
Author: remm
Date: Wed Nov 30 16:12:04 2005
New Revision: 350083

URL: http://svn.apache.org/viewcvs?rev=350083&view=rev
Log:
- Add example SSL config.

Modified:
tomcat/container/tc5.5.x/webapps/docs/apr.xml

Modified: tomcat/container/tc5.5.x/webapps/docs/apr.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/apr.xml?rev=350083&r1=350082&r2=350083&view=diff
==
--- tomcat/container/tc5.5.x/webapps/docs/apr.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/apr.xml Wed Nov 30 16:12:04 2005
@@ -232,6 +232,19 @@
 
 
 
+
+
+An example SSL Connector declaration can be:
+
+
+
+
 

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: directory listings

2005-11-30 Thread Yoav Shapira
Hi,
It's an interesting patch and an interesting idea in general.  I'm
impressed with the performance findings, although I haven't seen
anyone recently complaining about many concurrent directory listings
requests.

I have a couple of requests for the patch, if you don't mind some
feedback.  I'd prefer a separate class for the DirectoryListingCache
or whatever you want to call it, with its CacheEntry and rendering,
encoding methods.  It's kind of ugly to throw all of that into
DefaultServlet.  DefaultServlet can then use the cache class.  I'd
also prefer the relevant parameters (5, 1000) to be configurable, at
least via protected setter/getter methods.  Finally, assuming the
above refactoring is done, I'd like a parameter from web.xml to
DefaultServlet setting whether to use the directory listing cache or
not.  That way people can turn it off easily.

Yoav

On 11/30/05, Rafael H. Schloming <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've been looking into the performance problems associated with many
> concurrent requests of large directories. After doing some informal
> benchmarking I've come up with the attached patch that improves
> performance in this scenario. The patch adds a size limited Map with a 5
> second timeout for caching rendered directory listings. My tests show a
> significant performance improvement and the server no longer keels over
> from OutOfMemory exceptions at higher concurrency levels.
>
> Below are the results of the benchmarks I performed against the
> unmodified server.
>
> c | total | mean
>   -
> 1 | 33.72985 seconds  | 330.730 ms
>10 | 12.807910 seconds | 1280.791 ms
>20 | 12.641188 seconds | 2528.238 ms
>30 | 12.930321 seconds | 3879.096 ms
>40 | --| --
>50 | --| --
>60 | --| --
>70 | --| --
>80 | --| --
>90 | --| --
>   100 | --| --
>
>
> Here are the same benchmarks with the attached patch applied:
>
> c | total | mean
>   -
> 1 | 0.949313 seconds  | 9.493 ms
>10 | 0.148746 seconds  | 14.875 ms
>20 | 0.167047 seconds  | 33.409 ms
>30 | 0.198910 seconds  | 59.673 ms
>40 | 0.202527 seconds  | 81.011 ms
>50 | 0.176821 seconds  | 88.410 ms
>60 | 0.203042 seconds  | 121.825 ms
>70 | 0.257176 seconds  | 180.023 ms
>80 | 0.283165 seconds  | 226.532 ms
>90 | 0.304787 seconds  | 274.308 ms
>   100 | 0.196776 seconds  | 196.776 ms
>
>   c = number of concurrent requests (see the -c flag for ab)
>   total = total time for benchmark to complete
>   mean = the average time until each request is complete
>   -- = benchmark timed out
>
>   In all cases the total number of requests is 100 and the test
>   directory being listed contains 2000 empty files.
>
> --
> Rafael H. Schloming <[EMAIL PROTECTED]>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37381] - pageContext.forward causes Illegal to clear() when buffer size == 0

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37381





--- Additional Comments From [EMAIL PROTECTED]  2005-12-01 02:00 ---
Created an attachment (id=17095)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17095&action=view)
Simple test case to reproduce the error


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37381] - pageContext.forward causes Illegal to clear() when buffer size == 0

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37381





--- Additional Comments From [EMAIL PROTECTED]  2005-12-01 02:00 ---
Yes it does.  just did a test using a very simple JSP - same err:

java.lang.IllegalStateException: Illegal to clear() when buffer size == 0
org.apache.jasper.runtime.JspWriterImpl.clear(JspWriterImpl.java:146)

org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:669)

org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)

org.apache.jsp.respbufftest_jsp._jspService(org.apache.jsp.respbufftest_jsp:45)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.12 logs.

JSP used to get the above has been attached for you convenience.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: directory listings

2005-11-30 Thread Tim Funk
It looks like this issue only occurs when the XSLT transformation is done on 
the directory listing. Which is not an out of box configuration so there is 
no worry for DOS (in case anyone is wondering).


Otherwise - looks interesting.  cacheTTL  and cacheMax should be configurable 
at servlet init time.



-Tim

Rafael H. Schloming wrote:


Hi,

I've been looking into the performance problems associated with many
concurrent requests of large directories. After doing some informal
benchmarking I've come up with the attached patch that improves
performance in this scenario. The patch adds a size limited Map with a 5
second timeout for caching rendered directory listings. My tests show a
significant performance improvement and the server no longer keels over
from OutOfMemory exceptions at higher concurrency levels.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350113 - /tomcat/build/tags/tc5.5.x/TOMCAT_5_5_13/

2005-11-30 Thread yoavs
Author: yoavs
Date: Wed Nov 30 18:54:00 2005
New Revision: 350113

URL: http://svn.apache.org/viewcvs?rev=350113&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_13.

Added:
tomcat/build/tags/tc5.5.x/TOMCAT_5_5_13/
  - copied from r350112, tomcat/build/tc5.5.x/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350114 - /tomcat/connectors/tags/tc5.5.x/TOMCAT_5_5_13/

2005-11-30 Thread yoavs
Author: yoavs
Date: Wed Nov 30 18:54:02 2005
New Revision: 350114

URL: http://svn.apache.org/viewcvs?rev=350114&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_13.

Added:
tomcat/connectors/tags/tc5.5.x/TOMCAT_5_5_13/
  - copied from r350113, tomcat/connectors/trunk/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350115 - /tomcat/container/tags/tc5.5.x/TOMCAT_5_5_13/

2005-11-30 Thread yoavs
Author: yoavs
Date: Wed Nov 30 18:54:03 2005
New Revision: 350115

URL: http://svn.apache.org/viewcvs?rev=350115&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_13.

Added:
tomcat/container/tags/tc5.5.x/TOMCAT_5_5_13/
  - copied from r350114, tomcat/container/tc5.5.x/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350116 - /tomcat/jasper/tags/5.5.x/TOMCAT_5_5_13/

2005-11-30 Thread yoavs
Author: yoavs
Date: Wed Nov 30 18:54:03 2005
New Revision: 350116

URL: http://svn.apache.org/viewcvs?rev=350116&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_13.

Added:
tomcat/jasper/tags/5.5.x/TOMCAT_5_5_13/
  - copied from r350115, tomcat/jasper/tc5.5.x/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350117 - /tomcat/site/tags/TOMCAT_5_5_13/

2005-11-30 Thread yoavs
Author: yoavs
Date: Wed Nov 30 18:54:04 2005
New Revision: 350117

URL: http://svn.apache.org/viewcvs?rev=350117&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_13.

Added:
tomcat/site/tags/TOMCAT_5_5_13/
  - copied from r350116, tomcat/site/trunk/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350118 - /tomcat/servletapi/tags/servlet2.4-jsp2.0-tc5.x/TOMCAT_5_5_13/

2005-11-30 Thread yoavs
Author: yoavs
Date: Wed Nov 30 18:56:55 2005
New Revision: 350118

URL: http://svn.apache.org/viewcvs?rev=350118&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_13.

Added:
tomcat/servletapi/tags/servlet2.4-jsp2.0-tc5.x/TOMCAT_5_5_13/
  - copied from r350117, tomcat/servletapi/servlet2.4-jsp2.0-tc5.x/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Slight SVN inconsistency

2005-11-30 Thread Yoav Shapira
Hi,
While tagging 5.5.13 I noticed a slight inconsistency in our directory
structure.  It's not a big deal but I wanted to let everyone know, and
see if we want to correct it.  We use "tc5.5.x" to indicate the 5.5
branch in directory names: that's true everywhere except the
tomcat/jasper/tags directory, where it's just "5.5.x" without the tc
prefix.  Not a big deal, like I said.

BTW, I created a little Tomcat (5.5.x) tagging scripts, it's in
~/bin/tagTomcat on minotaur if anyone's interested.

--
Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36863] - Space seperated cookie value text returned in quotes

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36863


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2005-12-01 04:34 ---
Hello,

I want to re-open this case because I'm running into the same problem.  I'm 
porting a large app to tomcat and can't go any further until this is fixed.

I've written a separate app that contains a jsp file with a form and a 
servlet.  That's it.  All the servlet does is set the cookie and include the 
jsp.

If I use a cookie value without spaces then then there are no quotes.  If I 
use a value with spaces than quotes are automatically put around the value.  I 
also get the same results with commas.  I have not tried any other characters.

I would like to help get this resolved, so please feel free to contact me 
about this.

Thank you,


Steve.

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 36863] - Space seperated cookie value text returned in quotes

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36863


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|NEEDINFO




--- Additional Comments From [EMAIL PROTECTED]  2005-12-01 05:03 ---
Please attach the minimal WAR you mention with the one servlet and JSP to this
issue so that we can reproduce your results.

Please confirm your report is true for an out-of-the-box Tomcat 5.5.12
installation in stand-alone mode, i.e. without NetBeans or another IDE.

Please confirm that the cookie example servlet that ships with Tomcat does NOT
show quotes on your screen.  It doesn't for me, which is why this issue was
initially closed, but perhaps it strips out the quotes along the way.

Then, if you really want to help, a patch would be nice ;)

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37334] - Realm digest property not aligned with the administration console functionalities

2005-11-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37334


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |NEEDINFO




--- Additional Comments From [EMAIL PROTECTED]  2005-12-01 05:04 ---
Did you really mean to select version 5.0.31 for this?  Does it also happen on
5.5.12?

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350191 - /tomcat/container/tc5.5.x/webapps/docs/cluster-howto.xml

2005-11-30 Thread pero
Author: pero
Date: Wed Nov 30 22:46:37 2005
New Revision: 350191

URL: http://svn.apache.org/viewcvs?rev=350191&view=rev
Log:
Fix wrong example to set session manager attributes

Modified:
tomcat/container/tc5.5.x/webapps/docs/cluster-howto.xml

Modified: tomcat/container/tc5.5.x/webapps/docs/cluster-howto.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/cluster-howto.xml?rev=350191&r1=350190&r2=350191&view=diff
==
--- tomcat/container/tc5.5.x/webapps/docs/cluster-howto.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/cluster-howto.xml Wed Nov 30 22:46:37 
2005
@@ -940,15 +940,18 @@
   
 
 
-Example send all sessions at blocks. Serialize and send 100 session inside on 
block.
+Example send all sessions at separate blocks. Serialize and send 100 session 
inside one block.
+Wait maximale two minutes before the complete backup sessions are loaded 
inside tomcat boot process.
+Between send blocks wait 5 secs to transfers the session block to other node. 
This save memory
+when you use the async modes with queues.
 
-
+
 
 
 
@@ -981,7 +984,12 @@
 Install the mx4j-tools.jar at common/lib (use the same mx4j version as 
your tomcat release)
 Configure a MX4J JMX HTTP Adaptor at your AJP Connector
 
-
+
 
 
 Start your tomcat and look with your browser to 
http://${JMX.HOST}:${JMX.PORT}
@@ -1042,8 +1050,8 @@
   
 DeltaManager
 This manager control the sessions and handle session replication 
-type=Manager,path=${APP.CONTEXT.PATH},host=${HOST}
-type=Manager,path=${APP.CONTEXT.PATH},host=${HOST}
+type=Manager,path=${APP.CONTEXT.PATH}, host=${HOST}
+type=Manager,path=${APP.CONTEXT.PATH}, host=${HOST}
   
 
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]