cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup Catalina.java

2003-07-28 Thread remm
remm2003/07/28 01:46:39

  Modified:catalina/src/share/org/apache/catalina/startup Catalina.java
  Log:
  - Update default classname value for the server socket factory.
  
  Revision  ChangesPath
  1.19  +5 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java
  
  Index: Catalina.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Catalina.java 30 May 2003 19:27:44 -  1.18
  +++ Catalina.java 28 Jul 2003 08:46:39 -  1.19
  @@ -345,7 +345,7 @@
   org.apache.catalina.Connector);
   
   digester.addObjectCreate(Server/Service/Connector/Factory,
  - 
org.apache.catalina.net.DefaultServerSocketFactory,
  + 
org.apache.coyote.tomcat5.CoyoteServerSocketFactory,
className);
   digester.addSetProperties(Server/Service/Connector/Factory);
   digester.addSetNext(Server/Service/Connector/Factory,
  
  
  

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



Does Jasper for Tomcat 4.1.x support JSP line mapping?

2003-07-28 Thread Hugh J. L.
Hi,

As I know, Jasper for Tomcat 4.0 supports JSP line
mapping (in JakartaCommentGenerator.java) which is
very useful in JSP debugging. JBuilder supports JSP
debugging through this way.

Does Tomcat 4.1.x support this feature? If it doesn't
support for now, do you have plan to support this
feature?

Thanks.

Hugh


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



DO NOT REPLY [Bug 15555] - Setting cookie=false appears to still use cookies.

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1

Setting cookie=false appears to still use cookies.





--- Additional Comments From [EMAIL PROTECTED]  2003-07-28 11:13 ---
I can confirm this with Tomcat 4.1.24.
Even if I disable cookies in the context, they are processed if sent by
the browser. IMO this is a bug.

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup SetAllPropertiesRule.java Catalina.java

2003-07-28 Thread remm
remm2003/07/28 04:14:48

  Modified:catalina/src/share/org/apache/catalina/startup Catalina.java
  Added:   catalina/src/share/org/apache/catalina/startup
SetAllPropertiesRule.java
  Log:
  - Set all properties on the connector, including those which have no explicit
setter. This allows protocol dependent attributes (or other custom attributes)
without the need for getters/setters.
  - Note: The attributes which have no get/set won't appear on the connector
MBean (but of course, other beans could expose those).
  
  Revision  ChangesPath
  1.20  +6 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java
  
  Index: Catalina.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Catalina.java 28 Jul 2003 08:46:39 -  1.19
  +++ Catalina.java 28 Jul 2003 11:14:48 -  1.20
  @@ -339,7 +339,8 @@
   digester.addObjectCreate(Server/Service/Connector,
org.apache.coyote.tomcat5.CoyoteConnector,
className);
  -digester.addSetProperties(Server/Service/Connector);
  +digester.addRule(Server/Service/Connector, 
  + new SetAllPropertiesRule());
   digester.addSetNext(Server/Service/Connector,
   addConnector,
   org.apache.catalina.Connector);
  
  
  
  1.1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/SetAllPropertiesRule.java
  
  Index: SetAllPropertiesRule.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/SetAllPropertiesRule.java,v
 1.1 2003/07/28 11:14:48 remm Exp $
   * $Revision: 1.1 $
   * $Date: 2003/07/28 11:14:48 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   */
  
  
  package org.apache.catalina.startup;
  
  import org.apache.commons.digester.Rule;
  import 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5 CoyoteConnector.java

2003-07-28 Thread remm
remm2003/07/28 04:19:11

  Modified:catalina/src/share/org/apache/coyote/tomcat5
CoyoteConnector.java
  Log:
  - Add a new protocol attribute, which can be used rather than using the
protocol handler classname (I am trying to beautify a bit the default
configuration).
  
  Revision  ChangesPath
  1.16  +40 -3 
jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteConnector.java
  
  Index: CoyoteConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/coyote/tomcat5/CoyoteConnector.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CoyoteConnector.java  27 Jul 2003 17:50:35 -  1.15
  +++ CoyoteConnector.java  28 Jul 2003 11:19:11 -  1.16
  @@ -824,6 +824,44 @@
   
   
   /**
  + * Return the Coyote protocol handler in use.
  + */
  +public String getProtocol() {
  +
  +if (org.apache.coyote.http11.Http11Protocol.equals
  +(getProtocolHandlerClassName())) {
  +return HTTP/1.1;
  +} else if (org.apache.jk.server.JkCoyoteHandler.equals
  +   (getProtocolHandlerClassName())) {
  +return AJP/1.3;
  +}
  +return null;
  +
  +}
  +
  +
  +/**
  + * Set the Coyote protocol which will be used
  + * by the connector.
  + *
  + * @param protocolHandlerClassName The new class name
  + */
  +public void setProtocol(String protocol) {
  +
  +if (protocol.equals(HTTP/1.1)) {
  +setProtocolHandlerClassName
  +(org.apache.coyote.http11.Http11Protocol);
  +} else if (protocol.equals(AJP/1.3)) {
  +setProtocolHandlerClassName
  +(org.apache.jk.server.JkCoyoteHandler);
  +} else {
  +setProtocolHandlerClassName(null);
  +}
  +
  +}
  +
  +
  +/**
* Return the class name of the Coyote protocol handler in use.
*/
   public String getProtocolHandlerClassName() {
  @@ -1257,7 +1295,6 @@
   Class clazz = Class.forName(protocolHandlerClassName);
   protocolHandler = (ProtocolHandler) clazz.newInstance();
   } catch (Exception e) {
  -e.printStackTrace();
   throw new LifecycleException
   (sm.getString
(coyoteConnector.protocolHandlerInstantiationFailed, e));
  @@ -1308,7 +1345,7 @@
   Iterator keys = properties.keySet().iterator();
   while( keys.hasNext() ) {
   String name = (String)keys.next();
  -String value = properties.get(name).toString(); 
  +String value = properties.get(name).toString();
   IntrospectionUtils.setProperty(protocolHandler, name, value);
   }
   
  
  
  

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



DO NOT REPLY [Bug 10419] - Session-ID grabbing from Request accepts invalid session cookies in presense of valid URL sessions

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10419.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10419

Session-ID grabbing from Request accepts invalid session cookies in presense of valid 
URL sessions





--- Additional Comments From [EMAIL PROTECTED]  2003-07-28 11:26 ---
Bug #1 is related to this. I actually have a use case:

- Admin installs $WEBAPPLICATION
- forgets to disable cookies in Context; $WEBAPPLICATION always encodes
  sessions in URL
- users start using $WEBAPPLICATION
- Admin remembers after a week
- lots of users have cookies hanging around in their browsers and cannot log in
  any more because there is always a stale JSESSIONID cookie being sent by
  the browser and examined by Tomcat

We have been bitten by this bug several times.

Bye, Tino.

PS: Tested with Tomcat 4.1.24

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



cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads ThreadPool.java

2003-07-28 Thread remm
remm2003/07/28 04:23:57

  Modified:util/java/org/apache/tomcat/util/threads ThreadPool.java
  Log:
  - Beautify the thread names.
  
  Revision  ChangesPath
  1.12  +20 -2 
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java
  
  Index: ThreadPool.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ThreadPool.java   3 Apr 2003 00:51:44 -   1.11
  +++ ThreadPool.java   28 Jul 2003 11:23:56 -  1.12
  @@ -133,7 +133,12 @@
   
   /** Name of the threadpool
*/
  -protected String name=null;
  +protected String name = TP;
  +
  +/**
  + * Sequence.
  + */
  +protected int sequence = 1;
   
   /**
* Helper object for logging
  @@ -240,6 +245,18 @@
   return isDaemon;
   }
   
  +public void setName(String name) {
  +this.name = name;
  +}
  +
  +public String getName() {
  +return name;
  +}
  +
  +public int getSequence() {
  +return sequence++;
  +}
  +
   public void addThread( Thread t, ControlRunnable cr ) {
   threads.put( t, cr );
   for( int i=0; ilisteners.size(); i++ ) {
  @@ -499,7 +516,7 @@
   shouldTerminate = false;
   t = new Thread(this);
   t.setDaemon(p.getDaemon() );
  - t.setName( MonitorRunnable );
  + t.setName(p.getName() + -Monitor);
   t.start();
   }
   
  @@ -592,6 +609,7 @@
   this.p = p;
   t = new ThreadWithAttributes(p, this);
   t.setDaemon(true);
  +t.setName(p.getName() + -Processor + p.getSequence());
   t.start();
   p.addThread( t, this );
noThData=true;
  
  
  

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



cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Protocol.java

2003-07-28 Thread remm
remm2003/07/28 04:24:16

  Modified:http11/src/java/org/apache/coyote/http11 Http11Protocol.java
  Log:
  - Beautify the thread names.
  
  Revision  ChangesPath
  1.31  +1 -0  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java
  
  Index: Http11Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Http11Protocol.java   11 Jul 2003 01:06:04 -  1.30
  +++ Http11Protocol.java   28 Jul 2003 11:24:16 -  1.31
  @@ -185,6 +185,7 @@
   // XXX It should be possible to use a single TP
   tpOname=new ObjectName(domain + : + type=ThreadPool,name=http + 
ep.getPort());
   Registry.getRegistry().registerComponent(tp, tpOname, null );
  +tp.setName(http + ep.getPort());
   tp.addThreadPoolListener(new MXPoolListener(this, tp));
   } catch (Exception e) {
   log.error(Can't register threadpool );
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/conf server.xml

2003-07-28 Thread remm
remm2003/07/28 04:25:45

  Modified:catalina/src/conf server.xml
  Log:
  - Beautify the connectors default configuration (note: old configurations are
of course still valid).
  
  Revision  ChangesPath
  1.18  +15 -16jakarta-tomcat-catalina/catalina/src/conf/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/server.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- server.xml18 Apr 2003 02:50:38 -  1.17
  +++ server.xml28 Jul 2003 11:25:44 -  1.18
  @@ -89,9 +89,9 @@
   --
   
   !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
  -Connector className=org.apache.coyote.tomcat5.CoyoteConnector
  -   port=8080 minProcessors=5 maxProcessors=100
  -   enableLookups=true redirectPort=8443 acceptCount=100
  +Connector port=8080
  +   maxThreads=100 minSpareThreads=1 maxSpareThreads=10
  +   enableLookups=false redirectPort=8443 acceptCount=100
  debug=0 connectionTimeout=2 
  disableUploadTimeout=true /
   !-- Note : To disable connection timeouts, set connectionTimeout value
  @@ -99,28 +99,27 @@
   
   !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 --
   !--
  -Connector className=org.apache.coyote.tomcat5.CoyoteConnector
  -   port=8443 minProcessors=5 maxProcessors=75
  -   enableLookups=true disableUploadTimeout=true
  -   acceptCount=100 debug=0 scheme=https secure=true
  -  Factory className=org.apache.coyote.tomcat5.CoyoteServerSocketFactory
  -   clientAuth=false protocol=TLS /
  +Connector port=8443 
  +   maxThreads=50 minSpareThreads=1 maxSpareThreads=5
  +   enableLookups=false disableUploadTimeout=true
  +   acceptCount=100 debug=0 scheme=https secure=true
  +  Factory clientAuth=false protocol=TLS /
   /Connector
   --
   
   !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
  -Connector className=org.apache.coyote.tomcat5.CoyoteConnector
  -   port=8009 minProcessors=5 maxProcessors=75
  -   enableLookups=true redirectPort=8443
  +Connector port=8009 
  +   maxThreads=100 minSpareThreads=1 maxSpareThreads=10
  +   enableLookups=false redirectPort=8443
  acceptCount=10 debug=0
  -   protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/
  +   protocol=AJP/1.3 /
   
   !-- Define a Proxied HTTP/1.1 Connector on port 8082 --
   !-- See proxy documentation for more information about using this. --
   !--
  -Connector className=org.apache.coyote.tomcat5.CoyoteConnector
  -   port=8082 minProcessors=5 maxProcessors=75
  -   enableLookups=true
  +Connector port=8082 
  +   maxThreads=100 minSpareThreads=1 maxSpareThreads=10
  +   enableLookups=false
  acceptCount=100 debug=0 connectionTimeout=2
  proxyPort=80 disableUploadTimeout=true /
   --
  
  
  

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



DO NOT REPLY [Bug 15555] - Setting cookie=false appears to still use cookies.

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1

Setting cookie=false appears to still use cookies.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-07-28 11:31 ---
This is wrong: the setting is for disabling persistent cookies. Session cookies
are not persistent, and Tomcat will switch between URL encoding and session
cookies according to what the client does. This bug will not be addressed,
please do not reopen it.

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



DO NOT REPLY [Bug 21823] - Compiler uses invoking page's PageInfo for handling tag files

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21823.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21823

Compiler uses invoking page's PageInfo for handling tag files





--- Additional Comments From [EMAIL PROTECTED]  2003-07-28 12:45 ---
Works like a charm. Thanks a lot. Please incorporate.

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core mbeans-descriptors.xml

2003-07-28 Thread remm
remm2003/07/28 06:31:48

  Modified:catalina/src/share/org/apache/catalina/core
mbeans-descriptors.xml
  Log:
  - Expose the statistics in JMX.
  
  Revision  ChangesPath
  1.20  +31 -1 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- mbeans-descriptors.xml22 Jul 2003 21:01:26 -  1.19
  +++ mbeans-descriptors.xml28 Jul 2003 13:31:47 -  1.20
  @@ -677,7 +677,37 @@
  description=Performance statistics support for this managed object
  is=true
  type=boolean/
  -  
  +
  +attribute name=processingTime
  +   description=Cumulative processing time
  +   type=long
  +   writeable=false /
  +
  +attribute name=maxTime
  +   description=Maximum processing time of a request
  +   type=long
  +   writeable=false /
  +
  +attribute name=requestCount
  +   description=Number of requests processed by this wrapper
  +   type=int
  +   writeable=false /
  +
  +attribute name=errorCount
  +   description=Error count
  +   type=int
  +   writeable=false /
  +
  +attribute name=loadTime
  +   description=Load time
  +   type=long
  +   writeable=false /
  +
  +attribute name=classLoadTime
  +   description=Class loading time
  +   type=int
  +   writeable=false /
  +
   operation name=findMappings
  description=Return the mappings associated with this wrapper
  impact=INFO
  
  
  

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



getCanonicalPath used rather than getAbsolutePath

2003-07-28 Thread David Cassidy
Guys,

We deploy tomcat in a multi-hosting environment. We make rather extensive use of 
symlinks so that we can
update the system. ie when the user wants to publish their content the symlink is 
changed and hey bingo ...

The problem we're finding is that tomcat is expanding the symlink to the real path. At 
midnight we kinda
clean the system so that old dead versions are removed to save disk space etc.

Of course then tomcat gets broken due the the file not being there.
I've checked the source of Tomcat 4.1.24 and it seems that getCanonicalPath and 
getAbsolutePath
have been used interchangably.

Is there a reason for this ?

If not taken as though the two methods return the same(ish *) result can we have 
getAbsolutePath used
exclusivly ?

Many thanks

David

* they both return the absolute path, just is getCanonicalPath expands symlinks to the 
real dir name.


--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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



Re: getCanonicalPath used rather than getAbsolutePath

2003-07-28 Thread Remy Maucherat
David Cassidy wrote:
Guys,

We deploy tomcat in a multi-hosting environment. We make rather extensive use of 
symlinks so that we can
update the system. ie when the user wants to publish their content the symlink is 
changed and hey bingo ...
The problem we're finding is that tomcat is expanding the symlink to the real path. At 
midnight we kinda
clean the system so that old dead versions are removed to save disk space etc.
Of course then tomcat gets broken due the the file not being there.
I've checked the source of Tomcat 4.1.24 and it seems that getCanonicalPath and 
getAbsolutePath
have been used interchangably.
Is there a reason for this ?

If not taken as though the two methods return the same(ish *) result can we have 
getAbsolutePath used
exclusivly ?
No, sorry.

* they both return the absolute path, just is getCanonicalPath expands symlinks to the real dir name.
It does much more than that (ex: removing stuff like /./, etc): it is a 
minimal access path to the file (starting from the filesystem root).

Remy

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


Re: getCanonicalPath used rather than getAbsolutePath

2003-07-28 Thread David Cassidy

Ummm, is there anyway around my problem then ?
the problem is that the symlink will always be valid
but the directories that it has pointed to in the past  will be deleted.
Whats the reason for resolving the ..'s .'s symlinks etc  ?

Thanks

David



   

  Remy Maucherat   

  [EMAIL PROTECTED]To:   Tomcat Developers List 
[EMAIL PROTECTED]
   cc: 

  28/07/2003 14:45 Subject:  Re: getCanonicalPath used 
rather than getAbsolutePath 
  Please respond to

  Tomcat  

  Developers List 

   

   





David Cassidy wrote:
 Guys,

 We deploy tomcat in a multi-hosting environment. We make rather extensive use of 
 symlinks so that we can
 update the system. ie when the user wants to publish their content the symlink is 
 changed and hey bingo ...

 The problem we're finding is that tomcat is expanding the symlink to the real path. 
 At midnight we kinda
 clean the system so that old dead versions are removed to save disk space etc.

 Of course then tomcat gets broken due the the file not being there.
 I've checked the source of Tomcat 4.1.24 and it seems that getCanonicalPath and 
 getAbsolutePath
 have been used interchangably.

 Is there a reason for this ?

 If not taken as though the two methods return the same(ish *) result can we have 
 getAbsolutePath used
 exclusivly ?

No, sorry.

 * they both return the absolute path, just is getCanonicalPath expands symlinks to 
 the real dir name.

It does much more than that (ex: removing stuff like /./, etc): it is a
minimal access path to the file (starting from the filesystem root).

Remy


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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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



cvs commit: jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager StatusManagerServlet.java

2003-07-28 Thread remm
remm2003/07/28 07:11:09

  Modified:webapps/manager/WEB-INF/classes/org/apache/catalina/manager
StatusManagerServlet.java
  Log:
  - Display contexts and servlets stats.
  
  Revision  ChangesPath
  1.4   +95 -9 
jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java
  
  Index: StatusManagerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StatusManagerServlet.java 22 Jun 2003 17:32:44 -  1.3
  +++ StatusManagerServlet.java 28 Jul 2003 14:11:08 -  1.4
  @@ -255,7 +255,7 @@
   if ((request.getPathInfo() != null) 
(request.getPathInfo().equals(/all))) {
   // Warning: slow
  -writeApplicationsState(writer);
  +writeDetailedState(writer);
   }
   
   } catch (Exception e) {
  @@ -452,16 +452,102 @@
   /**
* Write applications state.
*/
  -protected void writeApplicationsState(PrintWriter writer)
  +protected void writeDetailedState(PrintWriter writer)
   throws Exception {
   
  -ObjectName queryHosts = new ObjectName(*:type=Host,*);
  +ObjectName queryHosts = new ObjectName(*:j2eeType=WebModule,*);
   Set hostsON = mBeanServer.queryNames(queryHosts, null);
   Iterator iterator = hostsON.iterator();
   while (iterator.hasNext()) {
  -ObjectName hostON = (ObjectName) iterator.next();
  -System.out.println(Host:  + hostON);
  +ObjectName contextON = (ObjectName) iterator.next();
  +writeContext(writer, contextON);
   }
  +
  +}
  +
  +
  +/**
  + * Write context state.
  + */
  +protected void writeContext(PrintWriter writer, ObjectName objectName)
  +throws Exception {
  +
  +String webModuleName = objectName.getKeyProperty(name);
  +String name = webModuleName;
  +if (name == null) {
  +return;
  +}
  +
  +String hostName = null;
  +String contextName = null;
  +if (name.startsWith(//)) {
  +name = name.substring(2);
  +}
  +int slash = name.indexOf(/);
  +if (slash != -1) {
  +hostName = name.substring(0, slash);
  +contextName = name.substring(slash);
  +} else {
  +return;
  +}
  +// Special case for the root context
  +if (contextName.equals(/)) {
  +contextName = ;
  +}
  +
  +writer.print(h1);
  +writer.print(name);
  +writer.print(/h1);
  +
  +writer.print(br/);
  +
  +writer.print( Startup time: );
  +writer.print(mBeanServer.getAttribute(objectName, startupTime));
  +writer.print( TLD scan time: );
  +writer.print(mBeanServer.getAttribute(objectName, tldScanTime));
  +
  +writer.print(br/);
  +
  +String onStr = *:j2eeType=Servlet,WebModule= + webModuleName + ,*;
  +ObjectName servletObjectName = new ObjectName(onStr);
  +Set set = mBeanServer.queryMBeans(servletObjectName, null);
  +Iterator iterator = set.iterator();
  +while (iterator.hasNext()) {
  +ObjectInstance oi = (ObjectInstance) iterator.next();
  +writeWrapper(writer, oi.getObjectName());
  +}
  +
  +}
  +
  +
  +/**
  + * Write detailed information about a wrapper.
  + */
  +public void writeWrapper(PrintWriter writer, ObjectName objectName)
  +throws Exception {
  +
  +String servletName = objectName.getKeyProperty(name);
  +
  +writer.print(h2);
  +writer.print(servletName);
  +writer.print(/h2);
  +
  +writer.print(br/);
  +
  +writer.print( Processing time: );
  +writer.print(mBeanServer.getAttribute(objectName, processingTime));
  +writer.print( Max time: );
  +writer.print(mBeanServer.getAttribute(objectName, maxTime));
  +writer.print( Request count: );
  +writer.print(mBeanServer.getAttribute(objectName, requestCount));
  +writer.print( Error count: );
  +writer.print(mBeanServer.getAttribute(objectName, errorCount));
  +writer.print( Load time: );
  +writer.print(mBeanServer.getAttribute(objectName, loadTime));
  +writer.print( Classload time: );
  +writer.print(mBeanServer.getAttribute(objectName, classLoadTime));
  +
  +writer.print(br/);
   
   }
   
  
  
  

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

[GUMP] Build Failure - jk2

2003-07-28 Thread Craig McClanahan

This email is autogenerated from the output from:
http://cvs.apache.org/builds/gump/2003-07-28/jakarta-tomcat-jk-native2.html


Buildfile: build.xml

init.taskdef:

guess.os:
 [echo] build.properties i386.Linux
 [echo] Linux:true Win32:${win32} Netware:${netware} Solaris:${solaris} 
HPUX:${hpux}

init.win32.properties:

init.win32.mc:

init.win32:

init.netware:

init.os:

guess.server:
 [echo] Apache2 /usr/local/apache2 true
 [echo] Apache13 /usr true
 [echo] IIS ${iis.home} ${iis.detect}
 [echo] Iplanet ${iplanet.home} ${iplanet.detect}
 [echo] AOLserver ${aolserver.home} ${aolserver.detect}
 [echo] JNI true


init:

apache20:
   [so] Compiling 37 out of 42
Compiling 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
   [so] Compile failed 1 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
   [so] Command:libtool --mode=compile cc -c -o 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache2/common/jk_channel_socket.o
 -I/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common 
-I/usr/local/apache2/include -I/usr/local/apache2/include -I${apr-util.include} 
-I/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/include 
-I/usr/java/j2sdk1.4.1_02/jre/../include 
-I/usr/java/j2sdk1.4.1_02/jre/../include/linux -g -W -D_REENTRANT -DCHUNK_SIZE=4096 
-DUSE_APACHE_MD5 -DHAS_APR -DHAVE_JNI 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
   [so] Output:
   [so] rm -f 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache2/common/.libs/jk_channel_socket.lo
   [so] cc -c -I/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common 
-I/usr/local/apache2/include -I/usr/local/apache2/include -I\${apr-util.include} 
-I/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/include 
-I/usr/java/j2sdk1.4.1_02/jre/../include 
-I/usr/java/j2sdk1.4.1_02/jre/../include/linux -g -W -D_REENTRANT -DCHUNK_SIZE=4096 
-DUSE_APACHE_MD5 -DHAS_APR -DHAVE_JNI 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
 -fPIC -DPIC -o 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache2/common/.libs/jk_channel_socket.lo
   [so] StdErr:
   [so] 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c: 
In function `jk2_channel_socket_resolve':
   [so] 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c:302:
 warning: this function may return with or without a value
   [so] 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c: 
At top level:
   [so] 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c:302:
 parse error before `else'
   [so] 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c:306:
 parse error before `'

BUILD FAILED
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/build.xml:283: Compile failed 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c

Total time: 5 seconds

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



DO NOT REPLY [Bug 18485] - Jasper tries to write something directly to $CATALINA_HOME

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18485.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18485

Jasper tries to write something directly to $CATALINA_HOME

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  everconfirmed|0   |1



--- Additional Comments From [EMAIL PROTECTED]  2003-07-28 14:41 ---
Same here :

2003-07-28 16:25:19 jsp: init
2003-07-28 16:25:20 Error compiling file:
/usr/share/tomcat4/work/Standalone/localhost/_/jsp/login/login_jsp.java
[javac] Compiling 1 source file


2003-07-28 16:25:20 Info: Compile:
javaFileName=/usr/share/tomcat4/work/Standalone/localhost/_/jsp/login/login_jsp.java
classpath= [snipped]
 work dir=/usr/share/tomcat4/work/Standalone/localhost/_
srcDir=/usr/share/tomcat4/work/Standalone/localhost/_
include=jsp/login/login_jsp.java
Exception compiling Error creating temporary file

2003-07-28 16:25:20 Exception: 
Error creating temporary file
at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:429)
at
org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:81)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
at org.apache.jasper.compiler.Compiler.generateClass(Unknown Source)
at org.apache.jasper.compiler.Compiler.compile(Unknown Source)
at org.apache.jasper.JspCompilationContext.compile(Unknown Source)
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.AccessLogValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.connector.http.HttpProcessor.process(Unknown Source)
at org.apache.catalina.connector.http.HttpProcessor.run(Unknown Source)
at java.lang.Thread.run(Thread.java:479)
--- Nested Exception ---
java.io.FileNotFoundException: /usr/share/tomcat4/files1128311153 (Permission
non accordée)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.init(FileOutputStream.java:135)
at java.io.FileOutputStream.init(FileOutputStream.java:118)
at java.io.FileWriter.init(FileWriter.java:58)
at

DO NOT REPLY [Bug 18485] - Jasper tries to write something directly to $CATALINA_HOME

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18485.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18485

Jasper tries to write something directly to $CATALINA_HOME

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-07-28 14:50 ---
Sounds a lot like this:
http://jakarta.apache.org/tomcat/faq/misc.html#compile

All the traces shown no evidence of writing to $CATALINA_HOME. It appears
everything is being written to something under $CATALINA_HOME/work.

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



cvs commit: jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager Constants.java HTMLManagerServlet.java LocalStrings.properties LocalStrings_fr.properties StatusManagerServlet.java

2003-07-28 Thread remm
remm2003/07/28 07:57:48

  Modified:webapps/manager/WEB-INF/classes/org/apache/catalina/manager
Constants.java HTMLManagerServlet.java
LocalStrings.properties LocalStrings_fr.properties
StatusManagerServlet.java
  Log:
  - Beautify the status servlet, and integrate it with the HTML manager, through
links.
  - Note: For programmatic access, I recommend not trying to hack the status
output, but rather look into JSR 160 (http://www.jcp.org/en/jsr/detail?id=160).
This JSR could possibly be finalized by the time TC 5 ships, so it's IMO the
preffered solution.
  
  Revision  ChangesPath
  1.2   +155 -3
jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java
  
  Index: Constants.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Constants.java26 Mar 2003 09:49:18 -  1.1
  +++ Constants.java28 Jul 2003 14:57:47 -  1.2
  @@ -69,5 +69,157 @@
   
   public static final String Package = org.apache.catalina.manager;
   
  +public static final String HTML_HEADER_SECTION =
  +html\n +
  +head\n +
  +style\n +
  +  table { width: 100%; }\n +
  +  td.page-title {\n +
  +text-align: center;\n +
  +vertical-align: top;\n +
  +font-family:verdana,sans-serif;\n +
  +font-weight: bold;\n +
  +background: white;\n +
  +color: black;\n +
  +  }\n +
  +  td.title {\n +
  +text-align: left;\n +
  +vertical-align: top;\n +
  +font-family:verdana,sans-serif;\n +
  +font-style:italic;\n +
  +font-weight: bold;\n +
  +background: #D2A41C;\n +
  +  }\n +
  +  td.header-left {\n +
  +text-align: left;\n +
  +vertical-align: top;\n +
  +font-family:verdana,sans-serif;\n +
  +font-weight: bold;\n +
  +background: #FFDC75;\n +
  +  }\n +
  +  td.header-center {\n +
  +text-align: center;\n +
  +vertical-align: top;\n +
  +font-family:verdana,sans-serif;\n +
  +font-weight: bold;\n +
  +background: #FFDC75;\n +
  +  }\n +
  +  td.row-left {\n +
  +text-align: left;\n +
  +vertical-align: middle;\n +
  +font-family:verdana,sans-serif;\n +
  +color: black;\n +
  +background: white;\n +
  +  }\n +
  +  td.row-center {\n +
  +text-align: center;\n +
  +vertical-align: middle;\n +
  +font-family:verdana,sans-serif;\n +
  +color: black;\n +
  +background: white;\n +
  +  }\n +
  +  td.row-right {\n +
  +text-align: right;\n +
  +vertical-align: middle;\n +
  +font-family:verdana,sans-serif;\n +
  +color: black;\n +
  +background: white;\n +
  +  }\n +
  +/style\n;
  +
  +public static final String BODY_HEADER_SECTION =
  +title{0}/title\n +
  +/head\n +
  +\n +
  +body bgcolor=\#FF\\n +
  +\n +
  +table cellspacing=\4\ width=\100%\ border=\0\\n +
  + tr\n +
  +  td colspan=\2\\n +
  +   a href=\http://jakarta.apache.org/\;\n +
  +img border=\0\ alt=\The Jakarta Project\ align=\left\\n +
  + src=\{0}/images/jakarta-logo.gif\\n +
  +   /a\n +
  +   a href=\http://jakarta.apache.org/tomcat/\;\n +
  +img border=\0\ alt=\The Tomcat Servlet/JSP Container\\n +
  + align=\right\ src=\{0}/images/tomcat.gif\\n +
  +   /a\n +
  +  /td\n +
  + /tr\n +
  +/table\n +
  +hr size=\1\ noshade\\\n +
  +table cellspacing=\4\ width=\100%\ border=\0\\n +
  + tr\n +
  +  td class=\page-title\ bordercolor=\#00\  +
  +align=\left\ nowrap\n +
  +   font size=\+2\{1}/font\n +
  +  /td\n +
  + /tr\n +
  +/table\n +
  +br\n +
  +\n;
  +
  +public static final String MESSAGE_SECTION =
  +table border=\1\ cellspacing=\0\ cellpadding=\3\\n +
  + tr\n +
  +  td class=\row-left\ width=\10%\ +
  +smallb{0}/b/smallnbsp;/td\n +
  +  td class=\row-left\pre{1}/pre/td\n +
  + /tr\n +
  +/table\n +
  +br\n +
  +\n;
  +
  +public static final String MANAGER_SECTION =
  +table border=\1\ cellspacing=\0\ cellpadding=\3\\n +
  +tr\n 

DO NOT REPLY [Bug 21908] - Fix for Yaov's 4.1.26 annoyance

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21908.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21908

Fix for Yaov's 4.1.26 annoyance

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |



--- Additional Comments From [EMAIL PROTECTED]  2003-07-28 15:02 ---
Not to be a pain in the butt, but the below fix isn't the patch I submitted in
the bug report.  In addition, the patch submitted changes the desired effect of
that block of code (from a check for existence to a check for non-existance).  I
was going to submit a patch at some point to change all of that syntax to
explicit test checks.  So I recommend changing:
if $foo; then
To:
if [ $foo ]; then
precisely to avoid errors like this and the one that required the patch I sent
in originally.
Jason

-

funkman 2003/07/26 07:27:54

  Modified:catalina/src/bin setclasspath.sh
  Log:
  Per bugzilla 21908
  Thanks jcorley1 AT nc.rr dot com (Jason Corley)
  
  Revision  ChangesPath
  1.10  +2 -2  jakarta-tomcat-4.0/catalina/src/bin/setclasspath.sh
  
  Index: setclasspath.sh
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/setclasspath.sh,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- setclasspath.sh   8 May 2003 08:19:58 -   1.9
  +++ setclasspath.sh   26 Jul 2003 14:27:54 -  1.10
  @@ -10,7 +10,7 @@
 echo This environment variable is needed to run this program
 exit 1
   fi
  -if $os400; then
  +if [ ! $os400 ]; then
 if [ ! -r $JAVA_HOME/bin/java -o ! -r $JAVA_HOME/bin/javac ]; then
   echo The JAVA_HOME environment variable is not defined correctly
   echo This environment variable is needed to run this program

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



DO NOT REPLY [Bug 21933] New: - CompressionResponseStream creates Gzip before header

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21933.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21933

CompressionResponseStream creates Gzip before header

   Summary: CompressionResponseStream creates Gzip before header
   Product: Tomcat 4
   Version: 4.1.24
  Platform: All
OS/Version: All
Status: NEW
  Severity: Major
  Priority: Other
 Component: Webapps:Examples
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


In CompressionResponseStream, the code does the following:

gzipstream = new GZIPOutputStream(output);
response.addHeader(Content-Encoding, gzip);

If the output stream already contains enough data to trip the internal buffer 
and cause a write, then the addHeader() is ignored.  The result is that the 
data is sent gzip'd, but the header doesn't indicate it.  This causes mozilla 
to display garbage and IE to prompt for a download.

Simply reversing the lines seems to fix the problem.

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



[5.0] Connector default configuration + connection timeout

2003-07-28 Thread Remy Maucherat
Hi,

What would be the best connector default configuration ?

I switched HTTP/1.1 to be:
maxThreads: 100
minSpare: 1
maxSpare: 10
That should be ok for a small/medium site, and bad for a large site. It 
should be decent for benchmarking if there's a warmup period. Should the 
default config be large site compliant ?

Also, in order to conserve processors for useful tasks when the load 
increases (and also twart DoS attacks), I was thinking about introducing 
 dynamic scaling for the HTTP connection timeout for keepalive.
The formula would be something like this.

ratio = maxThreads / currentBusyThreads;

if (ratio between 0 and 0.33) {
normal timeout
} else if (ratio between 0.33 and 0.66) {
half timeout
} else if (ratio between 0.66 and 1) {
no keepalive (so only one request is processed per connection), 
timeout / 4 (or maybe more)
}

Comments ?

Remy



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


Re: [5.0] Connector default configuration + connection timeout

2003-07-28 Thread Henri Gomez
Remy Maucherat a écrit :

Hi,

What would be the best connector default configuration ?

I switched HTTP/1.1 to be:
maxThreads: 100
minSpare: 1
maxSpare: 10
That should be ok for a small/medium site, and bad for a large site. It 
should be decent for benchmarking if there's a warmup period. Should the 
default config be large site compliant ?
May be you should mimic the defaults settings of Apache 2.0 :

150 Threads, 25 MinSpare, 75 MaxSpare.


Also, in order to conserve processors for useful tasks when the load 
increases (and also twart DoS attacks), I was thinking about introducing 
 dynamic scaling for the HTTP connection timeout for keepalive.
The formula would be something like this.

ratio = maxThreads / currentBusyThreads;

if (ratio between 0 and 0.33) {
normal timeout
} else if (ratio between 0.33 and 0.66) {
half timeout
} else if (ratio between 0.66 and 1) {
no keepalive (so only one request is processed per connection), 
timeout / 4 (or maybe more)
}

Comments ?
Protection against DOS attack should also have some glues like :

- Max clients from the same IP (ie DOS attack from the same host).

- Max request by minutes or seconds (slow down attackers)





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


cvs commit: jakarta-tomcat-4.0/catalina/src/bin setclasspath.sh

2003-07-28 Thread funkman
funkman 2003/07/28 08:36:23

  Modified:catalina/src/bin setclasspath.sh
  Log:
  per bugzilla 21908
  undo my previous commit since I evidently didn't read the patch correctly
  and apply the correct patch
  
  Revision  ChangesPath
  1.11  +2 -2  jakarta-tomcat-4.0/catalina/src/bin/setclasspath.sh
  
  Index: setclasspath.sh
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/setclasspath.sh,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- setclasspath.sh   26 Jul 2003 14:27:54 -  1.10
  +++ setclasspath.sh   28 Jul 2003 15:36:23 -  1.11
  @@ -10,7 +10,7 @@
 echo This environment variable is needed to run this program
 exit 1
   fi
  -if [ ! $os400 ]; then
  +if $os400; then
 if [ ! -r $JAVA_HOME/bin/java -o ! -r $JAVA_HOME/bin/javac ]; then
   echo The JAVA_HOME environment variable is not defined correctly
   echo This environment variable is needed to run this program
  @@ -53,7 +53,7 @@
   
   # Set standard commands for invoking Java.
   _RUNJAVA=$JAVA_HOME/bin/java
  -if ! $os400; then
  +if [ ! $os400 ]; then
 _RUNJDB=$JAVA_HOME/bin/jdb
   fi
   _RUNJAVAC=$JAVA_HOME/bin/javac
  
  
  

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



AW: [5.0] Connector default configuration + connection timeout

2003-07-28 Thread Fischer, Ilona

 Protection against DOS attack should also have some glues like :
 
 - Max clients from the same IP (ie DOS attack from the same host).
How would you distinguish between users coming from big proxy and a
DOS-attack? Our access.logs shows that approx. 30% acesses comes from
t-online (a big ISP in germany) and AOL
 
Greetings :o)
Ilona

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



DO NOT REPLY [Bug 21908] - Fix for Yaov's 4.1.26 annoyance

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21908.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21908

Fix for Yaov's 4.1.26 annoyance

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-07-28 15:40 ---
Now everything makes sense. The correct patch should be applied now. (I hope)
Sorry about the confusion.

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



Re: [5.0] Connector default configuration + connection timeout

2003-07-28 Thread Remy Maucherat
Henri Gomez wrote:

Remy Maucherat a écrit :

Hi,

What would be the best connector default configuration ?

I switched HTTP/1.1 to be:
maxThreads: 100
minSpare: 1
maxSpare: 10
That should be ok for a small/medium site, and bad for a large site. 
It should be decent for benchmarking if there's a warmup period. 
Should the default config be large site compliant ?


May be you should mimic the defaults settings of Apache 2.0 :

150 Threads, 25 MinSpare, 75 MaxSpare.
Ok, thanks.

I forgot to mention JK 2 in my email ;-) What should be the default 
configuration for that connector (including jk2.properties if any) ?

Also, in order to conserve processors for useful tasks when the load 
increases (and also twart DoS attacks), I was thinking about 
introducing  dynamic scaling for the HTTP connection timeout for 
keepalive.
The formula would be something like this.

ratio = maxThreads / currentBusyThreads;

if (ratio between 0 and 0.33) {
normal timeout
} else if (ratio between 0.33 and 0.66) {
half timeout
} else if (ratio between 0.66 and 1) {
no keepalive (so only one request is processed per connection), 
timeout / 4 (or maybe more)
}

Comments ?


Protection against DOS attack should also have some glues like :

- Max clients from the same IP (ie DOS attack from the same host).

- Max request by minutes or seconds (slow down attackers)
I don't think those work too well except in very specific cases, as 
pointed out by Ilona.

Remy



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


cvs commit: jakarta-tomcat-catalina/catalina/src/conf server.xml

2003-07-28 Thread remm
remm2003/07/28 08:50:37

  Modified:catalina/src/conf server.xml
  Log:
  - Use the same default values as Apache 2.0 for the HTTP/1.1 connector,
as submitted by Henri.
  
  Revision  ChangesPath
  1.19  +3 -5  jakarta-tomcat-catalina/catalina/src/conf/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/server.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- server.xml28 Jul 2003 11:25:44 -  1.18
  +++ server.xml28 Jul 2003 15:50:37 -  1.19
  @@ -90,17 +90,15 @@
   
   !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
   Connector port=8080
  -   maxThreads=100 minSpareThreads=1 maxSpareThreads=10
  +   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false redirectPort=8443 acceptCount=100
  debug=0 connectionTimeout=2 
  disableUploadTimeout=true /
  -!-- Note : To disable connection timeouts, set connectionTimeout value
  - to -1 --
   
   !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 --
   !--
   Connector port=8443 
  -   maxThreads=50 minSpareThreads=1 maxSpareThreads=5
  +   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false disableUploadTimeout=true
  acceptCount=100 debug=0 scheme=https secure=true
 Factory clientAuth=false protocol=TLS /
  @@ -118,7 +116,7 @@
   !-- See proxy documentation for more information about using this. --
   !--
   Connector port=8082 
  -   maxThreads=100 minSpareThreads=1 maxSpareThreads=10
  +   maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false
  acceptCount=100 debug=0 connectionTimeout=2
  proxyPort=80 disableUploadTimeout=true /
  
  
  

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



Re: AW: [5.0] Connector default configuration + connection timeout

2003-07-28 Thread Henri Gomez
Fischer, Ilona a écrit :

Protection against DOS attack should also have some glues like :

- Max clients from the same IP (ie DOS attack from the same host).
How would you distinguish between users coming from big proxy and a
DOS-attack? Our access.logs shows that approx. 30% acesses comes from
t-online (a big ISP in germany) and AOL
That's right (T-ONLINE and AOL) are big hackers ;)

More seriously, in such case there must be the original IP somewhere
in the HTTP header isn't it ?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [5.0] Connector default configuration + connection timeout

2003-07-28 Thread matthias.ernst
On Mon, 28 Jul 2003, Henri Gomez wrote:

 May be you should mimic the defaults settings of Apache 2.0 :

 150 Threads, 25 MinSpare, 75 MaxSpare.


Shouldn't one assume that a servlet container's application is different
from that of a webserver ? I.e. less static files, more computation ? I
always feel tempted to pull the threads down to something like 20. After
all, all I have is 2 CPUs.

Weblogic ships with 35 threads.

Matthias
-- 
Matthias Ernst
Software Engineer

CoreMedia - Smart Content Technology


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



Re: [5.0] Connector default configuration + connection timeout

2003-07-28 Thread Henri Gomez
[EMAIL PROTECTED] a écrit :

On Mon, 28 Jul 2003, Henri Gomez wrote:


May be you should mimic the defaults settings of Apache 2.0 :

150 Threads, 25 MinSpare, 75 MaxSpare.



Shouldn't one assume that a servlet container's application is different
from that of a webserver ? I.e. less static files, more computation ? I
always feel tempted to pull the threads down to something like 20. After
all, all I have is 2 CPUs.
Weblogic ships with 35 threads.


I think Remy want a configuration settings where TC 5.0 is acting as
a real web-server (for example to serve a major OSS web-site ;)


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


AW: AW: [5.0] Connector default configuration + connection timeout

2003-07-28 Thread Fischer, Ilona
IMHO it's the definition of a proxy to send/recive requests instead of
client... that means only the proxy was talking with the webserver - in the
HTTP-header was only the IP of the Proxy

Regards :o)
Ilona


 -Ursprüngliche Nachricht-
 Von: Henri Gomez [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 28. Juli 2003 18:01
 An: Tomcat Developers List
 Betreff: Re: AW: [5.0] Connector default configuration + connection
 timeout
 
 
 Fischer, Ilona a écrit :
 
 Protection against DOS attack should also have some glues like :
 
 - Max clients from the same IP (ie DOS attack from the same host).
  
  How would you distinguish between users coming from big proxy and a
  DOS-attack? Our access.logs shows that approx. 30% acesses 
 comes from
  t-online (a big ISP in germany) and AOL
 
 That's right (T-ONLINE and AOL) are big hackers ;)
 
 More seriously, in such case there must be the original IP somewhere
 in the HTTP header isn't it ?
 
 
 -
 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]



cvs commit: jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager StatusManagerServlet.java

2003-07-28 Thread remm
remm2003/07/28 09:23:07

  Modified:webapps/manager/WEB-INF/classes/org/apache/catalina/manager
StatusManagerServlet.java
  Log:
  - Add missing whitespace between method and URI.
  
  Revision  ChangesPath
  1.6   +5 -5  
jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java
  
  Index: StatusManagerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StatusManagerServlet.java 28 Jul 2003 14:57:47 -  1.5
  +++ StatusManagerServlet.java 28 Jul 2003 16:23:07 -  1.6
  @@ -513,7 +513,7 @@
   writer.write(td nowrap);
   writer.write( + filter(mBeanServer.getAttribute
(pName, method).toString()));
  -writer.write( + filter(mBeanServer.getAttribute
  +writer.write(  + filter(mBeanServer.getAttribute
(pName, currentUri).toString()));
   String queryString = (String) mBeanServer.getAttribute
   (pName, currentQueryString);
  
  
  

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



DO NOT REPLY [Bug 18485] - Jasper tries to write something directly to $CATALINA_HOME

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18485.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18485

Jasper tries to write something directly to $CATALINA_HOME

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]
 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2003-07-28 16:46 ---
And what do you call this ?
Exception compiling Error creating temporary file
[ ... ]
java.io.FileNotFoundException: /usr/share/tomcat4/files1128311153

[ taken from the posted trace ]

Looks like writing stuff in TOMCAT_HOME all right to me

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



Re: [5.0] Connector default configuration + connection timeout

2003-07-28 Thread Remy Maucherat
Henri Gomez wrote:
[EMAIL PROTECTED] a écrit :

On Mon, 28 Jul 2003, Henri Gomez wrote:
May be you should mimic the defaults settings of Apache 2.0 :

150 Threads, 25 MinSpare, 75 MaxSpare.
Shouldn't one assume that a servlet container's application is different
from that of a webserver ? I.e. less static files, more computation ? I
always feel tempted to pull the threads down to something like 20. After
all, all I have is 2 CPUs.
Weblogic ships with 35 threads.
I think Remy want a configuration settings where TC 5.0 is acting as
a real web-server (for example to serve a major OSS web-site ;)
Not quite :) For that kind of use, I think more processors are needed. 
We only need a balanced and decent default configuration (and I'll 
implement my timeout and keepalive tweaks, since I think this is 
important for a threaded web server like Tomcat).

Remy

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


cvs commit: jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager Constants.java StatusManagerServlet.java

2003-07-28 Thread remm
remm2003/07/28 10:28:44

  Modified:webapps/manager/WEB-INF/classes/org/apache/catalina/manager
Constants.java StatusManagerServlet.java
  Log:
  - Tweak stylesheet and tags used.
  
  Revision  ChangesPath
  1.3   +44 -4 
jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java
  
  Index: Constants.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/Constants.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Constants.java28 Jul 2003 14:57:47 -  1.2
  +++ Constants.java28 Jul 2003 17:28:43 -  1.3
  @@ -73,7 +73,33 @@
   html\n +
   head\n +
   style\n +
  -  table { width: 100%; }\n +
  +  P {\n +
  +font-family:verdana,sans-serif;\n +
  +background: white;\n +
  +color: black;\n +
  +font-size: 12px;\n +
  +  }\n +
  +  H1 {\n +
  +font-family:verdana,sans-serif;\n +
  +font-weight: bold;\n +
  +font-size: 20px;\n +
  +color: black;\n +
  +  }\n +
  +  H2 {\n +
  +font-family:verdana,sans-serif;\n +
  +font-weight: bold;\n +
  +font-size: 14px;\n +
  +color: black;\n +
  +  }\n +
  +  H3 {\n +
  +font-family:verdana,sans-serif;\n +
  +font-weight: bold;\n +
  +font-size: 12px;\n +
  +color: black;\n +
  +  }\n +
  +  table {\n +
  +width: 100%;\n +
  +  }\n +
 td.page-title {\n +
   text-align: center;\n +
   vertical-align: top;\n +
  @@ -120,6 +146,20 @@
 }\n +
 td.row-right {\n +
   text-align: right;\n +
  +vertical-align: middle;\n +
  +font-family:verdana,sans-serif;\n +
  +color: black;\n +
  +background: white;\n +
  +  }\n +
  +  TH {\n +
  +text-align: center;\n +
  +vertical-align: top;\n +
  +font-family:verdana,sans-serif;\n +
  +font-weight: bold;\n +
  +background: #FFDC75;\n +
  +  }\n +
  +  TD {\n +
  +text-align: center;\n +
   vertical-align: middle;\n +
   font-family:verdana,sans-serif;\n +
   color: black;\n +
  
  
  
  1.7   +12 -19
jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java
  
  Index: StatusManagerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/StatusManagerServlet.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StatusManagerServlet.java 28 Jul 2003 16:23:07 -  1.6
  +++ StatusManagerServlet.java 28 Jul 2003 17:28:43 -  1.7
  @@ -352,16 +352,15 @@
   throws Exception {
   
   writer.print(h1JVM/h1);
  -writer.print(br/);
   
  +writer.print(p);
   writer.print( Free memory: );
   writer.print(Runtime.getRuntime().freeMemory());
   writer.print( Total memory: );
   writer.print(Runtime.getRuntime().totalMemory());
   writer.print( Max memory: );
   writer.print(JdkCompat.getJdkCompat().getMaxMemory());
  -
  -writer.print(br/);
  +writer.print(/p);
   
   }
   
  @@ -377,8 +376,7 @@
   writer.print(name);
   writer.print(/h1);
   
  -writer.print(br/);
  -
  +writer.print(p);
   writer.print( Max threads: );
   writer.print(mBeanServer.getAttribute(tpName, maxThreads));
   writer.print( Min spare threads: );
  @@ -418,8 +416,7 @@
   writer.print(mBeanServer.getAttribute(grpName, bytesReceived));
   writer.print( Bytes sent: );
   writer.print(mBeanServer.getAttribute(grpName, bytesSent));
  -
  -writer.print(br/);
  +writer.print(/p);
   
   writer.print(table border=\0\trthStage/ththTime/ththB 
Sent/ththB Recv/ththClient/ththVHost/ththRequest/th/tr);
   
  @@ -579,14 +576,12 @@
   writer.print(name);
   writer.print(/h1);
   
  -writer.print(br/);
  -
  +writer.print(p);
   writer.print( Startup time: );
   writer.print(mBeanServer.getAttribute(objectName, startupTime));
   writer.print( TLD scan time: );
   writer.print(mBeanServer.getAttribute(objectName, tldScanTime));
  -
  -writer.print(br/);
  +writer.print(/p);
   
   String onStr = *:j2eeType=Servlet,WebModule= + 

DO NOT REPLY [Bug 21939] New: - Coyote JK 2 outputs request parameters

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21939.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21939

Coyote JK 2 outputs request parameters

   Summary: Coyote JK 2 outputs request parameters
   Product: Tomcat 4
   Version: 4.1.24
  Platform: All
OS/Version: All
Status: NEW
  Severity: Minor
  Priority: Other
 Component: Connector:Coyote JK 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The Coyote JK 2 connector is dumping all request parameters to the console when 
a request goes through it. It dumps them in a hex mode, but they are still 
there. It is important to be able to turn this off, especially when the user of 
a web application enters a password on a form field.

I did some initial debugging and found the problem in org.apache.jk.common.
MsgAjp in the dump(String) method. On line 345 a call to System.out.println is 
being made to output the reqest parameters. A possible correction would be to 
make this a call to log.debug() or log.trace() so that it would use the logging 
configuration instead of outputting this all the time.

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



Tomcat Listener and file sockets

2003-07-28 Thread NAIK,ROSHAN (HP-Cupertino,ex1)

I have tried asking for this before (in vain)..but anyway ...

Can Tomcat listen (for AJP13 requests) on a file socket (AF_UNIX)
instead of the regular AF_INET socket ?

mod_jk2 allows configuration to specify the socket file. 
However no documentation (or anything in the Tomcat source code)
seems to support such configuration.

I hope that atleast somebody (whoever implemented AF_UNIX in mod_jk2)
must have tried out atleast once to get mod_jk2 talking to Tomcat via
AF_UNIX sockets.

Also there is a bug report #19917 on someone complaining about this not
working
in Tomcat 4.1.24. Woder if he had it working on an earlier version of
Tomcat.

No docs on mod_jk2 side or Tomcat side talk about the Tomcat side
configuration
required. Looking some Java/Tomcat source code it didnt seem like there is
support
for AF_UNIX sockets in Java.

I am using tomcat 4.
-- Roshan 

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



cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Compiler.java PageInfo.java ParserController.java

2003-07-28 Thread luehe
luehe   2003/07/28 11:47:30

  Modified:jasper2/src/share/org/apache/jasper/compiler Compiler.java
PageInfo.java ParserController.java
  Log:
  Fixed Bugzilla 21823 (Compiler uses invoking page's PageInfo for
  handling tag files)
  Patch provided by [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.66  +0 -4  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- Compiler.java 26 Apr 2003 01:15:25 -  1.65
  +++ Compiler.java 28 Jul 2003 18:47:30 -  1.66
  @@ -212,13 +212,9 @@
// If the current uri is matched by a pattern specified in
// a jsp-property-group in web.xml, initialize pageInfo with
// those properties.
  - if (jspProperty.isXml() != null) {
  - pageInfo.setIsXmlConfigSpecified(true);
  - }
if (jspProperty.isELIgnored() != null) {
pageInfo.setELIgnoredSpecified(true);
}
  - pageInfo.setIsXmlConfig(JspUtil.booleanValue(jspProperty.isXml()));
pageInfo.setELIgnored(JspUtil.booleanValue(jspProperty.isELIgnored()));

pageInfo.setScriptingInvalid(JspUtil.booleanValue(jspProperty.isScriptingInvalid()));
if (jspProperty.getIncludePrelude() != null) {
  
  
  
  1.34  +3 -25 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/PageInfo.java
  
  Index: PageInfo.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/PageInfo.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- PageInfo.java 23 Jul 2003 20:37:24 -  1.33
  +++ PageInfo.java 28 Jul 2003 18:47:30 -  1.34
  @@ -107,12 +107,6 @@
   private boolean elIgnoredSpecified = false;
   private String omitXmlDecl = null;
   
  -// true if there is an is-xml element in the jsp-config
  -private boolean isXmlConfigSpecified = false;
  -
  -// The value of the is-xml element in the jsp-config
  -private boolean isXmlConfig = false;
  -
   // A custom tag is a tag file
   private boolean hasTagFile = false;
   
  @@ -211,22 +205,6 @@
   
   public boolean isELIgnoredSpecified() {
return elIgnoredSpecified;
  -}
  -
  -public boolean isXmlConfig() {
  - return isXmlConfig;
  -}
  -
  -public void setIsXmlConfig(boolean xml) {
  - isXmlConfig = xml;
  -}
  -
  -public boolean isXmlConfigSpecified() {
  - return isXmlConfigSpecified;
  -}
  -
  -public void setIsXmlConfigSpecified(boolean xmlSpecified) {
  - isXmlConfigSpecified = xmlSpecified;
   }
   
   public List getIncludePrelude() {
  
  
  
  1.43  +6 -13 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- ParserController.java 21 May 2003 18:09:33 -  1.42
  +++ ParserController.java 28 Jul 2003 18:47:30 -  1.43
  @@ -82,7 +82,6 @@
   
   private JspCompilationContext ctxt;
   private Compiler compiler;
  -private PageInfo pageInfo;
   private ErrorDispatcher err;
   
   /*
  @@ -114,7 +113,6 @@
   public ParserController(JspCompilationContext ctxt, Compiler compiler) {
   this.ctxt = ctxt; 
this.compiler = compiler;
  - this.pageInfo = compiler.getPageInfo();
this.err = compiler.getErrorDispatcher();
   }
   
  @@ -299,13 +297,6 @@
* Determines the syntax (standard or XML) and page encoding properties
* for the given file, and stores them in the 'isXml' and 'sourceEnc'
* instance variables, respectively.
  - *
  - * The properties may already be specified in a JSP property group: Notice
  - * that while the 'isXml' property applies to an entire translation unit
  - * (and therefore needs to be checked only for the top-level file), the
  - * 'page-encoding' property must be checked separately for the top-level
  - * and each of its included files, unless they're in XML syntax (in which
  - * case the page encoding is determined according to the XML spec).
*/
   private void determineSyntaxAndEncoding(String absFileName,
JarFile jarFile,
  @@ -327,10 +318,12 @@
 */
boolean revert = false;
   
  - 

DO NOT REPLY [Bug 21823] - Compiler uses invoking page's PageInfo for handling tag files

2003-07-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21823.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21823

Compiler uses invoking page's PageInfo for handling tag files

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

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



Re: [5.0] Connector default configuration + connection timeout

2003-07-28 Thread Bill Barker

- Original Message -
From: Remy Maucherat [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Monday, July 28, 2003 8:16 AM
Subject: [5.0] Connector default configuration + connection timeout


 Hi,

 What would be the best connector default configuration ?

 I switched HTTP/1.1 to be:
 maxThreads: 100
 minSpare: 1
 maxSpare: 10
 That should be ok for a small/medium site, and bad for a large site. It
 should be decent for benchmarking if there's a warmup period. Should the
 default config be large site compliant ?

Jk-Coyote should probably match the Apache2 defaults, since with the
pre-fork MPM, connections are 1-1 with Apache2 children.


 Also, in order to conserve processors for useful tasks when the load
 increases (and also twart DoS attacks), I was thinking about introducing
   dynamic scaling for the HTTP connection timeout for keepalive.
 The formula would be something like this.

 ratio = maxThreads / currentBusyThreads;

 if (ratio between 0 and 0.33) {
  normal timeout
 } else if (ratio between 0.33 and 0.66) {
  half timeout
 } else if (ratio between 0.66 and 1) {
  no keepalive (so only one request is processed per connection),
 timeout / 4 (or maybe more)
 }


No keepalive sounds like a bad idea:  You are going to free-up connections
much faster if you get the image files out the pipe then if the browser is
immediately turning around and re-establishing a connection.  It might also
be a good idea if there was an option to disable this, for the few cases
where you care more about the the connected user's experience then the
new-connection speed (Applet classloading comes to mind).

 Comments ?

 Remy



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


This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication in 
error, please notify us immediately by e-mail and then delete all copies of this 
message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through the 
Internet is not secure. Do not send confidential or sensitive information, such as 
social security numbers, account numbers, personal identification numbers and 
passwords, to us via ordinary (unencrypted) e-mail.

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

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup TldConfig.java

2003-07-28 Thread luehe
luehe   2003/07/28 15:57:41

  Modified:catalina/src/share/org/apache/catalina/startup
TldConfig.java
  Log:
  removed tabs
  
  Revision  ChangesPath
  1.14  +75 -80
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TldConfig.java25 Jul 2003 22:39:57 -  1.13
  +++ TldConfig.java28 Jul 2003 22:57:41 -  1.14
  @@ -205,13 +205,13 @@
   }
   
   /*
  -  * Acquire the list of TLD resource paths, possibly embedded in JAR
  -  * files, to be processed
  -  */
  + * Acquire the list of TLD resource paths, possibly embedded in JAR
  + * files, to be processed
  + */
   Set resourcePaths = tldScanResourcePaths();
  - Set globalJarPaths = getGlobalJarPaths();
  +Set globalJarPaths = getGlobalJarPaths();
   
  - // Check to see if we can use cached listeners
  +// Check to see if we can use cached listeners
   if (tldCache != null  tldCache.exists()) {
   long lastModified = getLastModified(resourcePaths, globalJarPaths);
   if (lastModified  tldCache.lastModified()) {
  @@ -275,35 +275,35 @@
   private long getLastModified(Set resourcePaths, Set globalJarPaths)
   throws Exception {
   
  - long lastModified = 0;
  +long lastModified = 0;
   
  - Iterator paths = resourcePaths.iterator();
  - while (paths.hasNext()) {
  - String path = (String) paths.next();
  - URL url = context.getServletContext().getResource(path);
  - if (url == null) {
  - log.debug( Null url + path );
  - break;
  - }
  - long lastM = url.openConnection().getLastModified();
  - if (lastM  lastModified) lastModified = lastM;
  - if (log.isDebugEnabled()) {
  - log.debug( Last modified  + path +   + lastM);
  - }
  - }
  -
  - paths = globalJarPaths.iterator();
  - while (paths.hasNext()) {
  - File jarFile = (File) paths.next();
  - long lastM = jarFile.lastModified();
  - if (lastM  lastModified) lastModified = lastM;
  - if (log.isDebugEnabled()) {
  - log.debug(Last modified  + jarFile.getAbsolutePath()
  -   +   + lastM);
  - }
  - }
  +Iterator paths = resourcePaths.iterator();
  +while (paths.hasNext()) {
  +String path = (String) paths.next();
  +URL url = context.getServletContext().getResource(path);
  +if (url == null) {
  +log.debug( Null url + path );
  +break;
  +}
  +long lastM = url.openConnection().getLastModified();
  +if (lastM  lastModified) lastModified = lastM;
  +if (log.isDebugEnabled()) {
  +log.debug( Last modified  + path +   + lastM);
  +}
  +}
   
  - return lastModified;
  +paths = globalJarPaths.iterator();
  +while (paths.hasNext()) {
  +File jarFile = (File) paths.next();
  +long lastM = jarFile.lastModified();
  +if (lastM  lastModified) lastModified = lastM;
  +if (log.isDebugEnabled()) {
  +log.debug(Last modified  + jarFile.getAbsolutePath()
  +  +   + lastM);
  +}
  +}
  +
  +return lastModified;
   }
   
   private void processCache(File tldCache ) throws IOException {
  @@ -322,6 +322,7 @@
   ex.printStackTrace();
   }
   }
  +
   /**
* Create (if necessary) and return a Digester configured to process a tag
* library descriptor, looking for additional listener classes to be
  @@ -379,7 +380,6 @@
   }
   return digester;
   }
  -
   
   /**
* Utilities used to force the parser to use local schema, when available,
  @@ -420,8 +420,6 @@
   return entityResolver;
   }
   
  -
  -
   /**
* Scan the JAR file at the specified resource path for TLDs in the
* codeMETA-INF/code subdirectory, and scan each TLD for application
  @@ -437,12 +435,12 @@
   log.debug( Scanning JAR at resource path ' + resourcePath + ');
   }
   
  - URL url = context.getServletContext().getResource(resourcePath);
  +URL url = context.getServletContext().getResource(resourcePath);
   if (url == null) {
  - throw new IllegalArgumentException
  - (sm.getString(contextConfig.tldResourcePath,
  -   resourcePath));
  - 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ContainerBase.java StandardContext.java StandardWrapper.java

2003-07-28 Thread amyroh
amyroh  2003/07/28 17:09:43

  Modified:catalina/src/share/org/apache/catalina/core
ContainerBase.java StandardContext.java
StandardWrapper.java
  Log:
  Send JSR77 spec required notifications for J2EE mbeans.
  
  Revision  ChangesPath
  1.26  +3 -1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java
  
  Index: ContainerBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ContainerBase.java26 May 2003 22:03:59 -  1.25
  +++ ContainerBase.java29 Jul 2003 00:09:42 -  1.26
  @@ -1461,7 +1461,9 @@
   }
   
   public String getObjectName() {
  -return oname.toString();
  +if (oname != null) {
  +return oname.toString();
  +} else return null;
   }
   
   public String getDomain() {
  
  
  
  1.75  +70 -11
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- StandardContext.java  22 Jul 2003 21:01:26 -  1.74
  +++ StandardContext.java  29 Jul 2003 00:09:42 -  1.75
  @@ -85,11 +85,13 @@
   import javax.servlet.ServletRequestListener;
   import javax.naming.NamingException;
   import javax.naming.directory.DirContext;
  -import javax.management.ObjectName;
  -import javax.management.MBeanServer;
  -import javax.management.MalformedObjectNameException;
   import javax.management.InstanceNotFoundException;
  +import javax.management.MalformedObjectNameException;
   import javax.management.MBeanRegistrationException;
  +import javax.management.MBeanServer;
  +import javax.management.Notification;
  +import javax.management.NotificationBroadcasterSupport;
  +import javax.management.ObjectName;
   import org.apache.naming.ContextBindings;
   import org.apache.naming.resources.BaseDirContext;
   import org.apache.naming.resources.FileDirContext;
  @@ -155,6 +157,7 @@
   super();
   pipeline.setBasic(new StandardContextValve());
   namingResources.setContainer(this);
  +broadcaster = new NotificationBroadcasterSupport();
   
   }
   
  @@ -199,8 +202,12 @@
* The application available flag for this Context.
*/
   private boolean available = false;
  -
  -
  +
  +/**
  + * The broadcaster that sends j2ee notifications. 
  + */
  +private NotificationBroadcasterSupport broadcaster = null;
  +
   /**
* The Locale to character set mapper for this application.
*/
  @@ -441,7 +448,11 @@
*/
   private int sessionTimeout = 30;
   
  -
  +/**
  + * The notification sequence number.
  + */
  +private long sequenceNumber = 0;
  +
   /**
* The status code error pages for this web application, keyed by
* HTTP status code (as an Integer).
  @@ -640,8 +651,7 @@
  new Boolean(this.available));
   
   }
  -
  -
  +
   /**
* Return the Locale to character set mapper for this Context.
*/
  @@ -4118,6 +4128,15 @@
   lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null);
   startTime=System.currentTimeMillis();
   
  +
  +// Send j2ee.state.running notification 
  +if (this.getObjectName() != null) {
  +Notification notification = 
  +new Notification(j2ee.state.running, this.getObjectName(), 
  +sequenceNumber++);
  +broadcaster.sendNotification(notification);
  +}
  +
   // Close all JARs right away to avoid always opening a peak number 
   // of files on startup
   if (getLoader() instanceof WebappLoader) {
  @@ -4198,7 +4217,15 @@
   
   // Notify our interested LifecycleListeners
   lifecycle.fireLifecycleEvent(BEFORE_STOP_EVENT, null);
  -
  +
  +// Send j2ee.state.stoping notification 
  +if (this.getObjectName() != null) {
  +Notification notification = 
  +new Notification(j2ee.state.stoping, this.getObjectName(), 
  +sequenceNumber++);
  +broadcaster.sendNotification(notification);
  +}
  +
   // Mark this application as unavailable while we shut down
   setAvailable(false);
   
  @@ -4262,6 +4289,14 @@
   
   }
   
  +// Send