[Tomcat Wiki] Update of "FAQ/Clustering" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Clustering

The comment on the change is:
Add question list to start.

--
  This page discusses cluster- and clustering-related questions. Please make 
sure to read the Clustering HowTo page in the main Tomcat documentation bundle 
as well.
  
  == Questions ==
+  1. [#Q1 Can I configure a cluster at the Engine level?]
+  1. [#Q2 Show me a simple cluster configuration example.]
+  1. [#Q3 How do I turn on transport logging?]
+  1. [#Q4 How do I use JMX to monitor the cluster?]
+  1. [#Q5 Can I pause the message sending?]
+  1. [#Q6 Can I add more senders (pooled mode)?]
+  1. [#Q7 What happens when I pull the network cable?]
+  1. [#Q8 On my windows laptop without network my cluster doesn't work.]
+  1. [#Q9 The cluster dosen't work under linux with two nodes on two boxes.]
+  1. [#Q10 I get "localhost" rather than "eth0" or another interface when 
using tcpListenAddress="auto".]
+ 
+ == Answers ==
- '''Can I configure a cluster at the Engine level?'''
+ [[Anchor(Q1)]]'''Can I configure a cluster at the Engine level?'''
  
  Yes, beginning with Tomcat 5.5.10 you can configure clusters at both the 
Engine and Host levels. This helps support clustering for web hosting companies.
  
  
- '''Show me a simple cluster configuration example.'''
+ [[Anchor(Q2)]]'''Show me a simple cluster configuration example.'''
  
  For Tomcat 5.5.10 and later:
  {{{
  
  }}}
  
- '''How do I turn on transport logging?'''
+ [[Anchor(Q3)]]'''How do I turn on transport logging?'''
  
  * Use "org.apache.catalina.cluster" as logger category and switch to info, 
debug or trace as log level.
  * Configure the clusterLog attribute (logging category) to get and send and 
receive message log.
  
  
- '''How do I use JMX to monitor the cluster?'''
+ [[Anchor(Q4)]]'''How do I use JMX to monitor the cluster?'''
  
  With Java 5 you can use the jconsole application to look inside the runnnig 
cluster: please see the JMX configuration section in the Clustering HowTo 
document.
  In fastasyncmode replication mode you can got more information with sender 
attributes doProcessingStats="true" and queueDoStats="true". Finally, with the 
new JMX remote ant task you can access the state and call operations.
  
- '''Can I pause the message sending?'''
+ [[Anchor(Q5)]]'''Can I pause the message sending?'''
  
  Yes, the async senders buffer the messages, but make sure the membership ping 
is active. With fastasyncqueue mode you can limit the max queue size.
  
- '''Can I add more senders (pooled mode)?'''
+ [[Anchor(Q6)]]'''Can I add more senders (pooled mode)?'''
  
  Yes, with sender attribute maxPoolSocketLimit="40" you can have more than the 
default 25 sockets to transfer more parallel messages.
  
- '''What happens when I pull the network cable?'''
+ [[Anchor(Q7)]]'''What happens when I pull the network cable?'''
  
  The other members will remove the instance from the cluster, but when you 
insert the cable again, the Tomcat instance might have completely flipped out. 
This is because the OS might start using 100% of the CPU when a multicast 
message is sent. There has not yet been a good solution for this, I will let 
you know when I have come up with one. (pero: I test this and I works correct 
with java 5 and exists when you use the cluster with JDK 1.4.x)
  
- '''At my windows laptop without network my cluster doesn't work?'''
+ [[Anchor(Q8)]]'''On my windows laptop without network my cluster doesn't 
work.'''
  
  The Membership attribute mcastBindAddress="127.0.0.1" must be set!
  
- '''The cluster dosen't work under linux with two nodes at two boxes?'''
+ [[Anchor(Q9)]]'''The cluster dosen't work under linux with two nodes on two 
boxes.'''
  
  Check the the following:
  * Is your network interface enabled for multicast? ifconfig eth0 MULTICAST
  * Exists a multicast route to your network interface? route add -host 
228.0.0.4 dev eth0
  * Is your firewall active? Then check that multicast port is on your UDP open 
list and the receiver TCP port is also for both machines open!
  
- '''I get "localhost" rather than "eth0" or another interface when using 
tcpListenAddress="auto".'''
+ [[Anchor(Q10)]]'''I get "localhost" rather than "eth0" or another interface 
when using tcpListenAddress="auto".'''
  
  Change /etc/hosts so that the localhost domain resolves to the actual IP 
address of the NIC, eth0. Please see Bugzilla for more. 
  

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



[Tomcat Wiki] Update of "FAQ/Connectors" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Connectors

The comment on the change is:
Add anchors - ran out of time for list of questions on this page.

--
  
  '''Please note, jk2 is no longer supported. Please use mod_jk instead.'''
  == Questions ==
+ 
- '''What is JK (or AJP)?'''
+ [[Anchor(Q1)]]'''What is JK (or AJP)?'''
  
  AJP is a wire protocol. It an optimized version of the HTTP protocol to allow 
a standalone web server such as Apache talk to Tomcat. Historically, Apache has 
always been much faster than Tomcat at serving static content. The idea is to 
let Apache serve the static content when possible, then proxy the request back 
to Tomcat for Tomcat related content. 
  
- '''Which connector: mod_jserv, JK, JK2, mod_webapp or mod_proxy?'''
+ [[Anchor(Q2)]]'''Which connector: mod_jserv, JK, JK2, mod_webapp or 
mod_proxy?'''
  
   * Stay away from mod_webapp, aka warp. It is deprecated and unsupported due 
to lack of developer interest and there are better options such as jk and jk2. 
It WILL NOT run on windows.
   * mod_jserv is unsupported and will not be supported in Tomcat 5. mod_jserv 
was the original connector which supported the ajp protocol.
@@ -20, +21 @@

   * mod_proxy. A cheap way to proxy without the hassles of configuring JK. 
This solution lacks sticky session load balancing. If you don't need some of 
the features of jk - this is a very simple alternative.
   * mod_proxy_ajp. With apache 2.2, mod_proxy was rewritten to support load 
balancing as well as a new transport called mod_proxy_ajp. This module is 
distributed with the Apache http server, not the Tomcat server.
  
- '''Why should I integrate Apache with Tomcat? (or not)'''
+ [[Anchor(Q3)]]'''Why should I integrate Apache with Tomcat? (or not)'''
  
  There are many reasons to integrate Tomcat with Apache. And there are reasons 
why it should not be done too. Needless to say, everyone will disagree with the 
opinions here. With the performance of Tomcat 5 and 6, performance reasons 
become harder to justify. So here are the issues to discuss in integrating vs 
not.
  
@@ -32, +33 @@

   * Speed. Apache is faster at serving static content than Tomcat. But unless 
you have a high traffic site, this point is useless. But in some scenarios, 
tomcat can be faster than apache. So benchmark YOUR site.
   * Socket handling/system stability. Apache has better socket handling with 
respect to error conditions than Tomcat. The main reason is Tomcat must perform 
all its socket handling via the JVM which needs to be cross platform. The 
problem is socket optimization is a platform specific ordeal. Most of the time 
the java code is fine, but when you are also bombarded with dropped 
connections, invalid packets, invalid requests from invalid IP's, Apache does a 
better job at dropping these error conditions than JVM based program. (YMMV)
  
- '''At boot, is order of start up (Apache vs Tomcat) important?'''
+ [[Anchor(Q4)]]'''At boot, is order of start up (Apache vs Tomcat) 
important?'''
  
  No. This way - either apache or tomcat can be restarted at any time 
independent of one another.
  
- '''Is there any way to control the content of automatically generated 
mod_jk.conf-auto? I need my own specific commands added to it.'''
+ [[Anchor(Q5)]]'''Is there any way to control the content of automatically 
generated mod_jk.conf-auto? I need my own specific commands added to it.'''
  
  There really is no need to. Just copy the automatically generated 
mod_jk.conf-auto and edit it manually to your preference. None of production 
tomcat installations really use mod_jk.conf-auto as it is. 
  
- '''How do I bind to a specific ip address?'''
+ [[Anchor(Q6)]]'''How do I bind to a specific ip address?'''
  
  Each Connector element allows an address property. For example:
  
@@ -53, +54 @@

  
  For a more complete description of the Connector config, see the 
[http://tomcat.apache.org/tomcat-5.0-doc/config/http.html HTTP Connector docs] 
or the see the [http://tomcat.apache.org/tomcat-5.0-doc/config/http.html AJP 
Connector docs].
  
- '''Where can I download a binary distribution of my connector?'''
+ [[Anchor(Q7)]]'''Where can I download a binary distribution of my 
connector?'''
  
  You can't: you need to download the source and compile it for your platform. 
The source distributions are available from the 
[http://tomcat.apache.org/download-connectors.cgi standard location]. Note that 
JPackage.org has RPM distributions for the connectors as well as tomcat itself: 
[http://www.jpackage.org/ JPackage.org]
  
- '''I'm having strange UTF-8 issues with my request parameters.'''
+ [[Anchor(Q8)]]'''I'm having strange UTF-8 issues with my request 
parameters.'''
  
- Since tomcat 5 - does your connector have Connector decl

DO NOT REPLY [Bug 44537] New: RequestDispatcher: query params lost for wrapped requests

2008-03-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44537

   Summary: RequestDispatcher: query params lost for wrapped
requests
   Product: Tomcat 5
   Version: 5.5.23
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


SRV 8.1.1:
"The ServletContext and ServletRequest methods that create RequestDispatcher
objects using path information allow the optional attachment of query string
information to the path."

Thus, any query params used to create a RequestDispatcher must be passed on to
the request object.

RequestDispatcher dispatcher = aRequest.getRequestDispatcher("blah.jsp?x=1");
dispatcher.forward(aRequest, aResponse);

If the request is *not wrapped*, then 'x' is indeed visible in 'blah.jsp'.

However, if the request object is *wrapped*, then 'x' is not visible in the
destination page 'blah.jsp', and it should be.


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

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



DO NOT REPLY [Bug 44537] RequestDispatcher: query params lost for wrapped requests

2008-03-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44537


John O'Hanley <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #1 from John O'Hanley <[EMAIL PROTECTED]>  2008-03-05 04:31:53 ---
Saw the same behavior in Tomcat 6.0.10.


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

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



Re: Reorder the http header generated by tomcat

2008-03-05 Thread Jim Jagielski

Why?

On Mar 5, 2008, at 1:07 AM, Hanks Wang (hanwan) wrote:


Hi all,

I'd like to describe my problem clearer:

Currently the http header which generated by Tomcat is something like:

Accept-Ranges: none
Content-Type: text/plain
Server: test123

Can I change it into below order?
Server: test123
Accept-Ranges: none
Content-Type: text/plain

Thanks!
Han

-Original Message-
From: Hanks Wang (hanwan)
Sent: Wednesday, March 05, 2008 10:12 AM
To: Tomcat Developers List
Subject: Reorder the http header generate by tomcat

Hi all,
I edit server.xml as:
...


It will add "server" item in my response header, so now the http  
header

is something like:
Cache-Control: no-store, no-cache, must-revalidate
Accept-Ranges: none
Content-Type: text/plain
Connection: close
Server: test123

The "Server" is put to the last item of the http header.

So my question is : Is there a way to reorder the http header  
instead of

having tomcat formulate them?

Thanks
Hanks


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

2008-03-05 Thread jim
Author: jim
Date: Wed Mar  5 08:05:06 2008
New Revision: 633892

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

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=633892&r1=633891&r2=633892&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Mar  5 08:05:06 2008
@@ -22,6 +22,13 @@
  =
 
 
+RELEASE SHOWSTOPPERS:
+
+
+PATCHES ACCEPTED TO BACKPORT:
+  [ start all new proposals below, under PATCHES PROPOSED. ]
+
+
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
 
@@ -53,7 +60,7 @@
 
 * Mark method that adds a JSSE dependency to the SSL abstraction as deprecated
   http://people.apache.org/~markt/patches/2008-02-21-SSL-JSSE.patch
-  +1: markt, fhanik
+  +1: markt, fhanik, jim
   -1:
 
 * Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=44282
@@ -69,7 +76,7 @@
 
 * lib is relative to catalina home, not base
   http://svn.apache.org/viewvc?rev=627602&view=rev
-  +1: markt, fhanik
+  +1: markt, fhanik, jim
   -1: 
 
 * Fix NPE when iterating through sessions for expiration
@@ -80,12 +87,12 @@
 * Allow old style cookie values to work(auto switch to v1) (regression)
   http://svn.apache.org/viewvc?view=rev&revision=627743 (ServerCookie.java)
   http://svn.apache.org/viewvc?view=rev&revision=630533 (use the same variable 
name for all servlet compliance flags)
-  +1: fhanik, markt
+  +1: fhanik, markt, jim
   -1: 
   
 * Fix ArrayIndexOutOfBoundsException when empty URL is requested
   http://svn.apache.org/viewvc?rev=627883&view=rev
-  +1: markt
+  +1: markt, jim
   +1: fhanik - although, I just don't see how this would ever happen, the 
smallest URI is "/"
   -1:
 
@@ -93,7 +100,7 @@
   http://svn.apache.org/viewvc?view=rev&revision=602114
   http://svn.apache.org/viewvc?view=rev&revision=601795
   +1: jfclere, fhanik
-  +0: markt - should really be added to the docs as well
+  +0: markt, jim - should really be added to the docs as well
   -1:
 
 * Add tests for the cookie parsing and use package 
org.apache.catalina.tomcat.util.http
@@ -104,7 +111,7 @@
 * Point to Wiki for latest status and remove very out of date status page from
   docs
   http://svn.apache.org/viewvc?rev=630006&view=rev
-  +1: markt, fhanik
+  +1: markt, fhanik, jim
   -1:
 
 * Update docs. Correct version number, paths and use of $CATALINA_HOME vs.



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



Re: Reorder the http header generated by tomcat

2008-03-05 Thread George Sexton



Jim Jagielski wrote:

Why?


Evidently because he doesn't understand how to write a sort routine that 
will put them in the order he would like...


So, he wants you to do it for him.

I can sort of understand the desire. I had to write an iCal parser, and 
it turns out that it's a lot easier to do if the order of the fields is 
somewhat deterministic. Still, it's no excuse for not handling it in his 
own code if his code has a dependency on the order.




On Mar 5, 2008, at 1:07 AM, Hanks Wang (hanwan) wrote:


Hi all,

I'd like to describe my problem clearer:

Currently the http header which generated by Tomcat is something like:

Accept-Ranges: none
Content-Type: text/plain
Server: test123

Can I change it into below order?
Server: test123
Accept-Ranges: none
Content-Type: text/plain

Thanks!
Han

-Original Message-
From: Hanks Wang (hanwan)
Sent: Wednesday, March 05, 2008 10:12 AM
To: Tomcat Developers List
Subject: Reorder the http header generate by tomcat

Hi all,
I edit server.xml as:
...


It will add "server" item in my response header, so now the http header
is something like:
Cache-Control: no-store, no-cache, must-revalidate
Accept-Ranges: none
Content-Type: text/plain
Connection: close
Server: test123

The "Server" is put to the last item of the http header.

So my question is : Is there a way to reorder the http header instead of
having tomcat formulate them?

Thanks
Hanks


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



--
George Sexton
MH Software, Inc.
Voice: +1 303 438 9585
URL:   http://www.mhsoftware.com/

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



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

2008-03-05 Thread jim
Author: jim
Date: Wed Mar  5 08:07:38 2008
New Revision: 633894

URL: http://svn.apache.org/viewvc?rev=633894&view=rev
Log:
Promote backports with >=3 +1s

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=633894&r1=633893&r2=633894&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Mar  5 08:07:38 2008
@@ -28,27 +28,6 @@
 PATCHES ACCEPTED TO BACKPORT:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-
-PATCHES PROPOSED TO BACKPORT:
-  [ New proposals should be added at the end of the list ]
-
-
-* Add ManagerBase session getLastAccessedTimestamp and getCreationTimestamp 
for better
-  remote JMX access.
-  http://svn.apache.org/viewvc?rev=612971&view=rev
-  +1: pero, rjung, fhanik, markt
-  -1: remm: I believe it would need specific support for certain managers. 
Interested users
-could use their own extended manager instead.
-
-* Remove old TLS code
-  http://svn.apache.org/viewvc?rev=616894&view=rev
-  +1: markt, fhanik
-  +0: remm: I don't see the point of backporting these API changing cleanups
-(markt) This is not an API change. It is just removing the TLS code
-that has never been included in a 6.0.x src or bin release
-   It's my fault for not building it in then. I'm not sure this is 
intentional,
-   but I am ok with the change.
-
 * Modify NIo connector to use JSSE SSL implementation directly
   http://svn.apache.org/viewvc?rev=616896&view=rev
   +1: markt, fhanik
@@ -63,13 +42,6 @@
   +1: markt, fhanik, jim
   -1:
 
-* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=44282
-  Do call to getClassLoader() in a privileged block.
-  http://svn.apache.org/viewvc?rev=616953&view=rev
-  +1: markt, fhanik
-  +0: remm: do we really want to fix these sort of "bugs" ?
-  -1:
-
 * ExtendedAccessLogValve cs-uri not print empty querystring
   http://svn.apache.org/viewvc?rev=620778&view=rev
   +1: pero,funkman,markt
@@ -96,13 +68,6 @@
   +1: fhanik - although, I just don't see how this would ever happen, the 
smallest URI is "/"
   -1:
 
-* Allow to specify the random device to use. (/dev/urandom is faster).
-  http://svn.apache.org/viewvc?view=rev&revision=602114
-  http://svn.apache.org/viewvc?view=rev&revision=601795
-  +1: jfclere, fhanik
-  +0: markt, jim - should really be added to the docs as well
-  -1:
-
 * Add tests for the cookie parsing and use package 
org.apache.catalina.tomcat.util.http
   http://people.apache.org/~jfclere/patches/test_cookies.patch2
   +1: jfclere, fhanik, markt
@@ -120,6 +85,40 @@
   +1: markt, fhanik, jfclere
   -1:
   
+PATCHES PROPOSED TO BACKPORT:
+  [ New proposals should be added at the end of the list ]
+
+
+* Add ManagerBase session getLastAccessedTimestamp and getCreationTimestamp 
for better
+  remote JMX access.
+  http://svn.apache.org/viewvc?rev=612971&view=rev
+  +1: pero, rjung, fhanik, markt
+  -1: remm: I believe it would need specific support for certain managers. 
Interested users
+could use their own extended manager instead.
+
+* Remove old TLS code
+  http://svn.apache.org/viewvc?rev=616894&view=rev
+  +1: markt, fhanik
+  +0: remm: I don't see the point of backporting these API changing cleanups
+(markt) This is not an API change. It is just removing the TLS code
+that has never been included in a 6.0.x src or bin release
+   It's my fault for not building it in then. I'm not sure this is 
intentional,
+   but I am ok with the change.
+
+* Fix http://issues.apache.org/bugzilla/show_bug.cgi?id=44282
+  Do call to getClassLoader() in a privileged block.
+  http://svn.apache.org/viewvc?rev=616953&view=rev
+  +1: markt, fhanik
+  +0: remm: do we really want to fix these sort of "bugs" ?
+  -1:
+
+* Allow to specify the random device to use. (/dev/urandom is faster).
+  http://svn.apache.org/viewvc?view=rev&revision=602114
+  http://svn.apache.org/viewvc?view=rev&revision=601795
+  +1: jfclere, fhanik
+  +0: markt, jim - should really be added to the docs as well
+  -1:
+
 * Revert back to original patch proposed for UTF8 parsing.
   This also fixes the regression for 6.0.16 and 5.5.26 (and possibly 4.1.37) 
mentioned in 
   http://issues.apache.org/bugzilla/show_bug.cgi?id=44494



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



svn commit: r633895 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/tomcat/util/net/SSLImplementation.java

2008-03-05 Thread jim
Author: jim
Date: Wed Mar  5 08:09:46 2008
New Revision: 633895

URL: http://svn.apache.org/viewvc?rev=633895&view=rev
Log:
Mark method that adds a JSSE dependency to the SSL abstraction as deprecated

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=633895&r1=633894&r2=633895&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Mar  5 08:09:46 2008
@@ -37,11 +37,6 @@
 that needs to be removed will now be marked as deprecated
 in 6.0.x (see patch below).
 
-* Mark method that adds a JSSE dependency to the SSL abstraction as deprecated
-  http://people.apache.org/~markt/patches/2008-02-21-SSL-JSSE.patch
-  +1: markt, fhanik, jim
-  -1:
-
 * ExtendedAccessLogValve cs-uri not print empty querystring
   http://svn.apache.org/viewvc?rev=620778&view=rev
   +1: pero,funkman,markt

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java?rev=633895&r1=633894&r2=633895&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SSLImplementation.java 
Wed Mar  5 08:09:46 2008
@@ -85,5 +85,12 @@
 abstract public String getImplementationName();
 abstract public ServerSocketFactory getServerSocketFactory();
 abstract public SSLSupport getSSLSupport(Socket sock);
+
+/**
+ * @deprecated This method has been deprecated since it adds a JSSE
+ * dependency to this interface. It will be removed in versions
+ * after 6.0.x.
+ */
+@Deprecated
 abstract public SSLSupport getSSLSupport(SSLSession session);
 }



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



svn commit: r633907 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/valves/ExtendedAccessLogValve.java webapps/docs/changelog.xml

2008-03-05 Thread jim
Author: jim
Date: Wed Mar  5 08:18:09 2008
New Revision: 633907

URL: http://svn.apache.org/viewvc?rev=633907&view=rev
Log:
Merge r620778 from trunk:

ExtendedAccessLogValve cs-uri not print empty querystring
Submitted by: pero
Reviewed by: jim

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

tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=633907&r1=633906&r2=633907&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Mar  5 08:18:09 2008
@@ -37,10 +37,6 @@
 that needs to be removed will now be marked as deprecated
 in 6.0.x (see patch below).
 
-* ExtendedAccessLogValve cs-uri not print empty querystring
-  http://svn.apache.org/viewvc?rev=620778&view=rev
-  +1: pero,funkman,markt
-
 * lib is relative to catalina home, not base
   http://svn.apache.org/viewvc?rev=627602&view=rev
   +1: markt, fhanik, jim

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java?rev=633907&r1=633906&r2=633907&view=diff
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
 (original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
 Wed Mar  5 08:18:09 2008
@@ -663,7 +663,7 @@
 public void addElement(StringBuffer buf, Date date,
 Request request, Response response, long time) 
{
 String query = request.getQueryString();
-if (query != null) {
+if (query == null) {
 buf.append(request.getRequestURI());
 } else {
 buf.append(request.getRequestURI());

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=633907&r1=633906&r2=633907&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Mar  5 08:18:09 2008
@@ -34,6 +34,12 @@
 
 
   
+ 
+  ExtendedAccessLogValve cs-uri not print empty querystring (pero)
+  
+ 
+  
+  
 
   
 ServletContext.getResource("noslash/resource") only requires forward 
slash if STRICT_SERVLET_COMPLIANCE



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



svn commit: r633908 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/tomcat/util/http/ServerCookie.java

2008-03-05 Thread jim
Author: jim
Date: Wed Mar  5 08:19:38 2008
New Revision: 633908

URL: http://svn.apache.org/viewvc?rev=633908&view=rev
Log:
Merge r627743, r630533 from trunk:

Add STRICT compliance flag to impact cookie value handling to provide backwards 
compatibility
Add STRICT complanice flag to impact ServletContext.getResource(AsStream) to be 
backwards compatible


Use the same name on the static variable for servlet compliance

Submitted by: fhanik
Reviewed by: jim

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/ServerCookie.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=633908&r1=633907&r2=633908&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Mar  5 08:19:38 2008
@@ -47,12 +47,6 @@
   +1: fhanik, markt, remm, jfclere
   -1:
   
-* Allow old style cookie values to work(auto switch to v1) (regression)
-  http://svn.apache.org/viewvc?view=rev&revision=627743 (ServerCookie.java)
-  http://svn.apache.org/viewvc?view=rev&revision=630533 (use the same variable 
name for all servlet compliance flags)
-  +1: fhanik, markt, jim
-  -1: 
-  
 * Fix ArrayIndexOutOfBoundsException when empty URL is requested
   http://svn.apache.org/viewvc?rev=627883&view=rev
   +1: markt, jim

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/ServerCookie.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/ServerCookie.java?rev=633908&r1=633907&r2=633908&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/ServerCookie.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/ServerCookie.java Wed 
Mar  5 08:19:38 2008
@@ -51,6 +51,13 @@
 private int maxAge = -1;
 private int version = 0;
 
+/**
+ * If set to true, we parse cookies according to the servlet spec,
+ */
+public static final boolean STRICT_SERVLET_COMPLIANCE =
+
Boolean.valueOf(System.getProperty("org.apache.catalina.STRICT_SERVLET_COMPLIANCE",
 "false")).booleanValue();
+
+
 // Note: Servlet Spec =< 2.5 only refers to Netscape and RFC2109,
 // not RFC2965
 
@@ -248,7 +255,7 @@
 buf.append("=");
 // Servlet implementation does not check anything else
 
-maybeQuote2(version, buf, value);
+version = maybeQuote2(version, buf, value);
 
 // Add version 1 specific information
 if (version == 1) {
@@ -329,7 +336,7 @@
  * @param buf
  * @param value
  */
-public static void maybeQuote2 (int version, StringBuffer buf, String 
value) {
+public static int maybeQuote2 (int version, StringBuffer buf, String 
value) {
 if (value==null || value.length()==0) {
 buf.append("\"\"");
 }else if (containsCTL(value,version)) 
@@ -338,6 +345,11 @@
 buf.append('"');
 buf.append(escapeDoubleQuotes(value,1,value.length()-1));
 buf.append('"');
+} else if ((!STRICT_SERVLET_COMPLIANCE) && version==0 && 
!isToken2(value)) {
+buf.append('"');
+buf.append(escapeDoubleQuotes(value,0,value.length()));
+buf.append('"');
+version = 1;
 } else if (version==0 && !isToken(value)) {
 buf.append('"');
 buf.append(escapeDoubleQuotes(value,0,value.length()));
@@ -349,6 +361,7 @@
 }else {
 buf.append(value);
 }
+return version;
 }
 
 



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



svn commit: r633909 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/connector/CoyoteAdapter.java

2008-03-05 Thread jim
Author: jim
Date: Wed Mar  5 08:20:19 2008
New Revision: 633909

URL: http://svn.apache.org/viewvc?rev=633909&view=rev
Log:
Merge r627883 from trunk:

Fix ArrayIndexOutOfBoundsException reported on users list. Patch provided by 
Charles R Caldarale.
Submitted by: markt
Reviewed by: jim

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=633909&r1=633908&r2=633909&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Mar  5 08:20:19 2008
@@ -47,12 +47,6 @@
   +1: fhanik, markt, remm, jfclere
   -1:
   
-* Fix ArrayIndexOutOfBoundsException when empty URL is requested
-  http://svn.apache.org/viewvc?rev=627883&view=rev
-  +1: markt, jim
-  +1: fhanik - although, I just don't see how this would ever happen, the 
smallest URI is "/"
-  -1:
-
 * Add tests for the cookie parsing and use package 
org.apache.catalina.tomcat.util.http
   http://people.apache.org/~jfclere/patches/test_cookies.patch2
   +1: jfclere, fhanik, markt

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=633909&r1=633908&r2=633909&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
Wed Mar  5 08:20:19 2008
@@ -682,6 +682,10 @@
 int start = uriBC.getStart();
 int end = uriBC.getEnd();
 
+// An empty URL is not acceptable
+if (start == end)
+return false;
+
 // URL * is acceptable
 if ((end - start == 1) && b[start] == (byte) '*')
   return true;



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



svn commit: r633910 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/session/ManagerBase.java

2008-03-05 Thread jim
Author: jim
Date: Wed Mar  5 08:21:05 2008
New Revision: 633910

URL: http://svn.apache.org/viewvc?rev=633910&view=rev
Log:
Merge r627689 from trunk:

fix NPE
java.lang.NullPointerException at 
org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:682)
at 
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:667)
at 
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)

Submitted by: fhanik
Reviewed by: jim

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=633910&r1=633909&r2=633910&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Mar  5 08:21:05 2008
@@ -42,11 +42,6 @@
   +1: markt, fhanik, jim
   -1: 
 
-* Fix NPE when iterating through sessions for expiration
-  http://svn.apache.org/viewvc?view=rev&revision=627689
-  +1: fhanik, markt, remm, jfclere
-  -1:
-  
 * Add tests for the cookie parsing and use package 
org.apache.catalina.tomcat.util.http
   http://people.apache.org/~jfclere/patches/test_cookies.patch2
   +1: jfclere, fhanik, markt

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java?rev=633910&r1=633909&r2=633910&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java Wed 
Mar  5 08:21:05 2008
@@ -679,7 +679,7 @@
 if(log.isDebugEnabled())
 log.debug("Start expire sessions " + getName() + " at " + timeNow 
+ " sessioncount " + sessions.length);
 for (int i = 0; i < sessions.length; i++) {
-if (!sessions[i].isValid()) {
+if (sessions[i]!=null && !sessions[i].isValid()) {
 expireHere++;
 }
 }



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



svn commit: r633911 - in /tomcat/tc6.0.x/trunk/webapps/docs: project.xml status.xml

2008-03-05 Thread jim
Author: jim
Date: Wed Mar  5 08:22:04 2008
New Revision: 633911

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

Merge r630006 from trunk:

As per http://marc.info/?l=tomcat-dev&m=120303263525849&w=2, remove status page 
and point to wiki.
Submitted by: markt
Reviewed by: jim

Removed:
tomcat/tc6.0.x/trunk/webapps/docs/status.xml
Modified:
tomcat/tc6.0.x/trunk/webapps/docs/project.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/project.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/project.xml?rev=633911&r1=633910&r2=633911&view=diff
==
--- tomcat/tc6.0.x/trunk/webapps/docs/project.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/project.xml Wed Mar  5 08:22:04 2008
@@ -29,7 +29,7 @@
 
 
 
-http://tomcat.apache.org/faq"; 
/>
+http://wiki.apache.org/tomcat/FAQ"; />
 
 
 
@@ -77,7 +77,7 @@
 
 
 
-
+http://wiki.apache.org/tomcat/TomcatVersions"/>
 
 
 



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



DO NOT REPLY [Bug 44541] New: Document packetSize attribute

2008-03-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44541

   Summary: Document packetSize attribute
   Product: Tomcat 5
   Version: 5.5.21
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connector:AJP
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The packetSize attribute of the AJP connector has been backported from Tomcat 6
into 5.5.21 but it is not documented on
http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html. Neither is it
documented for Tomcat 6 (see
http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html).


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

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



svn commit: r633913 - in /tomcat/tc6.0.x/trunk: RUNNING.txt STATUS.txt

2008-03-05 Thread jim
Author: jim
Date: Wed Mar  5 08:24:59 2008
New Revision: 633913

URL: http://svn.apache.org/viewvc?rev=633913&view=rev
Log:
Merge r627602 from trunk:

As pointed out on the users list, lib is relative to catalina home, not base
Submitted by: markt
Reviewed by: jim

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

Modified: tomcat/tc6.0.x/trunk/RUNNING.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/RUNNING.txt?rev=633913&r1=633912&r2=633913&view=diff
==
--- tomcat/tc6.0.x/trunk/RUNNING.txt (original)
+++ tomcat/tc6.0.x/trunk/RUNNING.txt Wed Mar  5 08:24:59 2008
@@ -112,9 +112,6 @@
 
 * logs - Log and output files
 
-* lib - For classes and resources that must be shared across all web
-   applications
-
 * webapps - Automatically loaded web applications
 
 * work - Temporary working directories for web applications

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=633913&r1=633912&r2=633913&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Mar  5 08:24:59 2008
@@ -37,11 +37,6 @@
 that needs to be removed will now be marked as deprecated
 in 6.0.x (see patch below).
 
-* lib is relative to catalina home, not base
-  http://svn.apache.org/viewvc?rev=627602&view=rev
-  +1: markt, fhanik, jim
-  -1: 
-
 * Add tests for the cookie parsing and use package 
org.apache.catalina.tomcat.util.http
   http://people.apache.org/~jfclere/patches/test_cookies.patch2
   +1: jfclere, fhanik, markt



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



svn commit: r633914 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/coyote/http11/Http11NioProtocol.java

2008-03-05 Thread jim
Author: jim
Date: Wed Mar  5 08:25:46 2008
New Revision: 633914

URL: http://svn.apache.org/viewvc?rev=633914&view=rev
Log:
Merge r616896 from trunk:

The NIO connector is hard-coded to use the JSSE SSL implementation so just use 
it directly. This patch allows the JSSE dependency in the SSL abstraction to be 
removed (this will be in a later patch).
Submitted by: markt
Reviewed by: jim

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=633914&r1=633913&r2=633914&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Mar  5 08:25:46 2008
@@ -28,15 +28,6 @@
 PATCHES ACCEPTED TO BACKPORT:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-* Modify NIo connector to use JSSE SSL implementation directly
-  http://svn.apache.org/viewvc?rev=616896&view=rev
-  +1: markt, fhanik
-  +1: remm: ok
-(markt) This is not an API change. It is preparation for an API
-change which will now be in a future release. The method
-that needs to be removed will now be marked as deprecated
-in 6.0.x (see patch below).
-
 * Add tests for the cookie parsing and use package 
org.apache.catalina.tomcat.util.http
   http://people.apache.org/~jfclere/patches/test_cookies.patch2
   +1: jfclere, fhanik, markt

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=633914&r1=633913&r2=633914&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java 
Wed Mar  5 08:25:46 2008
@@ -39,7 +39,7 @@
 import org.apache.tomcat.util.net.NioChannel;
 import org.apache.tomcat.util.net.NioEndpoint;
 import org.apache.tomcat.util.net.NioEndpoint.Handler;
-import org.apache.tomcat.util.net.SSLImplementation;
+import org.apache.tomcat.util.net.jsse.JSSEImplementation;
 import org.apache.tomcat.util.net.SecureNioChannel;
 import org.apache.tomcat.util.net.SocketStatus;
 import org.apache.tomcat.util.res.StringManager;
@@ -56,7 +56,7 @@
  */
 public class Http11NioProtocol implements ProtocolHandler, MBeanRegistration
 {
-protected SSLImplementation sslImplementation = null;
+protected JSSEImplementation sslImplementation = null;
 
 public Http11NioProtocol() {
 cHandler = new Http11ConnectionHandler( this );
@@ -134,7 +134,7 @@
 
 try {
 ep.init();
-sslImplementation = 
SSLImplementation.getInstance("org.apache.tomcat.util.net.jsse.JSSEImplementation");
+sslImplementation = new JSSEImplementation();
 } catch (Exception ex) {
 log.error(sm.getString("http11protocol.endpoint.initerror"), ex);
 throw ex;



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



Re: Reorder the http header generated by tomcat

2008-03-05 Thread Jim Jagielski

Requiring any specific order on HTTP response headers is
completely bogus...

On Mar 5, 2008, at 11:06 AM, George Sexton wrote:




Jim Jagielski wrote:

Why?


Evidently because he doesn't understand how to write a sort routine  
that will put them in the order he would like...


So, he wants you to do it for him.

I can sort of understand the desire. I had to write an iCal parser,  
and it turns out that it's a lot easier to do if the order of the  
fields is somewhat deterministic. Still, it's no excuse for not  
handling it in his own code if his code has a dependency on the order.



On Mar 5, 2008, at 1:07 AM, Hanks Wang (hanwan) wrote:

Hi all,

I'd like to describe my problem clearer:

Currently the http header which generated by Tomcat is something  
like:


Accept-Ranges: none
Content-Type: text/plain
Server: test123

Can I change it into below order?
Server: test123
Accept-Ranges: none
Content-Type: text/plain

Thanks!
Han

-Original Message-
From: Hanks Wang (hanwan)
Sent: Wednesday, March 05, 2008 10:12 AM
To: Tomcat Developers List
Subject: Reorder the http header generate by tomcat

Hi all,
I edit server.xml as:
...


It will add "server" item in my response header, so now the http  
header

is something like:
Cache-Control: no-store, no-cache, must-revalidate
Accept-Ranges: none
Content-Type: text/plain
Connection: close
Server: test123

The "Server" is put to the last item of the http header.

So my question is : Is there a way to reorder the http header  
instead of

having tomcat formulate them?

Thanks
Hanks


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


--
George Sexton
MH Software, Inc.
Voice: +1 303 438 9585
URL:   http://www.mhsoftware.com/

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



Re: Reorder the http header generated by tomcat

2008-03-05 Thread William A. Rowe, Jr.

Jim Jagielski wrote:

Requiring any specific order on HTTP response headers is
completely bogus...


:)

To elaborate on why Jim thinks so (and we all agree)...

- it's not spec.  You cannot rely on this when authoring a user agent.

- proxies can and will reorder whatever pretty order you assign to the
  response headers from the server agent.

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



[Tomcat Wiki] Update of "FAQ/Connectors" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Connectors

The comment on the change is:
Add question list to start.

--
  
  '''Please note, jk2 is no longer supported. Please use mod_jk instead.'''
  == Questions ==
+  1. [#Q1 What is JK (or AJP)?]
+  1. [#Q2 Which connector: mod_jserv, JK, JK2, mod_webapp or mod_proxy?]
+  1. [#Q3 Why should I integrate Apache with Tomcat? (or not)]
+  1. [#Q4 At boot, is order of start up (Apache vs Tomcat) important?]
+  1. [#Q5 Is there any way to control the content of automatically generated 
mod_jk.conf-auto?]
+  1. [#Q6 How do I bind to a specific ip address?]
+  1. [#Q7 Where can I download a binary distribution of my connector?]
+  1. [#Q8 I'm having strange UTF-8 issues with my request parameters.]
+ 
+ == Answers ==
  
  [[Anchor(Q1)]]'''What is JK (or AJP)?'''
  

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



[Tomcat Wiki] Update of "FAQ/Deployment" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Deployment

The comment on the change is:
Add question list to start.

--
  == Preface ==
  This section of the FAQ discusses common questions related to web application 
deployment.
  == Questions ==
+  1. [#Q1 Why does tomcat 5 create context configuration files?]
+  1. [#Q2 Why does the memory usage increase when I redeploy a web 
application?]
+ 
+ == Answers ==
- '''Why does tomcat 5 create context configuration files?'''
+ [[Anchor(Q1)]]'''Why does tomcat 5 create context configuration files?'''
  
  Unlike tomcat 4.x, tomcat 5.x creates context configuration files for you in 
its conf/[Engine name]/[Host name] directory. This is part of the change in 
tomcat's configuration mechanism from version 4.x to make overall configuration 
more robust, flexible, and enterprise-friendly. Note, however, that this has 
changed the recommended deployment practices for web applications. These 
context configuration files are created by tomcat, but not removed by tomcat, 
because the user may have changed them or other files in the conf directory. 
The suggested practice for tomcat 5 is to place context configuration files in 
the META-INF/context.xml directory of your webapp, and use Tomcat's Manager 
webapp to deploy/undeploy your applications. More details can be found here: 
[http://marc.theaimsgroup.com/?l=tomcat-user&m=107590945807699&w=2 MARC Archive]
  
- ''' Why does the memory usage increase when I redeploy a web application?'''
+ [[Anchor(Q2)]]'''Why does the memory usage increase when I redeploy a web 
application?'''
  
  Because the Classloader (and the Class objects it loaded) cannot be recycled. 
They are stored in the permanent heap generation by the JVM, and when you 
redepoy a new class loader is created, which loads another copy of all these 
classes. This can cause {{{OufOfMemoryErrors}}} eventually. 
  

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



[Tomcat Wiki] Trivial Update of "FAQ" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ

--
  * [wiki:/Connectors Connectors] - You want to connect tomcat to Apache, 
IIS, or have questions about tomcat-standalone.
  * [wiki:/Database Database] - Getting tomcat to talk to a database.
  * [wiki:/Deployment Deployment] - Questions related to web application 
deployment.
- * [wiki:/Development] - Various IDE integration questions.
+ * [wiki:/Development Development] - Various IDE integration questions.
  * [wiki:HowTo How To] - Miscellaneous common how to's.
  * [wiki:/FDA_Validation FDA Validation] - Questions related to running 
Tomcat in an FDA validated environment.
  * [wiki:/Linux_Unix Linux / Unix] - Common questions for Linux / Unix 
related platforms.

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



[Tomcat Wiki] Update of "FAQ" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ

The comment on the change is:
Fix broken link

--
  * [wiki:/Connectors Connectors] - You want to connect tomcat to Apache, 
IIS, or have questions about tomcat-standalone.
  * [wiki:/Database Database] - Getting tomcat to talk to a database.
  * [wiki:/Deployment Deployment] - Questions related to web application 
deployment.
- * [wiki:/Development Development] - Various IDE integration questions.
+ * [wiki:/Developing Developing] - Various IDE integration questions.
  * [wiki:HowTo How To] - Miscellaneous common how to's.
  * [wiki:/FDA_Validation FDA Validation] - Questions related to running 
Tomcat in an FDA validated environment.
  * [wiki:/Linux_Unix Linux / Unix] - Common questions for Linux / Unix 
related platforms.

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



[Tomcat Wiki] Update of "FAQ/Developing" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Developing

The comment on the change is:
Add question list to start.

--
  This section of the FAQ discusses common questions related to Tomcat 
development.
  
  == Questions ==
+  1. [#Q1 How do I configure Tomcat to support remote debugging?]
+  1. [#Q2 How do I remotely debug Tomcat using Eclipse?]
+  1. [#Q3 How do I remotely debug Tomcat using NetBeans?]
+  1. [#Q4 How do I change the monitoring interval for modified resources and 
application reloading?]
+ == Answers ==
- '''How do I configure Tomcat to support remote debugging?'''
+ [[Anchor(Q1)]]'''How do I configure Tomcat to support remote debugging?'''
  
  The short answer is to add the following options when the JVM is started:
  {{{-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n}}}
@@ -18, +23 @@

  Whilst this is very useful in development it should not be used in production 
because of both security and performance implications.
  
  
- '''How do I remotely debug Tomcat using Eclipse?'''
+ [[Anchor(Q2)]]'''How do I remotely debug Tomcat using Eclipse?'''
  
  This answer assumes that you have a project set up with all of the fixings 
and have some idea of what you're doing in this respect. If not then thats 
really outside the scope of this topic and more in the scope of you needing to 
go to [[http://eclipse.org eclipse.org]] and read up on how to use your ide, 
and maybe practice a little bit before you come back to this. We're also going 
to assume you have some idea of what a debugger is and how to use one.
  
  Make sure tomcat is started and that your app is deployed and the sources, 
etc are all defined as resources in your app. If you have a servlet or 
something, set a breakpoint where its sure to hit on the next request. Go to 
"Run->Debug...". Click on "Remote Java Applications", then click "New". Type in 
the title and all. Notice that port 8000 from the Tomcat instructions. Save and 
run. Eclipse will connect to the VM that Tomcat is running under. Wow, that was 
easy! Now go type the url to submit to your servlet or whatever in your 
browser. Boom you hit the breakpoint right? Have fun!
  
  
- '''How do I remotely debug Tomcat using NetBeans IDE?'''
+ [[Anchor(Q3)]]'''How do I remotely debug Tomcat using NetBeans?'''
  
- This answer assumes that you have correctly set up a NetBeans IDE project and 
that you know how to use the NetBeans IDE debugger. If not, please go to 
http://www.netbeans.org/kb/using-netbeans/40/debug.html and read up on how to 
use NetBeans IDE and its debugger.
+ This answer assumes that you have correctly set up a NetBeans project and 
that you know how to use the NetBeans debugger. If not, please go to 
http://www.netbeans.org/kb/using-netbeans/40/debug.html and read up on how to 
use NetBeans and its debugger.
  
  Make sure that Tomcat is started in debug mode as described above, that your 
application is deployed, and that the sources are all defined as resources in 
your application. If you have a servlet or JSP file, set a breakpoint where you 
think a problem might be occurring. Go to "Run->Attach Debugger". A dialog pops 
up to let you specify the following options:
  
@@ -38, +43 @@

  
  When you press OK, you have a debugging connection very similar to local 
debugging.
  
- Note that NetBeans IDE has a second option -- you can debug JSP files and 
servlets locally using a Tomcat server that is bundled with the IDE. When you 
debug a JSP file or servlet in the IDE, the bundled Tomcat server automatically 
starts in debug mode, and the debugger connects to it.
+ Note that NetBeans has a second option -- you can debug JSP files and 
servlets locally using a Tomcat server that is bundled with the IDE. When you 
debug a JSP file or servlet in the IDE, the bundled Tomcat server automatically 
starts in debug mode, and the debugger connects to it.
  
  
- '''How do I change the monitoring interval for modified resources and 
application reloading?'''
+ [[Anchor(Q4)]]'''How do I change the monitoring interval for modified 
resources and application reloading?'''
  
  Modify the {{{checkInterval}}} attribute value on the relevant Loader element 
in your web application configuration file (yourapp.xml), or in the main 
configuration file {{{%CATALINA_HOME%/conf/server.xml}}} if that is the one 
you're using. For more information, please see the 
[[http://tomcat.apache.org/faq/config/loader.html Loader configuration 
reference]]. 
  

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



[Tomcat Wiki] Update of "FAQ/FDA Validation" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/FDA_Validation

The comment on the change is:
Add question list to start.

--
  Please note that although this page mentions specific companies, we do not 
explicitly endorse or sell anyone's services. Tomcat and Apache are 
not-for-profit organizations. This page is also far from a complete listing of 
vendors and support options. It is meant as a demonstration showing that these 
options do exist and that running Tomcat in a validated environment is both 
feasible and reasonable.
  
  === Questions ===
+  1. [#Q1 Can Tomcat be used in a validated environment?]
+  1. [#Q2 Has anyone actually done it?]
+  1. [#Q3 Is Tomcat itself validated?]
+  1. [#Q4 What kind of support is there around validating Tomcat?]
+  1. [#Q5 How do I know I have a validated release? How do I know no one has 
tampered with the release package?]
+  1. [#Q6 What about security? I'm concerned about attacks.]
+ === Answers ===
- '''Can Tomcat be used in a validated environment?'''
+ [[Anchor(Q1)]]'''Can Tomcat be used in a validated environment?'''
  
  Yes. There's nothing in Tomcat's design or implementation that prevent it 
from being used in a validated environment. The same validation procedures and 
guidelines that apply to most software packages apply to Tomcat as well. Being 
an open-source application does not preclude Tomcat validation. In fact, it 
helps in at least one key aspect: the source code itself can be audited, as can 
the commit and change logs for the software.
  
- '''Has anyone actually done it?'''
+ [[Anchor(Q2)]]'''Has anyone actually done it?'''
  
  Yes. As shown in 
[http://marc.theaimsgroup.com/?l=tomcat-user&m=109836874319797&w=2 this user 
mailing list archive], Merck and other large companies are using Tomcat in a 
validated environment. In addition, there is at least one application provider 
([http://www.interchangedigital.com/ Interchange Digital]) whose application 
runs on Tomcat that has deployed said package in numerous pharma data centers.
  
- '''Is Tomcat itself validated?'''
+ [[Anchor(Q3)]]'''Is Tomcat itself validated?'''
  
  Yes. Tomcat itself is validated to the extent it can be. Tomcat implements 
two Java Specifications: the [http://java.sun.com/products/servlet Servlet 
Specification] and the [http://java.sun.com/products/jsp Java Server Pages 
(JSP) Specification]. Each of these specifications has a Technology 
Compatbility Kit (TCK), which is a collection of tests to certify a given 
product meets the Specification fully and accurately.
  
@@ -26, +33 @@

  
  However, we cannot validate your application's use of Tomcat. You're on your 
own there.
  
- '''What kind of support is there around validating Tomcat?'''
+ [[Anchor(Q4)]]'''What kind of support is there around validating Tomcat?'''
  
  Several kinds. They include:
  
@@ -34, +41 @@

   * There are numerous vendors in addition to the above consultants, like 
[http://www.covalent.net/ Covalent] and 
[http://www.jboss.org/services/prodsupport JBoss], who offer 24/7/365 
enterprise-level support for Tomcat.
   * The Tomcat [http://tomcat.apache.org/lists.html mailing lists] are 
extremely active and contain members of many of the above organizations, 
including contractors available for hire.
  
- '''How do I know I have a validated release? How do I know no one has 
tampered with the release package?'''
+ [[Anchor(Q5)]]'''How do I know I have a validated release? How do I know no 
one has tampered with the release package?'''
  
  All Tomcat releases are signed using the Release Manager's 
[http://www.pgpi.org/doc/pgpintro PGP] key. The key is also available in the 
KEYS file that ships with every Tomcat release. The same KEYS file is also 
available in the Tomcat CVS repository 
([http://www.apache.org/dist/tomcat/tomcat-5/KEYS here]). The PGP signatures 
are available on all the Tomcat download pages, and can (and should!) be used 
to verify the release really is the signed distribution.
  
  As for tampering: every Tomcat release is also digested using the MD5 
algorithm as specified in [http://www.faqs.org/rfcs/rfc1321.html RFC1321]. The 
MD5 digest is included in all the download pages. Users run MD5 on their local 
machine to verify that the digest of what they downlaoded is the same as that 
published in the Apache download pages. That way, users are assured the 
distribution has not been modified since the Release Manager signed it.
  
- '''What about security? I'm concerned about attacks.'''
+ [[Anchor(Q6)]]'''What about security? I'm concerned about attacks.'''
  
  There's no need to be. See the [http://wiki.apache.org/tomcat/FAQ/Security 
security page] of this FAQ for more information.
  

---

[Tomcat Wiki] Update of "FAQ/Linux Unix" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Linux_Unix

The comment on the change is:
Add question list to start.

--
  == Preface ==
  
  == Questions ==
- 
+  1. [#Q1 When I run ps (on Linux), why do I see my java process a bazillion 
times!]
+  1. [#Q2 How do I run without an X server and still get graphics?]
+  1. [#Q3 Tomcat dies after I log out!]
+ == Answers ==
- '''When I run ps (on Linux), why do I see my java process a bazillion 
times!'''
+ [[Anchor(Q1)]]'''When I run ps (on Linux), why do I see my java process a 
bazillion times!'''
  
  Linux implemented threads as processes. Due to other gory details that is 
beyond the scope of this FAQ - the ps command doesn't work correctly with 
respect to threads. You can get more gory details 
[http://www.onlamp.com/pub/a/onlamp/2002/11/07/linux_threads.html here] and 
[http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html#D here] .
  
- '''How do I run without an X server and still get graphics?'''
+ [[Anchor(Q2)]]'''How do I run without an X server and still get graphics?'''
  
  You either need to run headless or run an alternate X-server. Some more 
information can be found 
[http://marc.theaimsgroup.com/?t=10480304763&r=1&w=2 here], 
[http://marc.theaimsgroup.com/?l=tomcat-user&m=102335321103262&w=2 here], or 
[http://marc.theaimsgroup.com/?l=tomcat-user&m=101614645312259&w=2 here].
  Or if your are using a JVM 1.4 or better, you can use the system property 
{{{java.awt.headless=true}}}
  
- '''Tomcat dies after I log out!'''
+ [[Anchor(Q3)]]'''Tomcat dies after I log out!'''
  
- This is common complaint in Solaris. Make sure you use {{{nohup}}} and see 
[http://marc.theaimsgroup.com/?l=tomcat-user&m=104809785114238&w=2 this thread]
+ This is a common complaint when using Solaris. Make sure you use {{{nohup}}} 
and see [http://marc.theaimsgroup.com/?l=tomcat-user&m=104809785114238&w=2 this 
thread]
  

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



Re: svn commit: r633908 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/tomcat/util/http/ServerCookie.java

2008-03-05 Thread Mark Thomas

[EMAIL PROTECTED] wrote:

Author: jim
Date: Wed Mar  5 08:19:38 2008
New Revision: 633908

URL: http://svn.apache.org/viewvc?rev=633908&view=rev
Log:
Merge r627743, r630533 from trunk:

Add STRICT complanice flag to impact ServletContext.getResource(AsStream) to be 
backwards compatible


I don't see this part of the patch in the commit.

Mark


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



Re: svn commit: r633908 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/tomcat/util/http/ServerCookie.java

2008-03-05 Thread Jim Jagielski


On Mar 5, 2008, at 1:52 PM, Mark Thomas wrote:


[EMAIL PROTECTED] wrote:

Author: jim
Date: Wed Mar  5 08:19:38 2008
New Revision: 633908
URL: http://svn.apache.org/viewvc?rev=633908&view=rev
Log:
Merge r627743, r630533 from trunk:
Add STRICT complanice flag to impact  
ServletContext.getResource(AsStream) to be backwards compatible


I don't see this part of the patch in the commit.



Hmmm... let me double check that. The merge may have broke...


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



Re: svn commit: r633908 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/tomcat/util/http/ServerCookie.java

2008-03-05 Thread Jim Jagielski

Ahhh some of that was in r629848

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



Re: Reorder the http header generated by tomcat

2008-03-05 Thread George Sexton



William A. Rowe, Jr. wrote:

Jim Jagielski wrote:

Requiring any specific order on HTTP response headers is
completely bogus...


:)

To elaborate on why Jim thinks so (and we all agree)...

- it's not spec.  You cannot rely on this when authoring a user agent.

- proxies can and will reorder whatever pretty order you assign to the
  response headers from the server agent.


I agree. I just said that if HIS app requires a specific order, HE 
should write code to do it.


--
George Sexton
MH Software, Inc.
Voice: +1 303 438 9585
URL:   http://www.mhsoftware.com/

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



May Chun Chew/FEA/PEC is out of the office.

2008-03-05 Thread May Chun Chew

I will be out of the office starting  03/06/2008 and will not return until
03/07/2008.

I am Contactable at (65)97876648.


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



Re: Reorder the http header generated by tomcat

2008-03-05 Thread Arend van Spriel
Still it is good to clarify the WHY as explained by William. I would say
to mr. wang to get rid of any need for a specific order before getting
started with implementing some sorting algorithm.

George Sexton wrote:
> 
> 
> William A. Rowe, Jr. wrote:
>> Jim Jagielski wrote:
>>> Requiring any specific order on HTTP response headers is
>>> completely bogus...
>>
>> :)
>>
>> To elaborate on why Jim thinks so (and we all agree)...
>>
>> - it's not spec.  You cannot rely on this when authoring a user agent.
>>
>> - proxies can and will reorder whatever pretty order you assign to the
>>   response headers from the server agent.
> 
> I agree. I just said that if HIS app requires a specific order, HE
> should write code to do it.
> 


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



RE: Fix #43236

2008-03-05 Thread Leech, Jonathan
I read the spec the same way as you do. 
I have written filters that are even more permissive than this fix, and
I have also written filters that strictly adhere to the spec. 
Strictly adhering to the spec is definitely the way to go.
If you want/need your application to violate the spec, you can write a
filter that allows it.

I wasn't aware that you can call getOutputStream() in a JSP, when did
that change?

-Jonathan


-Original Message-
From: Jess Holle [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 04, 2008 6:15 PM
To: Tomcat Developers List
Subject: Fix #43236

I belatedly noticed this bug fix in 5.5.26 and 6.0.16.

On the one hand this seems like a nice fix, allowing the following call
sequences on ServletResponse:

   1. getWriter(), reset(), and then getOutputStream()
   2. getOutputStream(), reset(), and then getWriter()
   3. getWriter(), reset(), setCharacterEncoding(), and then getWriter()

without exceptions and with the effects one would expect if one had not
reset() or the methods prior to it.

On the other hand, the servlet spec seems to state fairly unequivocally
that (1) and (2) should result in IllegalStateExceptions and in (3) the
setCharacterEncoding() call should be silently ignored.

I'm not arguing for the fix to be rolled back, but I am trying to get
some insight as to whether I'm the only one that reads the spec this
way.

I'm interested this in large part as an occasional (and current) author
of rather complex servlet filters wherein I want to be as general and
transparent as possible.  In this role I want my filter to emulate
/standard /ServletResponse behavior as well as possible irrespective of
the servlet engine in which I'm running.  Behavior like Tomcat's after
this bug fix makes me wonder which way to head.

For now I've been leaving my filters as per my understanding of the spec
-- in large part because trying to emulate Tomcat's new behavior makes
at least my filter a real mess.  Also in practice I don't see a big need
for the new behavior as JSPWriter's usually delay
ServletResponse.getWriter() long enough for one to make up one's mind
and call getOutputStream() instead, for instance.

--
Jess Holle


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



Re: Fix #43236

2008-03-05 Thread Jess Holle

Leech, Jonathan wrote:
I read the spec the same way as you do. 
I have written filters that are even more permissive than this fix, and
I have also written filters that strictly adhere to the spec. 
Strictly adhering to the spec is definitely the way to go.

If you want/need your application to violate the spec, you can write a
filter that allows it.

I wasn't aware that you can call getOutputStream() in a JSP, when did
that change?
  
I'm not 100% certain this works.  I am rather certain you can have a JSP 
forward to something else that calls getOutputStream() -- effectively on 
the same response.  I suspect the same sort of thing would work in the 
page itself.


Of course you have to be sure not to fill (and to reset) your 
JspWriter's buffer in any case.


--
Jess Holle


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



Re: Fix #43236

2008-03-05 Thread Jess Holle
P.S. Thanks for the reply.  No one had responded yet and I despite much 
googling I really couldn't seem to find any discussion of the nuances of 
this area of the servlet spec.


Jess Holle wrote:

Leech, Jonathan wrote:
I read the spec the same way as you do. I have written filters that 
are even more permissive than this fix, and
I have also written filters that strictly adhere to the spec. 
Strictly adhering to the spec is definitely the way to go.

If you want/need your application to violate the spec, you can write a
filter that allows it.

I wasn't aware that you can call getOutputStream() in a JSP, when did
that change?
  
I'm not 100% certain this works.  I am rather certain you can have a 
JSP forward to something else that calls getOutputStream() -- 
effectively on the same response.  I suspect the same sort of thing 
would work in the page itself.


Of course you have to be sure not to fill (and to reset) your 
JspWriter's buffer in any case.


--
Jess Holle


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



Re: Fix #43236

2008-03-05 Thread Mark Thomas

Jess Holle wrote:
On the other hand, the servlet spec seems to state fairly unequivocally 
that (1) and (2) should result in IllegalStateExceptions and in (3) the 
setCharacterEncoding() call should be silently ignored.


I'm not arguing for the fix to be rolled back, but I am trying to get 
some insight as to whether I'm the only one that reads the spec this way.


I don't see it as quite so black and white - I wish it were.

There was a brief discussion on the dev list
http://marc.info/?l=tomcat-dev&m=117280911532391&w=2

My own view is that this needs some clarification from the expert group to 
resolve the inconsistency.


The best argument for this change, in my view, is the error page one. If 
you use anything other than ISO-8859-1 everywhere you are pretty much 
stuffed when it comes to displaying your error pages. That just didn't seem 
right to me.


Mark

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



[Tomcat Wiki] Update of "FAQ/Logging" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Logging

The comment on the change is:
Add question list to start. Remove obsolete entry that referred to 5.0.

--
  As you read these questions, please keep in mind that Tomcat's internal 
logging is separate from your own webapp's logging. You would typically be 
concerned only with your own webapp's logging. You would modify Tomcat's 
internal logging settings if you are debugging a possible issue or running into 
other problems. It is anticipated that Tomcat's out-of-the-box logging 
configuration will be fine for the vast majority of users and environments.
  
  == Questions ==
+  1. [#Q1 Does Tomcat have built-in logging capabilities, and if so how do I 
use them?]
+  1. [#Q2 How do I configure commons-logging for use with Tomcat?]
+  1. [#Q3 How should I log in my own webapps?]
+  1. [#Q4 Where does System.out go? How do I rotate catalina.out?]
+  1. [#Q5 Where are the logs when running Tomcat as a Windows service?]
  
+ == Answers ==
+ 
- '''Does Tomcat have built-in logging capabilities, and if so how do I use 
them?'''
+ [[Anchor(Q1)]]'''Does Tomcat have built-in logging capabilities, and if so 
how do I use them?'''
  
  The Servlet Specification requires Servlet Containers like Tomcat to provide 
at least a rudimentary implementation of the {{{ServletContext#log}}} method. 
Tomcat provides a much richer implementation than required by the Spec, as 
follows:
  
@@ -16, +23 @@

  
  In addition, Tomcat does not swallow the System.out and System.err JVM output 
streams. You may use these streams for elementary logging if you wish, but a 
more robust approach such as commons-logging or 
[http://logging.apache.org/log4j Log4J] is recommended for production 
applications.
  
- '''How do I configure commons-logging for use with Tomcat?'''
+ [[Anchor(Q2)]]'''How do I configure commons-logging for use with Tomcat?'''
  
  You need to specify a commons-logging configuration file and, if you wish, a 
logging implementation that supports commons-logging. JDK 1.4 (and later) 
java.util.Logging and Log4j are the two most commonly used logging toolkits for 
Tomcat. If you supply an external logging toolkit such as Log4J, it needs to be 
located in the $CATALINA_HOME/common/lib directory (for Tomcat 5.0 and earlier) 
or added to the bootstrap classpath by using the scripts in $CATALINA_HOME/bin 
(this is required for Tomcat 5.5 and later, which uses commons-logging while 
bootstrapping, and optional for Tomcat 5.0 and earlier).
  
@@ -27, +34 @@

   * [http://marc.theaimsgroup.com/?l=tomcat-user&m=108578233003073&w=2 Example 
with JSVC and running on port 80.]
   * [http://mail-archives.apache.org/eyebrowse/[EMAIL 
PROTECTED]&by=thread&from=877025 Need for it to be in bootstrap classpath.]
  
- '''How should I log in my own webapps?'''
+ [[Anchor(Q3)]]'''How should I log in my own webapps?'''
  
  While you can use System.out and System.err to log, we strongly recommend 
using a toolkit like Log4J or JDK 1.4's java.util.logging package. With these 
toolkits, you have significantly more functionality (for example, sending 
emails, logging to a database, controlling at runtime the logging level of 
different classes, inspecting the logs with a graphical viewer, etc.) than with 
Tomcat's built-in default logging configuration.
  
  We also recommend that you separate your logging from Tomcat's internal 
logging. That means you should bundle your logging toolkit with your webapp. If 
you're using Log4J, for example, place the Log4J jar in the WEB-INF/lib 
directory of your webapp and the Log4J configuration file in the 
WEB-INF/classes directory of your webapp. This way different web applications 
can have different logging configurations and you don't need to worry about 
them interfering with each other.
  
- '''Where does System.out go? How do I rotate catalina.out?'''
+ [[Anchor(Q4)]]'''Where does System.out go? How do I rotate catalina.out?'''
  
  System.out and System.err both print to catalina.out. But you can suppress 
this via the swallowOutput property and sent to different log files.
  catalina.out does not rotate. But it should not be an issue because nothing 
should be printing to standard output since you are using a logging package, 
right? [http://marc.theaimsgroup.com/?t=10554447261&r=1&w=2a thread about 
rotation of catalina.out]
  
- '''Where are the logs when running Tomcat as a Windows service?'''
+ [[Anchor(Q5)]]'''Where are the logs when running Tomcat as a Windows 
service?'''
  
  See these mailing list archive threads:
  
   * [http://mail-archives.apache.org/eyebrowse/[EMAIL 
PROTECTED]&by=thread&from=863525Where are the Tomcat logs when running as a 
Windows service?]
  
- '''Are there external documents, tutorials, o

[Tomcat Wiki] Update of "FAQ/Memory" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Memory

The comment on the change is:
Add question list to start. Add Yourkit to list of profilers.

--
   * [http://marc.theaimsgroup.com/?t=10301137976&r=1&w=2 Tomcat Out of 
memory]
   * [http://marc.theaimsgroup.com/?t=10451996172&r=1&w=2 Tracking memory 
usage over time]
  
- Also look at [http://java.quest.com/jprobe/jprobe.shtml JProbe], or 
[http://www.borland.com/optimizeit/ OptimizeIt], or other profiling tools. Lots 
of people recommend these tools. This is not an endorsement for them, I just 
notice other people like them.
+ Also look at [http://java.quest.com/jprobe/jprobe.shtml JProbe], 
[http://www.yourkit.com/ YourKit] or [http://www.borland.com/optimizeit/ 
OptimizeIt], or other profiling tools. Lots of people recommend these tools. 
This is not an endorsement for them, I just notice other people like them.
  
  === JSP Recompilation ===
  If your application uses JSPs which are frequently recompiled at runtime, 
e.g. headers that change value hourly, please make sure to read the JSP HOW-TO 
page and RELEASE NOTES documents. You may wish to tune the JSP compiler 
configuration to prevent memory leaks. Of course, these are documents you 
should have read by now anyways..
  
  == Questions ==
+  1. [#Q1 How do I adjust memory settings?]
+  1. [#Q2 Why do I get {{{OutOfMemoryError}}} errors?]
+  1. [#Q3 How much memory is Tomcat/webapp/??? using?]
  
+ == Answers ==
- '''How do I adjust memory settings?'''
+ [[Anchor(Q1)]]'''How do I adjust memory settings?'''
  
  First look at {{{java -X}}} to determine what parameters to set. Then you can 
set them via the environment variable {{{JAVA_OPTS}}}. Read the files 
catalina.bat or catalina.sh for more information on JAVA_OPTS.
  
- '''Why do I get {{{OutOfMemoryError}}} errors?'''
+ [[Anchor(Q2)]]'''Why do I get {{{OutOfMemoryError}}} errors?'''
  
  Many reasons.
  
@@ -35, +39 @@

   * Not actually a reason - but on your particular platform, look at the 
{{{java -X}}} options. They may be VERY helpful.
   * 
[http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669
 Your classloaders are not being garbage collected].
  
- '''How much memory is Tomcat/webapp/??? using?'''
+ [[Anchor(Q3)]]'''How much memory is Tomcat/webapp/??? using?'''
  
   * To find out how much memory Tomcat is using, you might be able to use the 
{{{Runtime}}} class provided by the JDK.
   * You can't find out how much memory a webapp is using. The JVM doesn't give 
us these detail.

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



[Tomcat Wiki] Update of "FAQ/Memory" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Memory

--
  
  == Questions ==
   1. [#Q1 How do I adjust memory settings?]
-  1. [#Q2 Why do I get {{{OutOfMemoryError}}} errors?]
+  1. [#Q2 Why do I get OutOfMemoryError errors?]
   1. [#Q3 How much memory is Tomcat/webapp/??? using?]
  
  == Answers ==

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



[Tomcat Wiki] Update of "FAQ/About" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/About

The comment on the change is:
Add question list to start. Update how to edit faq entry.

--
  If you wish to make a comment about the FAQ, make the comment on the 
tomcat-user list. Do not e-mail any of the committers directly and do not 
e-mail the tomcat-dev list. (Unless other people liked your suggestion and it 
was accidently missed by the committers who read the tomcat-user list) Emailing 
the tomcat-user list will allow a larger audience to immediately learn and 
critique your findings.
  
  == Questions ==
+  1. [#Q1 How did Tomcat get its name?]
+  1. [#Q2 How do I contribute a question?]
  
+ == Answers ==
- '''How did Tomcat get its name?'''
+ [[Anchor(Q1)]]'''How did Tomcat get its name?'''
  
  He (James Duncan Davidson) came up with "Tomcat" since the animal represented 
something that could take care of itself and fend for itself. That's how he 
came up with the name. [ Source ]
  
- '''How do I contribute a question?'''
+ [[Anchor(Q2)]]'''How do I contribute a question?'''
  
   * Make sure the question has been asked more than once
-  * Send an e-mail to the tomcat-user list
-  * Make sure the subject has [FAQ] in it
-  * Place the e-mail in a question and answer format like this.
-  * Minimize the use of html. Content is more important, the person updating 
the FAQ will make the wonderful stylistic choices.
+  * Make sure the answer(s) given are correct
+  * Select the right FAQ section in the wiki
+  * Edit the wiki, keeping to the existing format and layout
+  * Add your question to the list at the start of the page
+  * Don't forget to add an anchor to the start of your answer
+  * Note: The anchors do not have to appear on the page in numerical order
  

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



[Tomcat Wiki] Trivial Update of "FAQ/About" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/About

--
  == Answers ==
  [[Anchor(Q1)]]'''How did Tomcat get its name?'''
  
- He (James Duncan Davidson) came up with "Tomcat" since the animal represented 
something that could take care of itself and fend for itself. That's how he 
came up with the name. [ Source ]
+ He (James Duncan Davidson) came up with "Tomcat" since the animal represented 
something that could take care of itself and fend for itself. That's how he 
came up with the name.
  
  [[Anchor(Q2)]]'''How do I contribute a question?'''
  

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



[Tomcat Wiki] Update of "FAQ/Miscellaneous" by markt

2008-03-05 Thread Apache Wiki
Dear Wiki user,

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

The following page has been changed by markt:
http://wiki.apache.org/tomcat/FAQ/Miscellaneous

The comment on the change is:
Add anchors. Remove dups. Correct jdk/jre answer.

--
  
  == Questions ==
  
+ == Answers ==
- '''I have a problem with webapp reloading in tomcat 4.1.27.'''
- 
- Update to a later tomcat version, preferably the latest stable one. If you 
must stay with 4.1.27, get this hotfix: 
[http://issues.apache.org/bugzilla/show_bug.cgi?id=22096 Bugzilla 22096].
- 
- '''I am unable to compile my JSP!'''
+ [[Anchor(Q1)]]'''I am unable to compile my JSP!'''
  
  Are you seeing this?
  
@@ -33, +30 @@

  
  In the case of the Environment issues, it is typical that on Windows, the 
startup scripts work fine and the service does not. The service uses registry 
values to look for java and other "stuff". To save yourself some trouble, see 
if the [http://web.bvu.edu/staff/david/tcservcfg/ NT Service Config Utility] is 
helpful.
  
- '''I can't get servlets to work under /servlet/*!'''
+ [[Anchor(Q2)]]'''I can't get servlets to work under /servlet/*!'''
  
  Using /servlet/ to map servlets is evil, absolutely evil. Even more evil than 
[http://www.eviloverlord.com/lists/overlord.html this] . That being said, here 
are some threads that may answer this:
  
@@ -41, +38 @@

   * [http://marc.theaimsgroup.com/?t=10394533713&r=1&w=2 Cannot Run 
Servlets, only JSP's, Part II]
   * [http://marc.theaimsgroup.com/?t=10432685411&r=1&w=2 Tomcat 
configuration problem: JSPs work, servlets don]
  
- '''Why is the invoker evil?'''
+ [[Anchor(Q3)]]'''Why is the invoker evil?'''
  
  This is opinions of the writer (YMMV)
  Quickie about the invoker: The invoker is a dynamic servlet which allows 
run-time loading of other servlets based on class name. This servlet is the one 
that allows http://localhost/servlet/com.foo.MyClass?more=cowbell, where 
com.foo.MyClass is some class which can be loaded as a servlet but was never 
explicitly declared in a config file.
@@ -57, +54 @@

  
  For another explanation of the invoker servlet, why it's evil, and what to do 
about it, see [http://test.javaranch.com/wiki/view?InvokerServlet JavaRanch 
FAQ].
  
- '''How to I get Tomcat's version number?'''
+ [[Anchor(Q4)]]'''How to I get Tomcat's version number?'''
  
  {{{javax.servlet.ServletContext.getServerInfo();}}}
  
  Starting with tomcat 5.0.28 - there is now a version.sh (or version.bat) 
program in the bin directory. It will print the version number of tomcat to 
Standard output.
  
- '''Tomcat eats 100% of the CPU!'''
+ [[Anchor(Q5)]]'''Tomcat eats 100% of the CPU!'''
  
  Odds are, it might be the garbage collector going wacky.
  
@@ -78, +75 @@

  
  Windows service users - use [http://web.bvu.edu/staff/david/tcservcfg/ this]
  
- '''How do I get a customized error page?'''
+ [[Anchor(Q6)]]'''How do I get a customized error page?'''
  
  In web.xml ...
  
@@ -91, +88 @@

  You may also catch error 500's as well as other specific exceptions or 
exceptions which extend Throwable.
  For more information, see the Servlet Specification for all the gory details 
of how you can play with this.
  
- '''Should I use the LE version?'''
+ [[Anchor(Q7)]]'''Should I use the LE version?'''
  
  No. It was an experiment, it failed. (YMMV) The original purpose of LE was 
because jdk1.4 provides a LOT of standard functionality that Tomcat uses that 
was not in jdk1.3. So to save some space two distributions were made to save 
some bandwidth. Since then, it has been an exercise in confusion. (Flame me if 
you disagree) [http://marc.theaimsgroup.com/?l=tomcat-user&=105341005928071&w=2 
More info]
  
- '''How do I configure Tomcat to NOT to store the sessions during shutdown?'''
+ [[Anchor(Q8)]]'''How do I configure Tomcat to NOT to store the sessions 
during shutdown?'''
  
  [http://tomcat.apache.org/tomcat-4.1-doc/config/manager.html Look at the 
Session manager component and tweak accordingly. One way is to tell tomcat to 
persist sessions to a path which does not exist. (So tomcat will not store, or 
be able to load the sessions)]
  
- '''How do I disable tag pooling?'''
+ [[Anchor(Q9)]]'''How do I disable tag pooling?'''
  
  To disable tag pooling: See $TOMCAT_HOME/conf/web.xml --> enablePooling=false 
for the jsp servlet declaration.
  
- '''Is there a DTD for server.xml?'''
+ [[Anchor(Q10)]]'''Is there a DTD for server.xml?'''
  
  No! Nor can one accurately exist. 
[http://marc.theaimsgroup.com/?l=tomcat-user&m=104205666221372&w=2 Here's why]
  
- '''How do I change the welcome file? ( I want to show index.jsp instead of 
index.html)'''
+ [[Anchor(Q11)]]'''How do I change the welcome file? ( I want to show 
index.jsp instead of index.html)'''
  
  This is done in web.xml by changing welcome-files-list. 
[http://marc.theaimsgroup.com/?l=t