Re: 7.0.18 installer does not work under windows with a custom service name

2011-07-11 Thread etienne massip
It is, but it would have been accurate to tell me that the service did
already exist instead of leading me on permission issues. And allowing user
to enter service name and service description would be a must :-)

On Fri, Jul 8, 2011 at 6:27 PM, Mark Thomas ma...@apache.org wrote:

 On 08/07/2011 17:22, etienne massip wrote:
  Confirmed, it works better if the conflicting service is removed first =)

 Great. Glad it is working for you.

 Mark



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




Re: svn commit: r1144690 - in /tomcat/trunk: java/org/apache/catalina/startup/Catalina.java java/org/apache/catalina/startup/ClusterRuleSetFactory.java webapps/docs/changelog.xml

2011-07-11 Thread Ivan
Hi, this changes brought a cycle dependency between the tomcat-catalina and
tomcat-catalina-ha module, could you please help to fix it.
Thanks.

2011/7/10 ma...@apache.org

 Author: markt
 Date: Sat Jul  9 16:05:42 2011
 New Revision: 1144690

 URL: http://svn.apache.org/viewvc?rev=1144690view=rev
 Log:
 Remove some more unnecessary code

 Removed:
tomcat/trunk/java/org/apache/catalina/startup/ClusterRuleSetFactory.java
 Modified:
tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
tomcat/trunk/webapps/docs/changelog.xml

 Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
 URL:
 http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=1144690r1=1144689r2=1144690view=diff

 ==
 --- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java (original)
 +++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Sat Jul  9
 16:05:42 2011
 @@ -36,6 +36,7 @@ import org.apache.catalina.LifecycleExce
  import org.apache.catalina.LifecycleState;
  import org.apache.catalina.Server;
  import org.apache.catalina.core.StandardServer;
 +import org.apache.catalina.ha.ClusterRuleSet;
  import org.apache.catalina.security.SecurityConfig;
  import org.apache.juli.ClassLoaderLogManager;
  import org.apache.tomcat.util.ExceptionUtils;
 @@ -373,13 +374,13 @@ public class Catalina {
 digester.addRuleSet(new EngineRuleSet(Server/Service/));
 digester.addRuleSet(new HostRuleSet(Server/Service/Engine/));
 digester.addRuleSet(new
 ContextRuleSet(Server/Service/Engine/Host/));
 -
  
 digester.addRuleSet(ClusterRuleSetFactory.getClusterRuleSet(Server/Service/Engine/Host/Cluster/));
 +digester.addRuleSet(new
 ClusterRuleSet(Server/Service/Engine/Host/Cluster/));
 digester.addRuleSet(new
 NamingRuleSet(Server/Service/Engine/Host/Context/));

 // When the 'engine' is found, set the parentClassLoader.
 digester.addRule(Server/Service/Engine,
  new SetParentClassLoaderRule(parentClassLoader));
 -
  
 digester.addRuleSet(ClusterRuleSetFactory.getClusterRuleSet(Server/Service/Engine/Cluster/));
 +digester.addRuleSet(new
 ClusterRuleSet(Server/Service/Engine/Cluster/));

 long t2=System.currentTimeMillis();
 if (log.isDebugEnabled())

 Modified: tomcat/trunk/webapps/docs/changelog.xml
 URL:
 http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144690r1=1144689r2=1144690view=diff

 ==
 --- tomcat/trunk/webapps/docs/changelog.xml (original)
 +++ tomcat/trunk/webapps/docs/changelog.xml Sat Jul  9 16:05:42 2011
 @@ -66,6 +66,14 @@
   /fix
 /changelog
   /subsection
 +  subsection name=Cluster
 +changelog
 +  update
 +Remove unnecessary serverl.xml parsing code for old cluster
 +implementation that does not ship as part of Tomcat 7. (markt)
 +  /update
 +/changelog
 +  /subsection
  /section
  section name=Tomcat 7.0.18 (markt) rtext=TBD
   subsection name=Catalina



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




-- 
Ivan


Re: svn commit: r1144690 - in /tomcat/trunk: java/org/apache/catalina/startup/Catalina.java java/org/apache/catalina/startup/ClusterRuleSetFactory.java webapps/docs/changelog.xml

2011-07-11 Thread Mark Thomas
On 11/07/2011 08:23, Ivan wrote:
 Hi, this changes brought a cycle dependency between the tomcat-catalina and
 tomcat-catalina-ha module, could you please help to fix it.

I'm not sure that is much of a problem. I'm wondering if we should drop
the separate catalina.ha.jar and just merge it into catalina.jar

Mark

 Thanks.
 
 2011/7/10 ma...@apache.org
 
 Author: markt
 Date: Sat Jul  9 16:05:42 2011
 New Revision: 1144690

 URL: http://svn.apache.org/viewvc?rev=1144690view=rev
 Log:
 Remove some more unnecessary code

 Removed:
tomcat/trunk/java/org/apache/catalina/startup/ClusterRuleSetFactory.java
 Modified:
tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
tomcat/trunk/webapps/docs/changelog.xml

 Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
 URL:
 http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=1144690r1=1144689r2=1144690view=diff

 ==
 --- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java (original)
 +++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Sat Jul  9
 16:05:42 2011
 @@ -36,6 +36,7 @@ import org.apache.catalina.LifecycleExce
  import org.apache.catalina.LifecycleState;
  import org.apache.catalina.Server;
  import org.apache.catalina.core.StandardServer;
 +import org.apache.catalina.ha.ClusterRuleSet;
  import org.apache.catalina.security.SecurityConfig;
  import org.apache.juli.ClassLoaderLogManager;
  import org.apache.tomcat.util.ExceptionUtils;
 @@ -373,13 +374,13 @@ public class Catalina {
 digester.addRuleSet(new EngineRuleSet(Server/Service/));
 digester.addRuleSet(new HostRuleSet(Server/Service/Engine/));
 digester.addRuleSet(new
 ContextRuleSet(Server/Service/Engine/Host/));
 -
  
 digester.addRuleSet(ClusterRuleSetFactory.getClusterRuleSet(Server/Service/Engine/Host/Cluster/));
 +digester.addRuleSet(new
 ClusterRuleSet(Server/Service/Engine/Host/Cluster/));
 digester.addRuleSet(new
 NamingRuleSet(Server/Service/Engine/Host/Context/));

 // When the 'engine' is found, set the parentClassLoader.
 digester.addRule(Server/Service/Engine,
  new SetParentClassLoaderRule(parentClassLoader));
 -
  
 digester.addRuleSet(ClusterRuleSetFactory.getClusterRuleSet(Server/Service/Engine/Cluster/));
 +digester.addRuleSet(new
 ClusterRuleSet(Server/Service/Engine/Cluster/));

 long t2=System.currentTimeMillis();
 if (log.isDebugEnabled())

 Modified: tomcat/trunk/webapps/docs/changelog.xml
 URL:
 http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144690r1=1144689r2=1144690view=diff

 ==
 --- tomcat/trunk/webapps/docs/changelog.xml (original)
 +++ tomcat/trunk/webapps/docs/changelog.xml Sat Jul  9 16:05:42 2011
 @@ -66,6 +66,14 @@
   /fix
 /changelog
   /subsection
 +  subsection name=Cluster
 +changelog
 +  update
 +Remove unnecessary serverl.xml parsing code for old cluster
 +implementation that does not ship as part of Tomcat 7. (markt)
 +  /update
 +/changelog
 +  /subsection
  /section
  section name=Tomcat 7.0.18 (markt) rtext=TBD
   subsection name=Catalina



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


 
 




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



Re: svn commit: r1144690 - in /tomcat/trunk: java/org/apache/catalina/startup/Catalina.java java/org/apache/catalina/startup/ClusterRuleSetFactory.java webapps/docs/changelog.xml

2011-07-11 Thread Ivan
Yes, merging the two components is one of the solutions. From other side, it
is something like a registry - provider scenario, not sure Tomcat will
support the functions like customized configurations in the server.xml in
the future, and this might be a place to begin it.

2011/7/11 Mark Thomas ma...@apache.org

 On 11/07/2011 08:23, Ivan wrote:
  Hi, this changes brought a cycle dependency between the tomcat-catalina
 and
  tomcat-catalina-ha module, could you please help to fix it.

 I'm not sure that is much of a problem. I'm wondering if we should drop
 the separate catalina.ha.jar and just merge it into catalina.jar

 Mark

  Thanks.
 
  2011/7/10 ma...@apache.org
 
  Author: markt
  Date: Sat Jul  9 16:05:42 2011
  New Revision: 1144690
 
  URL: http://svn.apache.org/viewvc?rev=1144690view=rev
  Log:
  Remove some more unnecessary code
 
  Removed:
 
  tomcat/trunk/java/org/apache/catalina/startup/ClusterRuleSetFactory.java
  Modified:
 tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
 tomcat/trunk/webapps/docs/changelog.xml
 
  Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
  URL:
 
 http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=1144690r1=1144689r2=1144690view=diff
 
 
 ==
  --- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
 (original)
  +++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Sat Jul
  9
  16:05:42 2011
  @@ -36,6 +36,7 @@ import org.apache.catalina.LifecycleExce
   import org.apache.catalina.LifecycleState;
   import org.apache.catalina.Server;
   import org.apache.catalina.core.StandardServer;
  +import org.apache.catalina.ha.ClusterRuleSet;
   import org.apache.catalina.security.SecurityConfig;
   import org.apache.juli.ClassLoaderLogManager;
   import org.apache.tomcat.util.ExceptionUtils;
  @@ -373,13 +374,13 @@ public class Catalina {
  digester.addRuleSet(new EngineRuleSet(Server/Service/));
  digester.addRuleSet(new HostRuleSet(Server/Service/Engine/));
  digester.addRuleSet(new
  ContextRuleSet(Server/Service/Engine/Host/));
  -
 
  
 digester.addRuleSet(ClusterRuleSetFactory.getClusterRuleSet(Server/Service/Engine/Host/Cluster/));
  +digester.addRuleSet(new
  ClusterRuleSet(Server/Service/Engine/Host/Cluster/));
  digester.addRuleSet(new
  NamingRuleSet(Server/Service/Engine/Host/Context/));
 
  // When the 'engine' is found, set the parentClassLoader.
  digester.addRule(Server/Service/Engine,
   new
 SetParentClassLoaderRule(parentClassLoader));
  -
 
  
 digester.addRuleSet(ClusterRuleSetFactory.getClusterRuleSet(Server/Service/Engine/Cluster/));
  +digester.addRuleSet(new
  ClusterRuleSet(Server/Service/Engine/Cluster/));
 
  long t2=System.currentTimeMillis();
  if (log.isDebugEnabled())
 
  Modified: tomcat/trunk/webapps/docs/changelog.xml
  URL:
 
 http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1144690r1=1144689r2=1144690view=diff
 
 
 ==
  --- tomcat/trunk/webapps/docs/changelog.xml (original)
  +++ tomcat/trunk/webapps/docs/changelog.xml Sat Jul  9 16:05:42 2011
  @@ -66,6 +66,14 @@
/fix
  /changelog
/subsection
  +  subsection name=Cluster
  +changelog
  +  update
  +Remove unnecessary serverl.xml parsing code for old cluster
  +implementation that does not ship as part of Tomcat 7. (markt)
  +  /update
  +/changelog
  +  /subsection
   /section
   section name=Tomcat 7.0.18 (markt) rtext=TBD
subsection name=Catalina
 
 
 
  -
  To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: dev-h...@tomcat.apache.org
 
 
 
 




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




-- 
Ivan


svn commit: r1145081 - /tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 09:19:59 2011
New Revision: 1145081

URL: http://svn.apache.org/viewvc?rev=1145081view=rev
Log:
Fix broken HTML

Modified:
tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp

Modified: tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp?rev=1145081r1=1145080r2=1145081view=diff
==
--- tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp (original)
+++ tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp Mon Jul 11 09:19:59 2011
@@ -21,16 +21,15 @@
   body
 h1Tag Plugin Examples - lt;c:if/h1
 
-hr
-/br
-a href=notes.htmlPlugin Introductory Notesfont font 
color=#FF/a
+hr/
 br/
-a href=howto.htmlBrief Instructions for Writing Pluginsfont 
color=#FF/a
+a href=notes.htmlPlugin Introductory Notes/a
+br/
+a href=howto.htmlBrief Instructions for Writing Plugins/a
 br/ br/
-hr
+hr/
 
-font color=#00/
-/br
+br/
 %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
 
 h3Set the test result to a variable/h3



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



svn commit: r1145083 - /tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 09:28:25 2011
New Revision: 1145083

URL: http://svn.apache.org/viewvc?rev=1145083view=rev
Log:
Ensure it is clear when tag isn't working

Modified:
tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp

Modified: tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp?rev=1145083r1=1145082r2=1145083view=diff
==
--- tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp (original)
+++ tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp Mon Jul 11 09:28:25 2011
@@ -38,7 +38,10 @@
 
 h3Conditionally execute the body/h3
 c:if test=${20}
-It's true that (20)!
+pIt's true that (20)! Working./p
+/c:if
+c:if test=${02}
+pIt's not true that (02)! Failed./p
 /c:if
   /body
 /html 



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



svn commit: r1145084 - /tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 09:29:28 2011
New Revision: 1145084

URL: http://svn.apache.org/viewvc?rev=1145084view=rev
Log:
Reduce variable scope to reduce testing issues

Modified:
tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp

Modified: tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp?rev=1145084r1=1145083r2=1145084view=diff
==
--- tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp (original)
+++ tomcat/trunk/webapps/examples/jsp/tagplugin/if.jsp Mon Jul 11 09:29:28 2011
@@ -33,7 +33,7 @@
 %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
 
 h3Set the test result to a variable/h3
-c:if test=${1==1} var=theTruth scope=session/
+c:if test=${1==1} var=theTruth scope=page/
 The result of testing for (1==1) is: ${theTruth}
 
 h3Conditionally execute the body/h3



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



svn commit: r1145086 - /tomcat/trunk/webapps/examples/jsp/tagplugin/foreach.jsp

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 09:31:09 2011
New Revision: 1145086

URL: http://svn.apache.org/viewvc?rev=1145086view=rev
Log:
Fix broken HTML

Modified:
tomcat/trunk/webapps/examples/jsp/tagplugin/foreach.jsp

Modified: tomcat/trunk/webapps/examples/jsp/tagplugin/foreach.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/tagplugin/foreach.jsp?rev=1145086r1=1145085r2=1145086view=diff
==
--- tomcat/trunk/webapps/examples/jsp/tagplugin/foreach.jsp (original)
+++ tomcat/trunk/webapps/examples/jsp/tagplugin/foreach.jsp Mon Jul 11 09:31:09 
2011
@@ -21,18 +21,15 @@
   body
 h1Tag Plugin Examples - lt;c:forEach/h1
 
-hr
-/br
-a href=notes.htmlPlugin Introductory Notesfont font 
color=#FF/
-a
+hr/
 br/
-a href=howto.htmlBrief Instructions for Writing Pluginsfont 
color=#
-FF/a
+a href=notes.htmlPlugin Introductory Notes/a
+br/
+a href=howto.htmlBrief Instructions for Writing Plugins/a
 br/ br/
-hr
+hr/
 
-font color=#00/
-/br
+br/
 
 %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
 %@ page import=java.util.Vector %



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



Re: svn commit: r1144833 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java webapps/docs/changelog.xml

2011-07-11 Thread Rainer Jung
On 11.07.2011 01:24, Konstantin Kolinko wrote:
 2011/7/10  rj...@apache.org:
 Author: rjung
 Date: Sun Jul 10 11:22:40 2011
 New Revision: 1144833

 URL: http://svn.apache.org/viewvc?rev=1144833view=rev
 Log:
 Another regression in 7.0.18: year number formatting
 in AccessLogValve is broken due to type yyy instead of .

 
 Nice catch.

Don't know why I did not notice that earlier. I looked at access log
lines a lot since that buggy change, but only noticed it yesterday.

 There is one more regression there:  month names are now localized
 and may be printed not in English, but in other languages.
 
 127.0.0.1 - - [09/июл/11:00:48:22 +0400] GET /examples/ HTTP/1.1 200 1156

Oha, getting fun here: I checked 7.0.16 (before the ALV change) with
default locale th_TH_TH, which changes about everything, including digits.

That will produce

- english months

- thai digits in request timestamp, but also in the default
  file suffix timestamp (rendered here as ?, so effectively
  breaking file rotation - but only since that locale is not fully
  available here).

I suggest we at least make the behaviour consistent:

- Change the defaults to en_US
- Allow to overwrite the locale used for formatting the lines in
  the access log *and also* the file sufix

Unfortunately I could find only one reference, that en_US support is
mandatory for a JVM:

http://java.sun.com/developer/technicalArticles/J2SE/locale/

Look for This list is quite short: English (U.S.).

If we wanted to make it bullet-proof, we could either switch to the
default locale completely, but that changes behaviour quite a lot as you
noticed, or use DateFormatSymbols to just fix the month names. That
would be the old behaviour with inconsistent formatting.

I suggest we use en_US if available, otherwise the default locale. In
any case make it overwritable by an attribute. That would give
consistent behaviour, which on most installations should be as good or
even better than before.

Regards,

Rainer


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



svn commit: r1145088 - /tomcat/trunk/webapps/examples/jsp/tagplugin/choose.jsp

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 09:32:32 2011
New Revision: 1145088

URL: http://svn.apache.org/viewvc?rev=1145088view=rev
Log:
Fix broken HTML

Modified:
tomcat/trunk/webapps/examples/jsp/tagplugin/choose.jsp

Modified: tomcat/trunk/webapps/examples/jsp/tagplugin/choose.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/tagplugin/choose.jsp?rev=1145088r1=1145087r2=1145088view=diff
==
--- tomcat/trunk/webapps/examples/jsp/tagplugin/choose.jsp (original)
+++ tomcat/trunk/webapps/examples/jsp/tagplugin/choose.jsp Mon Jul 11 09:32:32 
2011
@@ -21,19 +21,15 @@
   body
 h1Tag Plugin Examples - lt;c:choose/h1
 
-hr
-/br
-a href=notes.htmlPlugin Introductory Notesfont font 
color=#FF/
-a
+hr/
 br/
-a href=howto.htmlBrief Instructions for Writing Pluginsfont 
color=#000
-0
-FF/a
+a href=notes.htmlPlugin Introductory Notes/a
+br/
+a href=howto.htmlBrief Instructions for Writing Plugins/a
 br/ br/
-hr
+hr/
 
-font color=#00/
-/br
+br/
 
 %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
 
@@ -41,16 +37,16 @@ FF/a
   # ${index}: 
   c:choose
 c:when test=${index == 1}
-  One!/br
+  One!br/
 /c:when
 c:when test=${index == 4}
-  Four!/br
+  Four!br/
 /c:when
 c:when test=${index == 3}
-  Three!/br
+  Three!br/
 /c:when
 c:otherwise
-  Huh?/br
+  Huh?br/
 /c:otherwise
   /c:choose
 /c:forEach



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



svn commit: r1145093 - /tomcat/trunk/webapps/docs/changelog.xml

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 09:37:58 2011
New Revision: 1145093

URL: http://svn.apache.org/viewvc?rev=1145093view=rev
Log:
Update changelog for bz51490 fixes

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1145093r1=1145092r2=1145093view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 11 09:37:58 2011
@@ -99,6 +99,11 @@
 benefits and remaining risks when running under a security manager.
 (markt)
   /add
+  fix
+bug51490/bug: Correct broken HTML in JSP tag plugin examples and
+improve the lt;c:ifgt; example to make failures more obvious. Based 
on
+suggestions by Charles. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Other



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



DO NOT REPLY [Bug 51490] if.jsp has many bugs and c:if example not useful

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51490

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #6 from Mark Thomas ma...@apache.org 2011-07-11 09:39:26 UTC ---
The issues with the c:if examples have been fixed in trunk and will be included
in the next release.

I echo Konstantin's comments that diffs in the correct format are much easier
to work with than an entirely new file.

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

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



Re: svn commit: r1144833 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java webapps/docs/changelog.xml

2011-07-11 Thread Konstantin Kolinko
2011/7/11 Rainer Jung rainer.j...@kippdata.de:
 On 11.07.2011 01:24, Konstantin Kolinko wrote:
 2011/7/10  rj...@apache.org:
 Author: rjung
 Date: Sun Jul 10 11:22:40 2011
 New Revision: 1144833

 URL: http://svn.apache.org/viewvc?rev=1144833view=rev
 Log:
 Another regression in 7.0.18: year number formatting
 in AccessLogValve is broken due to type yyy instead of .


 Nice catch.

 Don't know why I did not notice that earlier. I looked at access log
 lines a lot since that buggy change, but only noticed it yesterday.

 There is one more regression there:  month names are now localized
 and may be printed not in English, but in other languages.

 127.0.0.1 - - [09/июл/11:00:48:22 +0400] GET /examples/ HTTP/1.1 200 1156

 Oha, getting fun here: I checked 7.0.16 (before the ALV change) with
 default locale th_TH_TH, which changes about everything, including digits.

 That will produce

 - english months

 - thai digits in request timestamp, but also in the default
  file suffix timestamp (rendered here as ?, so effectively
  breaking file rotation - but only since that locale is not fully
  available here).

 I suggest we at least make the behaviour consistent:

 - Change the defaults to en_US

I think it has to be en_US.

The javadoc of AccessLogValve says:
%t - Date and time, in Common Log Format format

I think that Common Log Format expects English months and digits.
http://httpd.apache.org/docs/current/logs.html#accesslog


 - Allow to overwrite the locale used for formatting the lines in
  the access log *and also* the file sufix

Maybe, but I think that nobody asked.

There is another enhancement on todo list:
provide encoding option for AccessLogValve,
like already done for FileHandler in JULI.


 Unfortunately I could find only one reference, that en_US support is
 mandatory for a JVM:

 http://java.sun.com/developer/technicalArticles/J2SE/locale/

 Look for This list is quite short: English (U.S.).

 If we wanted to make it bullet-proof, we could either switch to the
 default locale completely, but that changes behaviour quite a lot as you
 noticed, or use DateFormatSymbols to just fix the month names. That
 would be the old behaviour with inconsistent formatting.

 I suggest we use en_US if available, otherwise the default locale. In
 any case make it overwritable by an attribute. That would give
 consistent behaviour, which on most installations should be as good or
 even better than before.


Best regards,
Konstantin Kolinko

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



Re: Using juli DateFormatCache in AccessLogValve?

2011-07-11 Thread Konstantin Kolinko
2011/6/23 Rainer Jung rainer.j...@kippdata.de:
 Since OneLineFormatter now uses the DateFormatCache util class, and to
 prevent any dependency of juli form other packages that util class sits
 in juli, what do we think about using it also in AccessLogValve?

 At the moment the valve has a local copy as an inner class. Of course a
 dependency on juli is OK, because we have it most of the time for
 logging, but it is a bit strange, that this time it is for a utility
 class. What do you think about directly using the juli DateFormatCache
 in the AccessLogValve? Overall I think the benefits of having the code
 only once outweigh the strangeness of that kind of dependency.

 And yes, I removed a small generalization form the class when including
 it in juli, which I would thean add back to make the same class work for
 both uses.


I think it is OK.
Most of catalina classes already have dependency on
org.apache.juli.logging.Log, so the dependency between jars already
does exist, as you noted.


Things to watch for while implementing this:
1) The class should be present in both copies of tomcat-juli.jar: the
one provided in the default distribution and in the one provided as an
extra.
2) SecurityManager policies for tomcat-juli.jar do differ vs. other
Tomcat code. If the helper class tries to read some system properties,
such rules have to be added to the security policy file.

I think 1) and 2) are already OK for this specific case. I am
mentioning them here just as a reminder.

Best regards,
Konstantin Kolinko

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



Re: Distributable contexts and non-serializable session attributes

2011-07-11 Thread Konstantin Kolinko
2011/7/10 Rainer Jung rainer.j...@kippdata.de:
 I implemented an addition to DeltaManager which allows to filter which
 session attributes actually get replicated (not yet committed).

 This is useful, because many applications

 - use non-serializable session attributes, so
  it is not possible to simply replicate everything

 - do not actually need everything replicated, because they
  can bootstrap all they need from a login context if a filter
  detects, that a failover has happened.

 In these cases it can also help to reduce replication traffic a lot.

 Unfortunately I stu,bled into some code in StandardSession:

 public void setAttribute(String name, Object value, boolean notify) {
 ...
 if ((manager != null)  manager.getDistributable() 
  !(value instanceof Serializable))
    throw new IllegalArgumentException
        (sm.getString(standardSession.setAttribute.iae, name));
 ...
 }

 This means if you enable distributable, then you can no longer set any
 non-serializable session attribute. The code is not recent, it goes back
 to at least TC 3.3.

 I understand, that it is helpful to devs being informed about
 serialization/replication problems. But I think it is too strict to
 enforce this in StandardSession whch is the base class of all our
 cluster sessions and we always delegate to
 StandardSession.setAttribute() after some cluster specific handling.

 The SPEC says:

 The container must accept objects that implement the Serializable interface.
 - The container may choose to support storage of other designated
 objects in the
 HttpSession, such as references to Enterprise JavaBeans components and
 transactions.
 - Migration of sessions will be handled by container-specific facilities.
 The distributed servlet container must throw an IllegalArgumentException for
 objects where the container cannot support the mechanism necessary for
 migration
 of the session storing them.

 (and some more in 7.7.2).

 I think checking for serializability in StandardSession isn't good,
 because AFAIK StandardSession isn't used by any mechanism Tomcat
 supports to implement distributable.

 And in DeltaSession I would like to have the check optional, i.e. only
 check if the configuration wants the attribute to be replicated.

 By default all attributes will be replicated as is today, but by
 configuration one will be able to choose attributes to replicate using a
 regexp against the attribute name.

 Any remarks?


I think you are right and we can relax the requirement.
E.g. to delegate the check to some helper method that is overwritten
in DeltaSession or in other derived class.

Best regards,
Konstantin Kolinko

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



DO NOT REPLY [Bug 51496] New: NSIS - Warn that duplicate service name will result in install failure

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51496

 Bug #: 51496
   Summary: NSIS - Warn that duplicate service name will result in
install failure
   Product: Tomcat 7
   Version: trunk
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Packaging
AssignedTo: dev@tomcat.apache.org
ReportedBy: knst.koli...@gmail.com
Classification: Unclassified


It was noticed on the users list, that it is not possible to install two copies
of Tomcat with the same service name.

http://markmail.org/message/rcmayrkydamywbpw

It would be preferable to check for a duplicate name before starting the
installation, but I do not know of a way to check existing service names in
installer.

Is there an API method, or maybe we can look up in the Registry?


It looks that when this error occurs it is too late to go back to the
configuration pages, or to specify a different name. At least we can tweak text
of the message that appears. The current text is:

Failed to install Tomcat7 service.
Check your settings and permissions.
Ignore and continue anyway (not recommended)? abort|retry|ignore

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

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



Re: 7.0.18 installer does not work under windows with a custom service name

2011-07-11 Thread Konstantin Kolinko
2011/7/11 etienne massip etienne.mas...@gmail.com:
 It is, but it would have been accurate to tell me that the service did
 already exist instead of leading me on permission issues.

I filed
https://issues.apache.org/bugzilla/show_bug.cgi?id=51496

Best regards,
Konstantin Kolinko

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



svn commit: r1145137 - in /tomcat/trunk/webapps/docs: config/filter.xml config/valve.xml manager-howto.xml

2011-07-11 Thread rjung
Author: rjung
Date: Mon Jul 11 12:16:36 2011
New Revision: 1145137

URL: http://svn.apache.org/viewvc?rev=1145137view=rev
Log:
Replace tt by code in docs.
The physical markup tt was only
used in few places. Mostly we use
the logical markup code.

Modified:
tomcat/trunk/webapps/docs/config/filter.xml
tomcat/trunk/webapps/docs/config/valve.xml
tomcat/trunk/webapps/docs/manager-howto.xml

Modified: tomcat/trunk/webapps/docs/config/filter.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/filter.xml?rev=1145137r1=1145136r2=1145137view=diff
==
--- tomcat/trunk/webapps/docs/config/filter.xml (original)
+++ tomcat/trunk/webapps/docs/config/filter.xml Mon Jul 11 12:16:36 2011
@@ -167,8 +167,8 @@
 ExpiresFilter is a Java Servlet API port of a
 href=http://httpd.apache.org/docs/2.2/mod/mod_expires.html;Apache
 mod_expires/a.
-This filter controls the setting of the ttExpires/tt HTTP header and 
the
-ttmax-age/tt directive of the ttCache-Control/tt HTTP header in
+This filter controls the setting of the codeExpires/code HTTP header 
and the
+codemax-age/code directive of the codeCache-Control/code HTTP 
header in
 server responses. The expiration date can set to be relative to either the
 time the source file was last modified, or to the time of the client 
access.
 /p
@@ -181,7 +181,7 @@
 be obtained from the source.
 /p
 p
-To modify ttCache-Control/tt directives other than ttmax-age/tt 
(see
+To modify codeCache-Control/code directives other than 
codemax-age/code (see
 a href=http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9; 
RFC
 2616 section 14.9/a), you can use other servlet filters or a
 href=http://httpd.apache.org/docs/2.2/mod/mod_headers.html; Apache Httpd
@@ -192,7 +192,7 @@
 
   subsection name=Basic configuration sample
 p
-Basic configuration to add 'ttExpires/tt' and 'ttCache-Control: 
max-age=/tt' 
+Basic configuration to add 'codeExpires/code' and 
'codeCache-Control: max-age=/code' 
 headers to images, css and javascript.
 /p
 
@@ -226,7 +226,7 @@
   
   subsection name=Alternate Syntax
 p
-The ttExpiresDefault/tt and ttExpiresByType/tt directives can also 
be
+The codeExpiresDefault/code and codeExpiresByType/code directives 
can also be
 defined in a more readable syntax of the form:
 /p
 
@@ -247,25 +247,25 @@
 lt;/init-paramgt;
 /source
 p
-where ttlt;basegt;/tt is one of:
+where codelt;basegt;/code is one of:
 ul
-littaccess/tt/li
-littnow/tt (equivalent to #x27;ttaccess/tt#x27;)/li
-littmodification/tt/li
+licodeaccess/code/li
+licodenow/code (equivalent to #x27;codeaccess/code#x27;)/li
+licodemodification/code/li
 /ul
 /p
 p
-The ttplus/tt keyword is optional. ttlt;numgt;/tt should be an
-integer value (acceptable to ttInteger.parseInt()/tt), and
-ttlt;typegt;/tt is one of:
+The codeplus/code keyword is optional. codelt;numgt;/code should 
be an
+integer value (acceptable to codeInteger.parseInt()/code), and
+codelt;typegt;/code is one of:
 ul
-littyears/tt/li
-littmonths/tt/li
-littweeks/tt/li
-littdays/tt/li
-litthours/tt/li
-littminutes/tt/li
-littseconds/tt/li
+licodeyears/code/li
+licodemonths/code/li
+licodeweeks/code/li
+licodedays/code/li
+licodehours/code/li
+licodeminutes/code/li
+licodeseconds/code/li
 /ul
 For example, any of the following directives can be used to make documents
 expire 1 month after being accessed, by default:
@@ -289,7 +289,7 @@
 /source
 p
 The expiry time can be fine-tuned by adding several #x27;
-ttlt;numgt; lt;typegt;/tt#x27; clauses:
+codelt;numgt; lt;typegt;/code#x27; clauses:
 /p
 
 source
@@ -304,7 +304,7 @@ The expiry time can be fine-tuned by add
 lt;/init-paramgt;
 /source
 p
-Note that if you use a modification date based setting, the 
ttExpires/tt
+Note that if you use a modification date based setting, the 
codeExpires/code
 header will strongnot/strong be added to content that does not come 
from
 a file on disk. This is due to the fact that there is no modification time
 for such content.
@@ -313,21 +313,21 @@ The expiry time can be fine-tuned by add
   
   subsection name=Expiration headers generation eligibility
 p
-A response is eligible to be enriched by ttExpiresFilter/tt if :
+A response is eligible to be enriched by codeExpiresFilter/code if :
 ol
-lino expiration header is defined (ttExpires/tt header or the
-ttmax-age/tt directive of the ttCache-Control/tt header),/li
+lino expiration header is defined (codeExpires/code header or the
+codemax-age/code directive of the codeCache-Control/code 
header),/li
 lithe response status code is not excluded by the directive
-

svn commit: r1145160 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContextValve.java webapps/docs/changelog.xml

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 13:05:30 2011
New Revision: 1145160

URL: http://svn.apache.org/viewvc?rev=1145160view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51494
Prevent an NPE when a long running request completes if the associated web 
application was destroyed while the request was processing

Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java?rev=1145160r1=1145159r2=1145160view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java Mon 
Jul 11 13:05:30 2011
@@ -180,7 +180,12 @@ final class StandardContextValve
 // place
 if (!(request.isAsync() || (asyncAtStart  request.getAttribute(
 RequestDispatcher.ERROR_EXCEPTION) != null))) {
-context.fireRequestDestroyEvent(request);
+// Protect against NPEs if context was destroyed during a long
+// running request.
+StandardContext c = context;
+if (c != null  c.getState().isAvailable()) {
+context.fireRequestDestroyEvent(request);
+}
 }
 }
 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1145160r1=1145159r2=1145160view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 11 13:05:30 2011
@@ -62,6 +62,11 @@
   fix
 Fix regression in year number formatting for AccessLogValve. (rjung)
   /fix
+  fix
+bug51494/bug: Prevent an NPE when a long running request completes
+if the associated web application was destroyed while the request was
+processing. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



svn commit: r1145165 - /tomcat/trunk/webapps/docs/

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 13:16:29 2011
New Revision: 1145165

URL: http://svn.apache.org/viewvc?rev=1145165view=rev
Log:
Ignore doc copied in during build process

Modified:
tomcat/trunk/webapps/docs/   (props changed)

Propchange: tomcat/trunk/webapps/docs/
--
--- svn:ignore (added)
+++ svn:ignore Mon Jul 11 13:16:29 2011
@@ -0,0 +1 @@
+jdbc-pool.xml



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



svn commit: r1145166 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java java/org/apache/catalina/valves/LocalStrings.properties webapps/docs/changelog.xml webapps/docs/config/valv

2011-07-11 Thread rjung
Author: rjung
Date: Mon Jul 11 13:17:09 2011
New Revision: 1145166

URL: http://svn.apache.org/viewvc?rev=1145166view=rev
Log:
Allow choosing a locale for timestamp formatting
in AccessLogValve. Only relevant to timestamps
explicitely given by SimpleDateFormat syntax.

Also: use Locale.US for CLF and for timestamps
that are part of the access log file name.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/valve.xml

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1145166r1=1145165r2=1145166view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Mon Jul 11 
13:17:09 2011
@@ -32,6 +32,7 @@ import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.TimeZone;
 
 import javax.servlet.ServletException;
@@ -249,6 +250,12 @@ public class AccessLogValve extends Valv
  * format) and a HashMap of caches for additional formats used by
  * SimpleDateFormat./p
  *
+ * pAlthough the cache supports specifying a locale when retrieving a
+ * formatted timestamp, each format will always use the locale given
+ * when the format was first used. New locales can only be used for new 
formats.
+ * The CLF format will always be formatted using the locale
+ * codeen_US/code./p
+ *
  * pThe cache is not threadsafe. It can be used without synchronization
  * via thread local instances, or with synchronization as a global 
cache./p
  *
@@ -285,21 +292,34 @@ public class AccessLogValve extends Valv
 
 private Cache parent = null;
 
+private Cache(Cache parent) {
+this(null, parent);
+}
+
 private Cache(String format, Cache parent) {
+this(format, null, parent);
+}
+
+private Cache(String format, Locale loc, Cache parent) {
 cache = new String[cacheSize];
 for (int i = 0; i  cacheSize; i++) {
 cache[i] = null;
 }
+if (loc == null) {
+loc = cacheDefaultLocale;
+}
 if (format == null) {
 isCLF = true;
 format = cLFFormat;
+formatter = new SimpleDateFormat(format, Locale.US);
+} else {
+formatter = new SimpleDateFormat(format, loc);
 }
-formatter = new SimpleDateFormat(format);
 formatter.setTimeZone(TimeZone.getDefault());
 this.parent = parent;
 }
 
-private String getFormat(long time) {
+private String getFormatInternal(long time) {
 
 long seconds = time / 1000;
 
@@ -349,7 +369,7 @@ public class AccessLogValve extends Valv
  * parent cache or locally. */
 if (parent != null) {
 synchronized(parent) {
-previousFormat = parent.getFormat(time);
+previousFormat = parent.getFormatInternal(time);
 }
 } else {
 currentDate.setTime(time);
@@ -372,23 +392,25 @@ public class AccessLogValve extends Valv
 /* Number of cached entries */
 private int cacheSize = 0;
 
+private Locale cacheDefaultLocale;
 private DateFormatCache parent;
 private Cache cLFCache;
 private HashMapString, Cache formatCache = new HashMapString, 
Cache();
 
-private DateFormatCache(int size, DateFormatCache parent) {
+private DateFormatCache(int size, Locale loc, DateFormatCache parent) {
 cacheSize = size;
+cacheDefaultLocale = loc;
 this.parent = parent;
 Cache parentCache = null;
 if (parent != null) {
 synchronized(parent) {
-parentCache = parent.getCache(null);
+parentCache = parent.getCache(null, null);
 }
 }
-cLFCache = new Cache(null, parentCache);
+cLFCache = new Cache(parentCache);
 }
 
-private Cache getCache(String format) {
+private Cache getCache(String format, Locale loc) {
 Cache cache;
 if (format == null) {
 cache = cLFCache;
@@ -398,19 +420,22 @@ public class AccessLogValve extends Valv
 Cache parentCache = null;
   

Re: svn commit: r1144833 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java webapps/docs/changelog.xml

2011-07-11 Thread Rainer Jung
On 11.07.2011 12:35, Konstantin Kolinko wrote:
 2011/7/11 Rainer Jung rainer.j...@kippdata.de:
 On 11.07.2011 01:24, Konstantin Kolinko wrote:

 I suggest we at least make the behaviour consistent:

 - Change the defaults to en_US
 
 I think it has to be en_US.

Right. CLF will now always use en_US. Fortunately the Java 6 javadocs
include the information, that Locale.US always has to exist.

I also use Locale.US for formatting the timestamp that is part of the
file name. That seems to be consistent with timestamps in other Tomcat
log file names.

 - Allow to overwrite the locale used for formatting the lines in
  the access log
 
 Maybe, but I think that nobody asked.

Committed in r1145166. By default all timestamps configured using an
explicit SimpleDateFormat %{xxx}t will be formatted using the default
locale. That is similar to e.g. timestamps contained in other log files.

 There is another enhancement on todo list:
 provide encoding option for AccessLogValve,
 like already done for FileHandler in JULI.

I guess that is https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

The need for it isn't very convincing, at least after only looking at
bugzilla.

Regards,

Rainer

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



Re: Using juli DateFormatCache in AccessLogValve?

2011-07-11 Thread Rainer Jung
On 11.07.2011 13:19, Konstantin Kolinko wrote:
 2011/6/23 Rainer Jung rainer.j...@kippdata.de:
 Since OneLineFormatter now uses the DateFormatCache util class, and to
 prevent any dependency of juli form other packages that util class sits
 in juli, what do we think about using it also in AccessLogValve?

 At the moment the valve has a local copy as an inner class. Of course a
 dependency on juli is OK, because we have it most of the time for
 logging, but it is a bit strange, that this time it is for a utility
 class. What do you think about directly using the juli DateFormatCache
 in the AccessLogValve? Overall I think the benefits of having the code
 only once outweigh the strangeness of that kind of dependency.

 And yes, I removed a small generalization form the class when including
 it in juli, which I would thean add back to make the same class work for
 both uses.

 
 I think it is OK.
 Most of catalina classes already have dependency on
 org.apache.juli.logging.Log, so the dependency between jars already
 does exist, as you noted.

OK, especially the AccessLogValve already uses juli.

 Things to watch for while implementing this:
 1) The class should be present in both copies of tomcat-juli.jar: the
 one provided in the default distribution and in the one provided as an
 extra.
 2) SecurityManager policies for tomcat-juli.jar do differ vs. other
 Tomcat code. If the helper class tries to read some system properties,
 such rules have to be added to the security policy file.
 
 I think 1) and 2) are already OK for this specific case. I am
 mentioning them here just as a reminder.

Thanks! Will check after implementing.

I will postpone this refactoring - using a common class for juli and
AccessLogValve - after 7.0.19 to allow for more testing. There's no real
problem here at the moment, just optimization. The localization issue
you noted for the AccessLogValve is not a problem for juli, because the
log files are expected to be written in the default locale.

Regards,

Rainer

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



Re: Distributable contexts and non-serializable session attributes

2011-07-11 Thread Rainer Jung
On 10.07.2011 23:11, Filip Hanik - Dev Lists wrote:
 go ahead add it in, if you add in a flag to toggle the behavior, and the
 flag is defaulted to today's behavior. you're safe, and you give users
 an option

Thanks for the feedback. I will go with Konstantin's suggestion of
making it overwritable by any extension of StandardSession via putting
the check in a protected method.

The default impl will be unchanged, but DeltaSession can do something else.

Again by default DeltaSession will just call super, but when the
attribute replication filtering is on, it will only check if the
attribute matches the filter.

And now on to hacking ...

Mark: no need to wait for that w.r.t. 7.0.19.

Regards,

Rainer



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



Re: Distributable contexts and non-serializable session attributes

2011-07-11 Thread Rainer Jung
On 11.07.2011 13:41, Konstantin Kolinko wrote:
 2011/7/10 Rainer Jung rainer.j...@kippdata.de:

 I think checking for serializability in StandardSession isn't good,
 because AFAIK StandardSession isn't used by any mechanism Tomcat
 supports to implement distributable.

 And in DeltaSession I would like to have the check optional, i.e. only
 check if the configuration wants the attribute to be replicated.

 By default all attributes will be replicated as is today, but by
 configuration one will be able to choose attributes to replicate using a
 regexp against the attribute name.

 Any remarks?

 
 I think you are right and we can relax the requirement.
 E.g. to delegate the check to some helper method that is overwritten
 in DeltaSession or in other derived class.

Thanks, will do!

Regards,

Rainer


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



Re: Distributable contexts and non-serializable session attributes

2011-07-11 Thread Mark Thomas
On 11/07/2011 14:50, Rainer Jung wrote:
 On 10.07.2011 23:11, Filip Hanik - Dev Lists wrote:
 go ahead add it in, if you add in a flag to toggle the behavior, and the
 flag is defaulted to today's behavior. you're safe, and you give users
 an option
 
 Thanks for the feedback. I will go with Konstantin's suggestion of
 making it overwritable by any extension of StandardSession via putting
 the check in a protected method.
 
 The default impl will be unchanged, but DeltaSession can do something else.
 
 Again by default DeltaSession will just call super, but when the
 attribute replication filtering is on, it will only check if the
 attribute matches the filter.
 
 And now on to hacking ...
 
 Mark: no need to wait for that w.r.t. 7.0.19.

ack.

I'm still working my way through the issues I do need to fix for 7.0.19.
Next stop, the TCK failure.

Mark



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



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

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 14:06:38 2011
New Revision: 1145183

URL: http://svn.apache.org/viewvc?rev=1145183view=rev
Log:
add second patch that addressed review comments (I am assuming Mark's vote for 
it)
vote

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=1145183r1=1145182r2=1145183view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Jul 11 14:06:38 2011
@@ -237,5 +237,6 @@ PATCHES PROPOSED TO BACKPORT:
   Handle Gzip messages larger than the default buffer size
   Based on a patch by Christian Stöber
   http://svn.apache.org/viewvc?rev=1143134view=rev (GzipInterceptor.java only)
-  +1: markt
+  http://svn.apache.org/viewvc?rev=1143150view=rev
+  +1: markt, kkolinko
   -1:



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



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

2011-07-11 Thread Mark Thomas
On 11/07/2011 15:06, kkoli...@apache.org wrote:
 Author: kkolinko
 Date: Mon Jul 11 14:06:38 2011
 New Revision: 1145183
 
 URL: http://svn.apache.org/viewvc?rev=1145183view=rev
 Log:
 add second patch that addressed review comments (I am assuming Mark's vote 
 for it)
 vote

Fine with me.

Mark



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



svn propchange: r1137996 - svn:log

2011-07-11 Thread kkolinko
Author: kkolinko
Revision: 1137996
Modified property: svn:log

Modified: svn:log at Mon Jul 11 14:10:52 2011
--
--- svn:log (original)
+++ svn:log Mon Jul 11 14:10:52 2011
@@ -1,2 +1,2 @@
 Avoid NullPointerException in JULI FileHandler if formatter is misconfigured
-Fixes https://issues.apache.org/bugzilla/post_bug.cgi
+Fixes https://issues.apache.org/bugzilla/show_bug.cgi?id=51403


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



svn commit: r1145186 - /tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java

2011-07-11 Thread rjung
Author: rjung
Date: Mon Jul 11 14:18:32 2011
New Revision: 1145186

URL: http://svn.apache.org/viewvc?rev=1145186view=rev
Log:
Fix javadoc.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1145186r1=1145185r2=1145186view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Mon Jul 11 
14:18:32 2011
@@ -779,7 +779,7 @@ public class AccessLogValve extends Valv
  * as long as the AccessLogValve has not logged anything. Changing
  * the locale later can lead to inconsistent formatting.
  *
- * @param locale The locale to use.
+ * @param localeName The locale to use.
  */
 public void setLocale(String localeName) {
 this.localeName = localeName;



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



svn commit: r1145188 - in /tomcat/tc6.0.x/trunk: ./ STATUS.txt java/org/apache/juli/FileHandler.java webapps/docs/changelog.xml

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 14:19:17 2011
New Revision: 1145188

URL: http://svn.apache.org/viewvc?rev=1145188view=rev
Log:
Avoid NullPointerException in JULI FileHandler if formatter is misconfigured
Fixes https://issues.apache.org/bugzilla/show_bug.cgi?id=51403

Modified:
tomcat/tc6.0.x/trunk/   (props changed)
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/juli/FileHandler.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc6.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 11 14:19:17 2011
@@ -1 +1 @@
-/tomcat/trunk:601180,606992,612607,630314,640888,652744,653247,666232,673796,673820,677910,683969,683982,684001,684081,684234,684269-684270,685177,687503,687645,689402,690781,691392,691805,692748,693378,694992,695053,695311,696780,696782,698012,698227,698236,698613,699427,699634,701355,709294,709811,709816,710063,710066,710125,710205,711126,711600,712461,712467,713953,714002,718360,719119,719124,719602,719626,719628,720046,720069,721040,721286,721708,721886,723404,723738,726052,727303,728032,728768,728947,729057,729567,729569,729571,729681,729809,729815,729934,730250,730590,731651,732859,732863,734734,740675,740684,742677,742697,742714,744160,744238,746321,746384,746425,747834,747863,748344,750258,750291,750921,751286-751287,751289,751295,752323,753039,757335,757774,758249,758365,758596,758616,758664,759074,761601,762868,762929,762936-762937,763166,763183,763193,763228,763262,763298,763302,763325,763599,763611,763654,763681,763706,764985,764997,765662,768335,769979,770716,77
 
0809,770876,772872,776921,776924,776935,776945,777464,777466,777576,777625,778379,778523-778524,781528,781779,782145,782791,783316,783696,783724,783756,783762,783766,783863,783934,784453,784602,784614,785381,785688,785768,785859,786468,786487,786490,786496,786667,787627,787770,787985,789389,790405,791041,791184,791194,791224,791243,791326,791328,791789,792740,793372,793757,793882,793981,794082,794673,794822,795043,795152,795210,795457,795466,797168,797425,797596,797607,802727,802940,804462,804544,804734,805153,809131,809603,810916,810977,812125,812137,812432,813001,813013,813866,814180,814708,814876,815972,816252,817442,817822,819339,819361,820110,820132,820874,820954,821397,828196,828201,828210,828225,828759,830378-830379,830999,831106,831774,831785,831828,831850,831860,832214,832218,833121,833545,834047,835036,835336,836405,881396,881412,883130,883134,883146,883165,883177,883362,883565,884341,885038,885231,885241,885260,885901,885991,886019,888072,889363,889606,889716,8901
 
39,890265,890349-890350,890417,891185-891187,891583,892198,892341,892415,892464,892555,892812,892814,892817,892843,892887,893321,893493,894580,894586,894805,894831,895013,895045,895057,895191,895392,895703,896370,896384,897380-897381,897776,898126,898256,898468,898527,898555,898558,898718,898836,898906,899284,899348,899420,899653,899769-899770,899783,899788,899792,899916,899918-899919,899935,899949,903916,905020,905151,905722,905728,905735,907311,907513,907538,907652,907819,907825,907864,908002,908721,908754,908759,909097,909206,909212,909525,909636,909869,909875,909887,910266,910370,910442,910471,910485,910974,915226,915737,915861,916097,916141,916157,916170,917598,917633,918093,918489,918594,918684,918787,918792,918799,918803,918885,919851,919914,920025,920055,920298,920449,920596,920824,920840,921444,922010,926716,927062,927621,928482,928695,928732,928798,931709,932357,932967,935105,935983,939491,939551,940064,941356,941463,943112,944409,944416,945231,945808,945835,945841
 
,946686,948057,950164,950596,950614,950851,950905,951615,953434,954435,955648,955655,956832,957130,957830,958192,960701,961948,962865,962872,962881,962900,963106,963865,963868,964614,966177-966178,966292,966692,966863,981815,988448,991837,993042,1001955,1002185,1002263,1002274,1002349,1002359,1002362,1002481,1002514,1003461,1003481,1003488,1003556,1003572,1003581,1003861,1004393,1004409,1004415,1004868-1004869,1004912,1005452,1005467,1005647,1005802,1022120,1022134,1022323,1022415,1022606,1022623,1024224,1024251,1026042,1026784,1026912,1026920,1029767,1033415,1033448,1033842,1033897,1037715,1037794,1037887,1037924,1038041,1042022,1042029,1042447,1042452,1042494,1044944,1044987,1050249,1055055,1055236,1055458,1055975,1056264,1056828,1056889,1059881,1061412,1061442,1061446,1062398,1064652,1066244,1067039,1067139,1069824,1070139,1070420,1070609,1072042,1075458,1076212,1078409,1078412,1079801,1081334,1088179,1088460,1094069,1094089,1097899,1099575,1099586,1099772,1099789,1100145
 ,1100822,1101094,1101144,1124680,1130774,1141104

DO NOT REPLY [Bug 51403] Avoid NullPointerException in JULI FileHandler if formatter is misconfigured

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51403

--- Comment #2 from Konstantin Kolinko knst.koli...@gmail.com 2011-07-11 
14:20:59 UTC ---
Fixed in 6.0 in r1145188 and will be in 6.0.33

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

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



Re: Distributable contexts and non-serializable session attributes

2011-07-11 Thread Christopher Schultz
Rainer,

On 7/10/2011 3:38 PM, Rainer Jung wrote:
 Unfortunately I stumbled into some code in StandardSession:
 
 public void setAttribute(String name, Object value, boolean notify) {
 ...
 if ((manager != null)  manager.getDistributable() 
   !(value instanceof Serializable))
 throw new IllegalArgumentException
 (sm.getString(standardSession.setAttribute.iae, name));
 ...
 }
 
 This means if you enable distributable, then you can no longer set any
 non-serializable session attribute. The code is not recent, it goes back
 to at least TC 3.3.

 I think checking for serializability in StandardSession isn't good,
 because AFAIK StandardSession isn't used by any mechanism Tomcat
 supports to implement distributable.
 
 And in DeltaSession I would like to have the check optional, i.e. only
 check if the configuration wants the attribute to be replicated.
 
 By default all attributes will be replicated as is today, but by
 configuration one will be able to choose attributes to replicate using a
 regexp against the attribute name.

+1

-chris



signature.asc
Description: OpenPGP digital signature


svn commit: r1145200 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java java/org/apache/catalina/valves/LocalStrings.properties webapps/docs/changelog.xml webapps/docs/config/valv

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 15:13:13 2011
New Revision: 1145200

URL: http://svn.apache.org/viewvc?rev=1145200view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46252
Allow to specify character set to be used to write the access log in 
AccessLogValve.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/valve.xml

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1145200r1=1145199r2=1145200view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Mon Jul 11 
15:13:13 2011
@@ -21,10 +21,13 @@ package org.apache.catalina.valves;
 
 import java.io.BufferedWriter;
 import java.io.File;
-import java.io.FileWriter;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
 import java.net.InetAddress;
+import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -49,6 +52,7 @@ import org.apache.coyote.RequestInfo;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.ExceptionUtils;
+import org.apache.tomcat.util.buf.B2CConverter;
 
 
 /**
@@ -518,7 +522,14 @@ public class AccessLogValve extends Valv
  * log file name suffix.
  */
 protected Locale locale = Locale.getDefault();
-
+
+/**
+ * Character set used by the log file. If it is codenull/code, the
+ * system default character set will be used. An empty string will be
+ * treated as codenull/code when this property is assigned.
+ */
+protected String encoding = null;
+
 /**
  * Array of AccessLogElement, they will be used to make log message.
  */
@@ -786,6 +797,29 @@ public class AccessLogValve extends Valv
 locale = findLocale(localeName, locale);
 }
 
+/**
+ * Return the character set name that is used to write the log file.
+ *
+ * @return Character set name, or codenull/code if the system default
+ *  character set is used.
+ */
+public String getEncoding() {
+return encoding;
+}
+
+/**
+ * Set the character set that is used to write the log file.
+ * 
+ * @param encoding The name of the character set.
+ */
+public void setEncoding(String encoding) {
+if (encoding != null  encoding.length()  0) {
+this.encoding = encoding;
+} else {
+this.encoding = null;
+}
+}
+
 // - Public Methods
 
 /**
@@ -984,9 +1018,22 @@ public class AccessLogValve extends Valv
 pathname = dir.getAbsolutePath() + File.separator + prefix
 + suffix;
 }
-writer = new PrintWriter(new BufferedWriter(new FileWriter(
-pathname, true), 128000), false);
-
+Charset charset = null;
+if (encoding != null) {
+try {
+charset = B2CConverter.getCharset(encoding);
+} catch (UnsupportedEncodingException ex) {
+log.error(sm.getString(
+accessLogValve.unsupportedEncoding, encoding), 
ex);
+}
+}
+if (charset == null) {
+charset = Charset.defaultCharset();
+}
+writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
+new FileOutputStream(pathname, true), charset), 128000),
+false);
+
 currentLogFile = new File(pathname);
 } catch (IOException e) {
 writer = null;

Modified: tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties?rev=1145200r1=1145199r2=1145200view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties Mon 
Jul 11 15:13:13 2011
@@ -26,6 +26,7 @@ accessLogValve.closeFail=Failed to close
 accessLogValve.openDirFail=Failed to create directory [{0}] for access logs
 accessLogValve.rotateFail=Failed to rotate access log
 accessLogValve.invalidLocale=Failed to set locale to [{0}]
+accessLogValve.unsupportedEncoding=Failed to set encoding 

DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

--- Comment #2 from Konstantin Kolinko knst.koli...@gmail.com 2011-07-11 
15:16:40 UTC ---
Implemented in 7.0 with r11145200 and will be in 7.0.19.

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

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



Re: svn commit: r1144833 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java webapps/docs/changelog.xml

2011-07-11 Thread Konstantin Kolinko
2011/7/11 Rainer Jung rainer.j...@kippdata.de:

 There is another enhancement on todo list:
 provide encoding option for AccessLogValve,
 like already done for FileHandler in JULI.

 I guess that is https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

 The need for it isn't very convincing, at least after only looking at
 bugzilla.

I implemented BZ 46252.
The motivation is that if you use some custom locale there is a chance
that the symbols that it produces wouldn't be supported by the default
charset, thus without that option you might end with  '???' for a
month name.


BTW,  ExtendedAccessLogValve#ElementTimestampStruct probably will have
the same issue with locales. I have not tested it, though.

Best regards,
Konstantin Kolinko

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



svn commit: r1145207 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 15:39:47 2011
New Revision: 1145207

URL: http://svn.apache.org/viewvc?rev=1145207view=rev
Log:
Move AccessLogValve messages to a separate section and add a comment. No 
functional change.
This is to simplify a patch that will follow.
CTR

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties?rev=1145207r1=1145206r2=1145207view=diff
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/LocalStrings.properties 
Mon Jul 11 15:39:47 2011
@@ -13,8 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-accessLogValve.alreadyStarted=Access Logger has already been started
-accessLogValve.notStarted=Access Logger has not yet been started
 semaphoreValve.alreadyStarted=Semaphore valve has already been started
 semaphoreValve.notStarted=Semaphore valve has not yet been started
 certificatesValve.alreadyStarted=Certificates Valve has already been started
@@ -29,6 +27,10 @@ jdbcAccessLogValve.close=Exception closi
 cometConnectionManagerValve.event=Exception processing event
 cometConnectionManagerValve.listenerEvent=Exception processing session 
listener event
 
+# Access log valve
+accessLogValve.alreadyStarted=Access Logger has already been started
+accessLogValve.notStarted=Access Logger has not yet been started
+
 # Error report valve
 errorReportValve.errorReport=Error report
 errorReportValve.statusHeader=HTTP Status {0} - {1}



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



svn commit: r1145209 - in /tomcat/trunk: java/org/apache/tomcat/jni/Library.java java/org/apache/tomcat/util/net/AprEndpoint.java webapps/docs/changelog.xml webapps/docs/config/http.xml

2011-07-11 Thread rjung
Author: rjung
Date: Mon Jul 11 15:44:10 2011
New Revision: 1145209

URL: http://svn.apache.org/viewvc?rev=1145209view=rev
Log:
BZ 51477: Support all SSL protocol combinations in the
APR/native connector.

This only works when using the native library
version 1.1.21 or later which is not yet released.

Older tcnative versions will use an unchanged
config parser. Otherwise non-supported protocol
combinations would be unnoticed.

For easier review of the changes in AprEndpoint
use svn -x -w to ignore white space.

Modified:
tomcat/trunk/java/org/apache/tomcat/jni/Library.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/http.xml

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Library.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Library.java?rev=1145209r1=1145208r2=1145209view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/jni/Library.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Library.java Mon Jul 11 15:44:10 
2011
@@ -102,6 +102,8 @@ public final class Library {
 public static int TCN_PATCH_VERSION  = 0;
 /* TCN_IS_DEV_VERSION */
 public static int TCN_IS_DEV_VERSION = 0;
+/* TCN_FULL_VERSION */
+public static int TCN_FULL_VERSION   = 0;
 /* APR_MAJOR_VERSION */
 public static int APR_MAJOR_VERSION  = 0;
 /* APR_MINOR_VERSION */
@@ -178,6 +180,9 @@ public final class Library {
 TCN_MINOR_VERSION  = version(0x02);
 TCN_PATCH_VERSION  = version(0x03);
 TCN_IS_DEV_VERSION = version(0x04);
+TCN_FULL_VERSION   = TCN_MAJOR_VERSION * 1000 +
+ TCN_MINOR_VERSION * 100 +
+ TCN_PATCH_VERSION;
 APR_MAJOR_VERSION  = version(0x11);
 APR_MINOR_VERSION  = version(0x12);
 APR_PATCH_VERSION  = version(0x13);

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1145209r1=1145208r2=1145209view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Mon Jul 11 
15:44:10 2011
@@ -471,24 +471,52 @@ public class AprEndpoint extends Abstrac
 }
 
 // SSL protocol
-int value = SSL.SSL_PROTOCOL_ALL;
-if (SSLv2.equalsIgnoreCase(SSLProtocol)) {
-value = SSL.SSL_PROTOCOL_SSLV2;
-} else if (SSLv3.equalsIgnoreCase(SSLProtocol)) {
-value = SSL.SSL_PROTOCOL_SSLV3;
-} else if (TLSv1.equalsIgnoreCase(SSLProtocol)) {
-value = SSL.SSL_PROTOCOL_TLSV1;
-} else if (SSLv2+SSLv3.equalsIgnoreCase(SSLProtocol)) {
-value = SSL.SSL_PROTOCOL_SSLV2 | SSL.SSL_PROTOCOL_SSLV3;
-} else if (all.equalsIgnoreCase(SSLProtocol) ||
-SSLProtocol == null || SSLProtocol.length() == 0) {
-// NOOP, use the default defined above
+int value;
+// This branch can be removed, once the required version is at 
least 1.1.21.
+if (Library.TCN_FULL_VERSION = 1120) {
+value = SSL.SSL_PROTOCOL_ALL;
+if (SSLv2.equalsIgnoreCase(SSLProtocol)) {
+value = SSL.SSL_PROTOCOL_SSLV2;
+} else if (SSLv3.equalsIgnoreCase(SSLProtocol)) {
+value = SSL.SSL_PROTOCOL_SSLV3;
+} else if (TLSv1.equalsIgnoreCase(SSLProtocol)) {
+value = SSL.SSL_PROTOCOL_TLSV1;
+} else if (SSLv2+SSLv3.equalsIgnoreCase(SSLProtocol)) {
+value = SSL.SSL_PROTOCOL_SSLV2 | SSL.SSL_PROTOCOL_SSLV3;
+} else if (all.equalsIgnoreCase(SSLProtocol) ||
+SSLProtocol == null || SSLProtocol.length() == 0) {
+// NOOP, use the default defined above
+} else {
+// Protocol not recognized, fail to start as it is safer 
than
+// continuing with the default which might enable more 
than the
+// is required
+throw new Exception(sm.getString(
+endpoint.apr.invalidSslProtocol, SSLProtocol));
+}
 } else {
-// Protocol not recognized, fail to start as it is safer than
-// continuing with the default which might enable more than the
-// is required
-throw new Exception(sm.getString(
-endpoint.apr.invalidSslProtocol, SSLProtocol));
+value = SSL.SSL_PROTOCOL_NONE;

DO NOT REPLY [Bug 51477] Support all protocol combinations in SSLProtocol of APR Connector

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51477

Rainer Jung rainer.j...@kippdata.de changed:

   What|Removed |Added

  Component|Connectors  |Library
Version|7.0.16  |1.1.20
Product|Tomcat 7|Tomcat Native

--- Comment #17 from Rainer Jung rainer.j...@kippdata.de 2011-07-11 15:46:33 
UTC ---
I applied a slightly revised version of the patch in r1145209.

The new support for arbitrary protocol combinations will need a release of
tcnative. For existing releases there will be only support for the documented
combinations, because other combinations will give unexpected results.

I'll keep this issue open and reassign to tcnative.

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

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



DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

--- Comment #3 from Konstantin Kolinko knst.koli...@gmail.com 2011-07-11 
16:01:05 UTC ---
Created attachment 27278
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=27278
2011-07-11_tc6_bug46252.patch

Correction: that revision number above was r1145200

Here is patch that will be proposed for Tomcat 6.
Backport to Tomcat 5.5 is unlikely.

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

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



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

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 16:03:36 2011
New Revision: 1145218

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

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1145218r1=1145217r2=1145218view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Jul 11 16:03:36 2011
@@ -234,3 +234,10 @@ PATCHES PROPOSED TO BACKPORT:
   http://svn.apache.org/viewvc?rev=1143150view=rev
   +1: markt, kkolinko
   -1:
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46252
+  Allow to specify character set to be used to write the access log
+  in AccessLogValve
+  https://issues.apache.org/bugzilla/attachment.cgi?id=27278
+  +1: kkolinko
+  -1:



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



svn commit: r1145224 - in /tomcat/trunk: java/org/apache/catalina/connector/CoyoteAdapter.java test/org/apache/catalina/core/TestAsyncContextImpl.java webapps/docs/changelog.xml

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 16:08:23 2011
New Revision: 1145224

URL: http://svn.apache.org/viewvc?rev=1145224view=rev
Log:
Improve logging of error conditions

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1145224r1=1145223r2=1145224view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Mon Jul 
11 16:08:23 2011
@@ -493,8 +493,24 @@ public class CoyoteAdapter implements Ad
 }
 
 try {
-connector.getService().getContainer().logAccess(
-request, response, time, true);
+// Log at the lowest level available. logAccess() will be
+// automatically called on parent containers.
+boolean logged = false;
+if (request.mappingData != null) {
+if (request.mappingData.context != null) {
+logged = true;
+((Context) request.mappingData.context).logAccess(
+request, response, time, true);
+} else if (request.mappingData.host != null) {
+logged = true;
+((Context) request.mappingData.context).logAccess(
+request, response, time, true);
+}
+}
+if (!logged) {
+connector.getService().getContainer().logAccess(
+request, response, time, true);
+}
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
 log.warn(sm.getString(coyoteAdapter.accesslogFail), t);

Modified: tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=1145224r1=1145223r2=1145224view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java Mon 
Jul 11 16:08:23 2011
@@ -452,10 +452,10 @@ public class TestAsyncContextImpl extend
 
 // Check the access log
 if (completeOnTimeout  dispatchUrl != null) {
-if (!isAccessLogEnabled()) {
+//if (!isAccessLogEnabled()) {
 validateAccessLog(alv, 1, 500, 0, TimeoutServlet.ASYNC_TIMEOUT 
+
 TIMEOUT_MARGIN + REQUEST_TIME);
-}
+//}
 } else {
 validateAccessLog(alv, 1, 200, TimeoutServlet.ASYNC_TIMEOUT,
 TimeoutServlet.ASYNC_TIMEOUT + TIMEOUT_MARGIN +

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1145224r1=1145223r2=1145224view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 11 16:08:23 2011
@@ -75,6 +75,10 @@
 Allow choosing a locale for timestamp formatting in AccessLogValve.
 (rjung)
   /update
+  fix
+When generating access logs for errors, log at the Context/Host level 
if
+a Context or Host can be identified for the failed request. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



svn commit: r1145225 - /tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 16:10:15 2011
New Revision: 1145225

URL: http://svn.apache.org/viewvc?rev=1145225view=rev
Log:
Revert unintended commit

Modified:
tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

Modified: tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=1145225r1=1145224r2=1145225view=diff
==
--- tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java Mon 
Jul 11 16:10:15 2011
@@ -452,10 +452,10 @@ public class TestAsyncContextImpl extend
 
 // Check the access log
 if (completeOnTimeout  dispatchUrl != null) {
-//if (!isAccessLogEnabled()) {
+if (!isAccessLogEnabled()) {
 validateAccessLog(alv, 1, 500, 0, TimeoutServlet.ASYNC_TIMEOUT 
+
 TIMEOUT_MARGIN + REQUEST_TIME);
-//}
+}
 } else {
 validateAccessLog(alv, 1, 200, TimeoutServlet.ASYNC_TIMEOUT,
 TimeoutServlet.ASYNC_TIMEOUT + TIMEOUT_MARGIN +



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



svn commit: r1145237 - in /tomcat/trunk: java/org/apache/catalina/valves/AccessLogValve.java java/org/apache/catalina/valves/LocalStrings.properties java/org/apache/juli/FileHandler.java webapps/docs/

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 16:46:28 2011
New Revision: 1145237

URL: http://svn.apache.org/viewvc?rev=1145237view=rev
Log:
* JULI FileHandler, AccessLogValve:
Create a directory automatically when it is specified as a part of the file 
name, e.g. in the prefix attribute. Earlier this happened only if it was 
specified with the directory attribute.
* AccessLogValve:
Log a failure if access log file cannot be opened.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties
tomcat/trunk/java/org/apache/juli/FileHandler.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=1145237r1=1145236r2=1145237view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Mon Jul 11 
16:46:28 2011
@@ -1008,36 +1008,44 @@ public class AccessLogValve extends Valv
 }
 
 // Open the current log file
-try {
-String pathname;
-// If no rotate - no need for dateStamp in fileName
-if (rotatable) {
-pathname = dir.getAbsolutePath() + File.separator + prefix
-+ dateStamp + suffix;
-} else {
-pathname = dir.getAbsolutePath() + File.separator + prefix
-+ suffix;
-}
-Charset charset = null;
-if (encoding != null) {
-try {
-charset = B2CConverter.getCharset(encoding);
-} catch (UnsupportedEncodingException ex) {
-log.error(sm.getString(
-accessLogValve.unsupportedEncoding, encoding), 
ex);
-}
+File pathname;
+// If no rotate - no need for dateStamp in fileName
+if (rotatable) {
+pathname = new File(dir.getAbsoluteFile(), prefix + dateStamp
++ suffix);
+} else {
+pathname = new File(dir.getAbsoluteFile(), prefix + suffix);
+}
+File parent = pathname.getParentFile();
+if (!parent.exists()) {
+if (!parent.mkdirs()) {
+log.error(sm.getString(accessLogValve.openDirFail, parent));
 }
-if (charset == null) {
-charset = Charset.defaultCharset();
+}
+
+Charset charset = null;
+if (encoding != null) {
+try {
+charset = B2CConverter.getCharset(encoding);
+} catch (UnsupportedEncodingException ex) {
+log.error(sm.getString(
+accessLogValve.unsupportedEncoding, encoding), ex);
 }
+}
+if (charset == null) {
+charset = Charset.defaultCharset();
+}
+
+try {
 writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
 new FileOutputStream(pathname, true), charset), 128000),
 false);
 
-currentLogFile = new File(pathname);
+currentLogFile = pathname;
 } catch (IOException e) {
 writer = null;
 currentLogFile = null;
+log.error(sm.getString(accessLogValve.openFail, pathname), e);
 }
 }
  

Modified: tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties?rev=1145237r1=1145236r2=1145237view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/LocalStrings.properties Mon 
Jul 11 16:46:28 2011
@@ -22,7 +22,8 @@ cometConnectionManagerValve.event=Except
 cometConnectionManagerValve.listenerEvent=Exception processing session 
listener event
 
 # Access log valve
-accessLogValve.closeFail=Failed to close log file
+accessLogValve.openFail=Failed to open access log file [{0}]
+accessLogValve.closeFail=Failed to close access log file
 accessLogValve.openDirFail=Failed to create directory [{0}] for access logs
 accessLogValve.rotateFail=Failed to rotate access log
 accessLogValve.invalidLocale=Failed to set locale to [{0}]

Modified: tomcat/trunk/java/org/apache/juli/FileHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/FileHandler.java?rev=1145237r1=1145236r2=1145237view=diff
==
--- tomcat/trunk/java/org/apache/juli/FileHandler.java (original)
+++ 

svn commit: r1145238 - in /tomcat/trunk: java/org/apache/catalina/valves/ExtendedAccessLogValve.java webapps/docs/changelog.xml

2011-07-11 Thread rjung
Author: rjung
Date: Mon Jul 11 16:51:54 2011
New Revision: 1145238

URL: http://svn.apache.org/viewvc?rev=1145238view=rev
Log:
Always use en_US as locale for timestamps in
ExtendedAccessLogValve.

The format is specified in

http://www.w3.org/TR/WD-logfile.html

and states that the supported timestamps
-MM-dd and HH:mm:ss are defined with
ascii digits and GMT.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java?rev=1145238r1=1145237r2=1145238view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/ExtendedAccessLogValve.java 
Mon Jul 11 16:51:54 2011
@@ -28,6 +28,7 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.TimeZone;
 
 import javax.servlet.http.Cookie;
@@ -875,7 +876,7 @@ public class ExtendedAccessLogValve exte
 private String currentTimestampString;
 
 ElementTimestampStruct(String format) {
-currentTimestampFormat = new SimpleDateFormat(format);
+currentTimestampFormat = new SimpleDateFormat(format, Locale.US);
 currentTimestampFormat.setTimeZone(TimeZone.getTimeZone(GMT));
 }
 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1145238r1=1145237r2=1145238view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 11 16:51:54 2011
@@ -88,6 +88,10 @@
   fix
 Log a failure if access log file cannot be opened. (kkolinko)
   /fix
+  fix
+Always use en_US as locale for timestamps in ExtendedAccessLogValve.
+(rjung)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



Use canonical IPv6 text representation in logs

2011-07-11 Thread Ognjen Blagojevic

Hi,

In AccessLogValve and on other places where IPv6 address is logged or 
printed, it would bi good if Tomcat would use canonical IPv6 format as 
described in RFC 5952 [1] (especially note section 3.2.2. Logging), e.g:


1. instead of logging 2001:4000:0:5:0:0:0:66, it should log 
2001:4000:0:5::66,

2. instead of logging 0:0:0:0:0:0:0:1, it should log ::1.

What do you think about that?


Class Inet6Address method getHostAddress confirms to RFC 
recommendations, in everything except in zero groups handling. It simply 
prints full form with all zeroes. In Java API I don't see any method to 
convert it to canonical form.


I wrote small utility that converts Inet6Address object into canonical 
representation. Are you interested in such contribution? Should it be 
contributed directly to Tomcat code, or maybe offered to Jakarta Commons 
project (Codec or Net component)? If it is contributed to Jakarta 
Commons project, would it be a problem to use it in Tomcat, because of 
new dependency? Net component seems to be quite big (all kind of 
protocol implementations), while Codec contains only small number of 
conversion classes, so if it is contributed to commons, is Codec 
component better choice?


Regards,
Ognjen

[1] http://tools.ietf.org/html/rfc5952

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



DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

--- Comment #4 from Konstantin Kolinko knst.koli...@gmail.com 2011-07-11 
17:03:05 UTC ---
Created attachment 27279
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=27279
2011-07-11_tc6_bug46252_v2.patch

Updated patch: added r1145237

This adds
in AccessLogValve:
- i18n for messages
- Log a failure if access log file cannot be opened.
- Autocreate directory if it is specified as a part of the file name
in FileHandler:
- Autocreate directory if it is specified as a part of the file name

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

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



DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

Konstantin Kolinko knst.koli...@gmail.com changed:

   What|Removed |Added

  Attachment #27278|0   |1
is obsolete||

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

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



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

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 17:07:35 2011
New Revision: 1145243

URL: http://svn.apache.org/viewvc?rev=1145243view=rev
Log:
update proposal

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1145243r1=1145242r2=1145243view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Jul 11 17:07:35 2011
@@ -236,8 +236,16 @@ PATCHES PROPOSED TO BACKPORT:
   -1:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46252
-  Allow to specify character set to be used to write the access log
-  in AccessLogValve
-  https://issues.apache.org/bugzilla/attachment.cgi?id=27278
+  AccessLogValve and FileHandler improvements
+  It is backport of r1145200, r1145237
+  1) Allow to specify character set to be used to write the access log
+ in AccessLogValve
+  2) In JULI FileHandler and in AccessLogValve create a directory
+ automatically when it is specified as a part of the file name, e.g. in
+ the codeprefix/code attribute. Earlier this happened only if it was
+ specified with the codedirectory/code attribute.
+  3) Log a failure if access log file cannot be opened.
+  4) I18n of messages in AccessLogValve.
+  https://issues.apache.org/bugzilla/attachment.cgi?id=27279
   +1: kkolinko
   -1:



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



svn commit: r1145246 - /tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java

2011-07-11 Thread rjung
Author: rjung
Date: Mon Jul 11 17:13:06 2011
New Revision: 1145246

URL: http://svn.apache.org/viewvc?rev=1145246view=rev
Log:
- Remove unused code:
  Cookie dates are formatted elsewhere.
  This class used a very strange format:
   , dd-MMM-yy kk:mm:ss zz
- Add log.isDebugEnabled()

Modified:
tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java

Modified: tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java?rev=1145246r1=1145245r2=1145246view=diff
==
--- tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java Mon Jul 11 
17:13:06 2011
@@ -20,7 +20,6 @@ package org.apache.catalina.util;
 
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
-import java.text.SimpleDateFormat;
 import java.util.Map;
 import java.util.TimeZone;
 
@@ -48,16 +47,6 @@ public final class RequestUtil {
  */
 private static final StringManager sm =
 StringManager.getManager(org.apache.catalina.util);
-
-/**
- * The DateFormat to use for generating readable dates in cookies.
- */
-private static SimpleDateFormat format =
-new SimpleDateFormat( , dd-MMM-yy kk:mm:ss zz);
-
-static {
-format.setTimeZone(TimeZone.getTimeZone(GMT));
-}
 
 
 /**
@@ -207,8 +196,10 @@ public final class RequestUtil {
 }
 parseParameters(map, bytes, encoding);
 } catch (UnsupportedEncodingException uee) {
-log.debug(sm.getString(requestUtil.parseParameters.uee,
-encoding), uee);
+if (log.isDebugEnabled()) {
+log.debug(sm.getString(requestUtil.parseParameters.uee,
+encoding), uee);
+}
 }
 
 }
@@ -271,7 +262,9 @@ public final class RequestUtil {
 bytes = str.getBytes(B2CConverter.getCharset(enc));
 }
 } catch (UnsupportedEncodingException uee) {
-log.debug(sm.getString(requestUtil.urlDecode.uee, enc), uee);
+if (log.isDebugEnabled()) {
+log.debug(sm.getString(requestUtil.urlDecode.uee, enc), uee);
+}
 }
 
 return URLDecode(bytes, enc, isQuery);
@@ -341,7 +334,9 @@ public final class RequestUtil {
 try {
 return new String(bytes, 0, ox, B2CConverter.getCharset(enc));
 } catch (UnsupportedEncodingException uee) {
-log.debug(sm.getString(requestUtil.urlDecode.uee, enc), uee);
+if (log.isDebugEnabled()) {
+log.debug(sm.getString(requestUtil.urlDecode.uee, enc), 
uee);
+}
 return null;
 }
 }
@@ -458,7 +453,4 @@ public final class RequestUtil {
 }
 
 }
-
-
-
 }



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



Re: Use canonical IPv6 text representation in logs

2011-07-11 Thread Konstantin Kolinko
2011/7/11 Ognjen Blagojevic ognjen.d.blagoje...@gmail.com:
 Hi,

 In AccessLogValve and on other places where IPv6 address is logged or
 printed, it would bi good if Tomcat would use canonical IPv6 format as
 described in RFC 5952 [1] (especially note section 3.2.2. Logging), e.g:

 1. instead of logging 2001:4000:0:5:0:0:0:66, it should log
 2001:4000:0:5::66,
 2. instead of logging 0:0:0:0:0:0:0:1, it should log ::1.

 What do you think about that?


 Class Inet6Address method getHostAddress confirms to RFC recommendations, in
 everything except in zero groups handling. It simply prints full form with
 all zeroes. In Java API I don't see any method to convert it to canonical
 form.

 I wrote small utility that converts Inet6Address object into canonical
 representation. Are you interested in such contribution? Should it be
 contributed directly to Tomcat code, or maybe offered to Jakarta Commons
 project (Codec or Net component)? If it is contributed to Jakarta Commons
 project, would it be a problem to use it in Tomcat, because of new
 dependency? Net component seems to be quite big (all kind of protocol
 implementations), while Codec contains only small number of conversion
 classes, so if it is contributed to commons, is Codec component better
 choice?

 Regards,
 Ognjen

 [1] http://tools.ietf.org/html/rfc5952

1. One should really ask system administrators what they prefer
(or provide a configuration option).

Personally I would prefer the full address, as I think it is easier
when all is data is visible, and it is easier to search or filter.

If there are several sequences of zeros, only one of them can be
collapsed. This introduces ambiguity when trying to specify a search
filter.

2. If you want to contribute, please create a bugzilla entry, mark it
as an enhancement.

The class may go into  org.apache.tomcat.util.net. I would prefer to
see some JUnit tests together with the class.


3. Regarding Apache Commons: you can ask on their mailing lists.

When Tomcat uses some code from Apache Commons we always rename it
into different package, to avoid conflicts with the same libraries
used by web applications.

There are two approaches
a) it is copied into our source tree - such are Commons FileUpload,
Commons Digester, Commons Modeler and Apache BCEL.

b) original sources are processed through renaming filter and
recompiled when Tomcat builds - such are Commons Logging, Commons Pool
and Commons DBCP.

As thus, your contribution to Tomcat can be independent from Commons.

Best regards,
Konstantin Kolinko

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



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

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 17:48:46 2011
New Revision: 1145259

URL: http://svn.apache.org/viewvc?rev=1145259view=rev
Log:
change vote. Let's go on with this.

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=1145259r1=1145258r2=1145259view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Jul 11 17:48:46 2011
@@ -55,11 +55,8 @@ PATCHES PROPOSED TO BACKPORT:
   resources already present in the webapp.
   http://svn.apache.org/viewvc?view=revisionrevision=936825
   
http://people.apache.org/~rjung/patches/2010-05-14-loader-backport-r936825.patch
-  +1: rjung, funkman
+  +1: rjung, funkman, kkolinko
   -1:
-  -0: kkolinko: The patch itself is OK, but I think having a synonym will
-   cause confusion. I'd prefer not to invent a new name, but mention the
-   one that we already have when documenting virtualClasspath.
 
 * Fix path parameter handling. Currently the following URL fails with a 404:
   http://localhost:8080/examples/jsp/snp;x=y/snoop.jsp



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



[Tomcat Wiki] Trivial Update of OrphanedPages by LeeLansford

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The OrphanedPages page has been changed by LeeLansford:
http://wiki.apache.org/tomcat/OrphanedPages?action=diffrev1=4rev2=5

  ##language:en
  A list of pages no other page links to: 
  OrphanedPages
+  
+  [[http://www.whatisms.net|What is MS]]
+  [[http://www.whatisshingles.org|What is Shingles]]
+  [[http://www.whatisadhd.org|What is ADHD]]
+  [[http://www.whatisdyslexia.org|What is Dyslexia]]
+  [[http://www.backlinklist.org|Backlink List]]
  

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



DO NOT REPLY [Bug 51497] New: Use canonical IPv6 text representation in logs

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51497

 Bug #: 51497
   Summary: Use canonical IPv6 text representation in logs
   Product: Tomcat 7
   Version: trunk
  Platform: All
OS/Version: All
Status: NEW
  Severity: enhancement
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: ognjen.d.blagoje...@gmail.com
Classification: Unclassified


In AccessLogValve and on other places where IPv6 address is logged or printed,
it would bi good if Tomcat would use canonical IPv6 format as described in RFC
5952 [1] (especially note section 3.2.2. Logging), e.g:

1. instead of logging 2001:4000:0:5:0:0:0:66, it should log 2001:4000:0:5::66,
2. instead of logging 0:0:0:0:0:0:0:1, it should log ::1.


Class Inet6Address method getHostAddress confirms to RFC recommendations, in
everything except in zero groups handling. It simply prints full form with all
zeroes. In Java API I don't see any method to convert it to canonical form.

[1] http://tools.ietf.org/html/rfc5952

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

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



[Tomcat Wiki] Trivial Update of PageSize by LeeLansford

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The PageSize page has been changed by LeeLansford:
http://wiki.apache.org/tomcat/PageSize?action=diffrev1=4rev2=5

  List of all pages, sorted by their size:
  PageSize
  
+ 
+  [[http://www.whatisms.net|What is MS]]
+  [[http://www.whatisshingles.org|What is Shingles]]
+  [[http://www.whatisadhd.org|What is ADHD]]
+  [[http://www.whatisdyslexia.org|What is Dyslexia]]
+  [[http://www.backlinklist.org|Backlink List]]
+ 

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



[Tomcat Wiki] Update of LocalBadContent by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The LocalBadContent page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/LocalBadContent?action=diffrev1=23rev2=24

Comment:
Add recent spam addresses

  angelcities\.com
  angosso\.com
  angosso\.net
+ backlinklist\.org
  bj-yctd\.com
  blog-city\.com
  bodybuilding
@@ -91, +92 @@

  ulcertreatment\.org
  vergleich-riester-rente\.net
  webdesigner-essen\.de
+ whatisms
+ whatisshingles
+ whatisadhd
+ whatisdyslexia
  wm-u\.com
  wtcsites\.com
  x2\.top\.tc

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



[Tomcat Wiki] Update of PageSize by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The PageSize page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/PageSize?action=diffrev1=6rev2=7

Comment:
Add acl

+ #acl LeoSimons:read,write,admin,delete,revert AdminGroup:read,write All:read
  ##language:en
  StatsChart(pagesize)
  

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



[Tomcat Wiki] Update of OrphanedPages by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The OrphanedPages page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/OrphanedPages?action=diffrev1=6rev2=7

Comment:
Add acl

+ #acl LeoSimons:read,write,admin,delete,revert AdminGroup:read,write All:read
  ##language:en
  A list of pages no other page links to: 
  OrphanedPages

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



Re: Use canonical IPv6 text representation in logs

2011-07-11 Thread Ognjen Blagojevic

Konstantin,


1. One should really ask system administrators what they prefer


What would be the right place to do that? User list, maybe? I assume at 
least some of Tomcat developers are also involved in system 
administration, so I hope they will state their opinion here.




(or provide a configuration option).


That is also possibility. What would be good place to configure:

1. AccessLogValve XML parameter?
2. AccessLogValve system property (-D...)
3. Global Tomcat XML parameter?
4. Global Tomcat system property?



Personally I would prefer the full address, as I think it is easier
when all is data is visible, and it is easier to search or filter.


I thought that at first, but after looking IPv6 addresses in log files 
for some time, I changed my mind. Shorter means easier to read, and 
easier to search... if there are no ambiguities.




If there are several sequences of zeros, only one of them can be
collapsed. This introduces ambiguity when trying to specify a search
filter.


Actually, mentioned RFC resolves all ambiguities:


When there is an alternative choice in the placement of a ::, the
   longest run of consecutive 16-bit 0 fields MUST be shortened (i.e.,
   the sequence with three consecutive zero fields is shortened in 2001:
   0:0:1:0:0:0:1).  When the length of the consecutive 16-bit 0 fields
   are equal (i.e., 2001:db8:0:0:1:0:0:1), the first sequence of zero
   bits MUST be shortened.  For example, 2001:db8::1:0:0:1 is correct
   representation.




2. If you want to contribute, please create a bugzilla entry, mark it
as an enhancement.


Ok, I created:

  https://issues.apache.org/bugzilla/show_bug.cgi?id=51497



The class may go into  org.apache.tomcat.util.net. I would prefer to
see some JUnit tests together with the class.


Of course, I have JUnit for all the examples in the RFC.



3. Regarding Apache Commons: you can ask on their mailing lists.

...

As thus, your contribution to Tomcat can be independent from Commons.



Ok, let's see first if it works for Tomcat.


-Ognjen

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



svn commit: r1145268 - /tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 18:10:11 2011
New Revision: 1145268

URL: http://svn.apache.org/viewvc?rev=1145268view=rev
Log:
Expose recently added encoding and locale options of AccessLogValve through 
JMX.

Modified:
tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml

Modified: tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml?rev=1145268r1=1145267r2=1145268view=diff
==
--- tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml 
(original)
+++ tomcat/trunk/java/org/apache/catalina/valves/mbeans-descriptors.xml Mon Jul 
11 18:10:11 2011
@@ -46,26 +46,34 @@
 attribute name=condition
description=The value to look for conditional logging.
type=java.lang.String/
-   
+
 attribute name=directory
description=The directory in which log files are created
type=java.lang.String/
-   
+
 attribute name=enabled
description=Enable Access Logging
is=false
type=boolean/
 
+attribute name=encoding
+   description=Character set used to write the log file
+   type=java.lang.String/
+
 attribute name=fileDateFormat
-   description=The format for the date date based log rotation.
+   description=The format for the date for date based log 
rotation
type=java.lang.String/
-   
+
 attribute name=info
description=Information about this implementation
type=java.lang.String
writeable=false/
 
-attribute   name=pattern
+attribute name=locale
+   description=The locale used to format timestamps in the access 
log lines
+   type=java.lang.String/
+
+attribute name=pattern
description=The pattern used to format our access log lines
type=java.lang.String/
 
@@ -198,25 +206,33 @@
 attribute name=condition
description=The value to look for conditional logging.
type=java.lang.String/
-   
+
 attribute name=directory
description=The directory in which log files are created
type=java.lang.String/
-   
- attribute name=enabled
+
+attribute name=enabled
description=Enable Access Logging
is=false
type=boolean/
 
+attribute name=encoding
+   description=Character set used to write the log file
+   type=java.lang.String/
+
 attribute name=fileDateFormat
description=The format for the date date based log rotation.
type=java.lang.String/
-   
+
 attribute name=info
description=Information about this implementation
type=java.lang.String
writeable=false/
 
+attribute name=locale
+   description=The locale used to format timestamps in the access 
log lines
+   type=java.lang.String/
+
 attribute   name=pattern
description=The pattern used to format our access log lines
type=java.lang.String/



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



DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

--- Comment #5 from Konstantin Kolinko knst.koli...@gmail.com 2011-07-11 
18:17:32 UTC ---
Created attachment 27280
  -- https://issues.apache.org/bugzilla/attachment.cgi?id=27280
2011-07-11_tc6_bug46252_JMX.patch

Additional patch:
Expose the new encoding option through JMX.
I also fixed wrong mapping for getEnabled().

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

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



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

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 18:21:45 2011
New Revision: 1145270

URL: http://svn.apache.org/viewvc?rev=1145270view=rev
Log:
Add JMX fix to the proposal

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

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1145270r1=1145269r2=1145270view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Jul 11 18:21:45 2011
@@ -234,7 +234,7 @@ PATCHES PROPOSED TO BACKPORT:
 
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46252
   AccessLogValve and FileHandler improvements
-  It is backport of r1145200, r1145237
+  It is backport of r1145200, r1145237, r1145268
   1) Allow to specify character set to be used to write the access log
  in AccessLogValve
   2) In JULI FileHandler and in AccessLogValve create a directory
@@ -243,6 +243,9 @@ PATCHES PROPOSED TO BACKPORT:
  specified with the codedirectory/code attribute.
   3) Log a failure if access log file cannot be opened.
   4) I18n of messages in AccessLogValve.
+  5) Expose the new encoding option through JMX.
+ and also fix wrong mapping for enabled property - it is getEnabled().
   https://issues.apache.org/bugzilla/attachment.cgi?id=27279
+  https://issues.apache.org/bugzilla/attachment.cgi?id=27280 (JMX)
   +1: kkolinko
   -1:



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



Locale and SimpleDateFormat: creationdate in WebdavServlet

2011-07-11 Thread Rainer Jung
WebdavServlet uses -MM-dd'T'HH:mm:ss'Z' witout setting Locale.US.

The format is specified in http://www.ietf.org/rfc/rfc2518.txt, 23.2
Appendix 2 - ISO 8601 Date and Time Profile, and I would say it should
also be en_US.

I don't know much about Webdav though ...

Agreed?

It is the last SDF that does not have a Locale and probably should have
one. The other cases seem OK.

Rainer


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



Re: Locale and SimpleDateFormat: creationdate in WebdavServlet

2011-07-11 Thread Konstantin Kolinko
2011/7/11 Rainer Jung rainer.j...@kippdata.de:
 WebdavServlet uses -MM-dd'T'HH:mm:ss'Z' witout setting Locale.US.

 The format is specified in http://www.ietf.org/rfc/rfc2518.txt, 23.2
 Appendix 2 - ISO 8601 Date and Time Profile, and I would say it should
 also be en_US.

 I don't know much about Webdav though ...

 Agreed?

 It is the last SDF that does not have a Locale and probably should have
 one. The other cases seem OK.

I agree.

It uses 2-digit month, so it does not matter much,  unless you have
locale that uses unusual digits here.

Best regards,
Konstantin Kolinko

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



svn commit: r1145285 - in /tomcat/trunk/java/org/apache/tomcat: jni/Library.java util/net/AprEndpoint.java

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 18:40:48 2011
New Revision: 1145285

URL: http://svn.apache.org/viewvc?rev=1145285view=rev
Log:
Followup to r1145209
Do not expose TCN_FULL_VERSION as a public constant, but calculate it when 
needed.
Using this way it will be easier to throw away the code in AprEndpoint when it 
becomes unneeded.
I do not mind reintroducing the constant if it were used in two or more places.

Modified:
tomcat/trunk/java/org/apache/tomcat/jni/Library.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/jni/Library.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Library.java?rev=1145285r1=1145284r2=1145285view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/jni/Library.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/Library.java Mon Jul 11 18:40:48 
2011
@@ -102,8 +102,6 @@ public final class Library {
 public static int TCN_PATCH_VERSION  = 0;
 /* TCN_IS_DEV_VERSION */
 public static int TCN_IS_DEV_VERSION = 0;
-/* TCN_FULL_VERSION */
-public static int TCN_FULL_VERSION   = 0;
 /* APR_MAJOR_VERSION */
 public static int APR_MAJOR_VERSION  = 0;
 /* APR_MINOR_VERSION */
@@ -180,9 +178,6 @@ public final class Library {
 TCN_MINOR_VERSION  = version(0x02);
 TCN_PATCH_VERSION  = version(0x03);
 TCN_IS_DEV_VERSION = version(0x04);
-TCN_FULL_VERSION   = TCN_MAJOR_VERSION * 1000 +
- TCN_MINOR_VERSION * 100 +
- TCN_PATCH_VERSION;
 APR_MAJOR_VERSION  = version(0x11);
 APR_MINOR_VERSION  = version(0x12);
 APR_PATCH_VERSION  = version(0x13);

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1145285r1=1145284r2=1145285view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Mon Jul 11 
18:40:48 2011
@@ -473,7 +473,10 @@ public class AprEndpoint extends Abstrac
 // SSL protocol
 int value;
 // This branch can be removed, once the required version is at 
least 1.1.21.
-if (Library.TCN_FULL_VERSION = 1120) {
+int tcnFullVersion = Library.TCN_MAJOR_VERSION * 1000
++ Library.TCN_MINOR_VERSION * 100
++ Library.TCN_PATCH_VERSION;
+if (tcnFullVersion = 1120) {
 value = SSL.SSL_PROTOCOL_ALL;
 if (SSLv2.equalsIgnoreCase(SSLProtocol)) {
 value = SSL.SSL_PROTOCOL_SSLV2;



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



Re: Use canonical IPv6 text representation in logs

2011-07-11 Thread Konstantin Kolinko
2011/7/11 Ognjen Blagojevic ognjen.d.blagoje...@gmail.com:

 (or provide a configuration option).

 That is also possibility. What would be good place to configure:

 1. AccessLogValve XML parameter?

AccessLovValve property
(and thus it automatically becomes settable through XML,  and after
additional configuration through JMX as well),

or additional % parameter in the pattern.

I wonder how Apache HTTPD server handles IP6 addresses.

http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats
says nothing


 2. AccessLogValve system property (-D...)
 3. Global Tomcat XML parameter?
 4. Global Tomcat system property?

I do not like 2.,3. or 4.

Best regards,
Konstantin Kolinko

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



svn commit: r1145296 - in /tomcat/trunk: java/org/apache/catalina/servlets/WebdavServlet.java webapps/docs/changelog.xml

2011-07-11 Thread rjung
Author: rjung
Date: Mon Jul 11 19:06:15 2011
New Revision: 1145296

URL: http://svn.apache.org/viewvc?rev=1145296view=rev
Log:
Use en_US as locale for creationdate in WebdavServlet.

Modified:
tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java?rev=1145296r1=1145295r2=1145296view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java Mon Jul 
11 19:06:15 2011
@@ -200,7 +200,7 @@ public class WebdavServlet
  * Simple date format for the creation date ISO representation (partial).
  */
 protected static final SimpleDateFormat creationDateFormat =
-new SimpleDateFormat(-MM-dd'T'HH:mm:ss'Z');
+new SimpleDateFormat(-MM-dd'T'HH:mm:ss'Z', Locale.US);
 
 
  /**

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1145296r1=1145295r2=1145296view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 11 19:06:15 2011
@@ -89,9 +89,12 @@
 Log a failure if access log file cannot be opened. (kkolinko)
   /fix
   fix
-Always use en_US as locale for timestamps in ExtendedAccessLogValve.
+Use en_US as locale for timestamps in ExtendedAccessLogValve.
 (rjung)
   /fix
+  fix
+Use en_US as locale for creationdate in WebdavServlet. (rjung)
+  /fix
 /changelog
   /subsection
   subsection name=Coyote



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



DO NOT REPLY [Bug 51497] Use canonical IPv6 text representation in logs

2011-07-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51497

--- Comment #1 from Konstantin Kolinko knst.koli...@gmail.com 2011-07-11 
19:32:48 UTC ---
Discussion on dev@, 2011-07-11:
http://tomcat.markmail.org/thread/jwysfldcsmulkytb
http://marc.info/?t=13104034012r=1w=2

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

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



svn commit: r1145305 - in /tomcat/site/trunk: docs/index.html docs/oldnews.html xdocs/index.xml xdocs/oldnews.xml

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 19:43:33 2011
New Revision: 1145305

URL: http://svn.apache.org/viewvc?rev=1145305view=rev
Log:
Move old mod-jk 1.2.31 announcement to oldnews.

Modified:
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/oldnews.html
tomcat/site/trunk/xdocs/index.xml
tomcat/site/trunk/xdocs/oldnews.xml

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1145305r1=1145304r2=1145305view=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Mon Jul 11 19:43:33 2011
@@ -423,47 +423,6 @@ fixes over Apache Tomcat 5.5.32.
 tr
 td bgcolor=#525D76
 font color=#ff face=arial,helvetica,sanserif
-a name=Tomcat Connectors 1.2.31 Released
-!--()--
-/a
-a name=Tomcat_Connectors_1.2.31_Released
-strongTomcat Connectors 1.2.31 Released/strong
-/a
-/font
-/td
-td align=right bgcolor=#525D76
-font color=#ff face=arial,helvetica.sanserif
-strong2010-11-01/strong
-/font
-/td
-/tr
-tr
-td colspan=2
-p
-blockquote
-p
-The Apache Tomcat Project is proud to announce the release of version 1.2.31 of
-Apache Tomcat Connectors.
-This release includes mainly bug fixes and some small improvements over Apache 
Tomcat Connectors 1.2.30.
-/p
-p align=center
-a href=download-connectors.cgiDownload/a |
-a href=connectors-doc/miscellaneous/changelog.htmlChangeLog for 1.2.31/a
-/p
-/blockquote
-/p
-/td
-/tr
-tr
-td
-br/
-/td
-/tr
-/table
-table border=0 cellspacing=0 cellpadding=2 width=100%
-tr
-td bgcolor=#525D76
-font color=#ff face=arial,helvetica,sanserif
 a name=Tomcat Native 1.1.20 Released
 !--()--
 /a

Modified: tomcat/site/trunk/docs/oldnews.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/oldnews.html?rev=1145305r1=1145304r2=1145305view=diff
==
--- tomcat/site/trunk/docs/oldnews.html (original)
+++ tomcat/site/trunk/docs/oldnews.html Mon Jul 11 19:43:33 2011
@@ -227,11 +227,6 @@ compared to version 7.0.12:
 Full details of these changes, and all the other changes, are available in the
 a href=tomcat-7.0-doc/changelog.htmlTomcat 7 changelog/a.
 /p
-
-p align=center
-a href=download-70.cgiDownload/a |
-a href=tomcat-7.0-doc/changelog.htmlChangeLog for 7.0.14/a
-/p
 /blockquote
 /p
 /td
@@ -549,6 +544,43 @@ redesigned welcome page./p
 tr
 td bgcolor=#525D76
 font color=#ff face=arial,helvetica,sanserif
+a name=Tomcat Connectors 1.2.31 Released
+!--()--
+/a
+a name=Tomcat_Connectors_1.2.31_Released
+strongTomcat Connectors 1.2.31 Released/strong
+/a
+/font
+/td
+td align=right bgcolor=#525D76
+font color=#ff face=arial,helvetica.sanserif
+strong2010-11-01/strong
+/font
+/td
+/tr
+tr
+td colspan=2
+p
+blockquote
+p
+The Apache Tomcat Project is proud to announce the release of version 1.2.31 of
+Apache Tomcat Connectors.
+This release includes mainly bug fixes and some small improvements over Apache 
Tomcat Connectors 1.2.30.
+/p
+/blockquote
+/p
+/td
+/tr
+tr
+td
+br/
+/td
+/tr
+/table
+table border=0 cellspacing=0 cellpadding=2 width=100%
+tr
+td bgcolor=#525D76
+font color=#ff face=arial,helvetica,sanserif
 a name=Tomcat 7.0.4 Released
 !--()--
 /a
@@ -959,10 +991,6 @@ The Apache Tomcat Project is proud to an
 Apache Tomcat Connectors.
 This release includes mainly bug fixes and some small improvements over Apache 
Tomcat Connectors 1.2.28.
 /p
-p align=center
-a href=download-connectors.cgiDownload/a |
-a href=connectors-doc/miscellaneous/changelog.htmlChangeLog for 1.2.30/a
-/p
 p
 br/
 bNotice/b Apache Tomcat Connectors version 1.2.29 was withdrawn from the 
release due to

Modified: tomcat/site/trunk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/index.xml?rev=1145305r1=1145304r2=1145305view=diff
==
--- tomcat/site/trunk/xdocs/index.xml (original)
+++ tomcat/site/trunk/xdocs/index.xml Mon Jul 11 19:43:33 2011
@@ -96,18 +96,6 @@ fixes over Apache Tomcat 5.5.32.
 /p
 /section
 
-section name=Tomcat Connectors 1.2.31 Released rtext=2010-11-01
-p
-The Apache Tomcat Project is proud to announce the release of version 1.2.31 of
-Apache Tomcat Connectors.
-This release includes mainly bug fixes and some small improvements over Apache 
Tomcat Connectors 1.2.30.
-/p
-p align=center
-a href=download-connectors.cgiDownload/a |
-a href=connectors-doc/miscellaneous/changelog.htmlChangeLog for 1.2.31/a
-/p
-/section
-
 section name=Tomcat Native 1.1.20 Released rtext=2010-02-17
 p
 The Apache Tomcat Project is proud to announce the release of version 1.1.20 
of Tomcat Native.

Modified: tomcat/site/trunk/xdocs/oldnews.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/oldnews.xml?rev=1145305r1=1145304r2=1145305view=diff
==

svn commit: r1145318 - in /tomcat/tc5.5.x/trunk: build/RELEASE-NOTES container/webapps/docs/status.xml

2011-07-11 Thread kkolinko
Author: kkolinko
Date: Mon Jul 11 19:59:20 2011
New Revision: 1145318

URL: http://svn.apache.org/viewvc?rev=1145318view=rev
Log:
Replace http://marc.theaimsgroup.com/ with http://marc.info/
That is the current address of the Mailing list ARChives site.

Modified:
tomcat/tc5.5.x/trunk/build/RELEASE-NOTES
tomcat/tc5.5.x/trunk/container/webapps/docs/status.xml

Modified: tomcat/tc5.5.x/trunk/build/RELEASE-NOTES
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/build/RELEASE-NOTES?rev=1145318r1=1145317r2=1145318view=diff
==
--- tomcat/tc5.5.x/trunk/build/RELEASE-NOTES (original)
+++ tomcat/tc5.5.x/trunk/build/RELEASE-NOTES Mon Jul 11 19:59:20 2011
@@ -136,7 +136,7 @@ export LD_ASSUME_KERNEL=2.4.1
 Please note, that these are only recommendations and may not apply in some 
cases.
 Before you change this variable, make sure you understand its impact, and what 
it does.
 A brief explanation can be found in the mailing archives at 
-http://marc.theaimsgroup.com/?l=tomcat-devm=115689139313901w=2
+http://marc.info/?l=tomcat-devm=115689139313901w=2
 For further assistance, please consult your JVM vendor.
 
 

Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/status.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/status.xml?rev=1145318r1=1145317r2=1145318view=diff
==
--- tomcat/tc5.5.x/trunk/container/webapps/docs/status.xml (original)
+++ tomcat/tc5.5.x/trunk/container/webapps/docs/status.xml Mon Jul 11 19:59:20 
2011
@@ -59,7 +59,7 @@
 p
   bTomcat 5.5/b has several major goals.  They are discussed in the 
tomcat-dev
   mailing list's 5.next thread: 
-  a 
href=http://marc.theaimsgroup.com/?l=tomcat-devamp;w=2amp;r=1amp;s=5.nextamp;q=b;MARC/a.
+  a 
href=http://marc.info/?l=tomcat-devamp;w=2amp;r=1amp;s=5.nextamp;q=b;MARC/a.
   The status of some of these items is detailed below.  Once 5.5 releases 
are
   available, please refer to the Changelog accompanying each release for 
detailed
   changes, enhancements, and fixes.



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



[Tomcat Wiki] Update of FAQ/Miscellaneous by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Miscellaneous page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Miscellaneous?action=diffrev1=25rev2=26

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  
  If so, here are some solutions:
  
-  * 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=104949554010352w=2|Environment 
variable issue]]
+  * [[http://marc.info/?l=tomcat-userm=104949554010352w=2|Environment 
variable issue]]
   * [[http://issues.apache.org/bugzilla/show_bug.cgi?id=16688|Environment 
issue]] or [[http://issues.apache.org/bugzilla/show_bug.cgi?id=20527|Ant issue]]
-  * Others have had success by added JAVA_HOME/bin to their PATH. 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=105525594928279w=2|1]] ... 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=105526353505541w=2|2]] and 
make sure you are using the full JDK and not the JRE.
+  * Others have had success by added JAVA_HOME/bin to their PATH. 
[[http://marc.info/?l=tomcat-userm=105525594928279w=2|1]] ... 
[[http://marc.info/?l=tomcat-userm=105526353505541w=2|2]] and make sure you 
are using the full JDK and not the JRE.
  
  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.
  
@@ -69, +69 @@

  
  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:
  
-  * 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=103417249925541w=2|(SECURITY) 
Apache Tomcat 4.x JSP source disclosure]] vulnerability
+  * [[http://marc.info/?l=tomcat-userm=103417249925541w=2|(SECURITY) Apache 
Tomcat 4.x JSP source disclosure]] vulnerability
-  * [[http://marc.theaimsgroup.com/?t=10394533713r=1w=2|Cannot Run 
Servlets, only JSP's, Part II]]
+  * [[http://marc.info/?t=10394533713r=1w=2|Cannot Run Servlets, only 
JSP's, Part II]]
-  * [[http://marc.theaimsgroup.com/?t=10432685411r=1w=2|Tomcat 
configuration problem: JSPs work, servlets don]]
+  * [[http://marc.info/?t=10432685411r=1w=2|Tomcat configuration 
problem: JSPs work, servlets don]]
  
  
  BR
@@ -131, +131 @@

  
  Anchor(Q7)'''Should I use the LE version?'''
  
- No. It was an experiment, it failed. (YMMV) The original purpose of LE 
light edition of Tomcat 4.0, 4.1 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-userm=105341005928071w=2|More info]]
+ No. It was an experiment, it failed. (YMMV) The original purpose of LE 
light edition of Tomcat 4.0, 4.1 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.info/?l=tomcat-userm=105341005928071w=2|More info]]
  
  
  BR
@@ -145, +145 @@

  
  Anchor(Q10)'''Is there a DTD for server.xml?'''
  
- No! Nor can one accurately exist. 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=104205666221372w=2|Here's why]]
+ No! Nor can one accurately exist. 
[[http://marc.info/?l=tomcat-userm=104205666221372w=2|Here's why]]
  
  
  BR
  
  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=tomcat-userm=104566785828794w=2|More 
detail]].
+ This is done in web.xml by changing welcome-files-list. 
[[http://marc.info/?l=tomcat-userm=104566785828794w=2|More detail]].
  
  
  BR
@@ -190, +190 @@

  
  Anchor(Q13)'''How do I use symbolic links with jars?'''
  
- You'll need to tweak with server.xml and 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=105159411609623w=2|do this]]. 
(Don't worry - its really easy!) Update: you should be worried -- this feature 
has its drawbacks.
+ You'll need to tweak with server.xml and 
[[http://marc.info/?l=tomcat-userm=105159411609623w=2|do this]]. (Don't worry 
- its really easy!) Update: you should be worried -- this feature has its 
drawbacks.
  
  
  BR
@@ -253, +253 @@

  Anchor(Q17)'''How do I make a scheduled event on Tomcat?'''
  
  Tomcat does not support this directly. Its not part of the Servlet or JSP 
Specification.
- If you do need this functionality see 
[[http://marc.theaimsgroup.com/?t=10619291874r=1w=2|this thread]] or 

[Tomcat Wiki] Update of FAQ/Class_Not_Found by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Class_Not_Found page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Class_Not_Found?action=diffrev1=11rev2=12

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  This page discusses the various ways you see Class Not Found errors or very 
similar errors. It is strongly advised you read the following topics:
  
* Classloader HOWTO pages:  
[[http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html|Tomcat 6.0]], 
[[http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html|Tomcat 5.5]].
-   * [[http://marc.theaimsgroup.com/?t=10431752924r=1w=2|Don't]] 
[[http://marc.theaimsgroup.com/?t=10438044013r=1w=2|use]] 
[[http://marc.theaimsgroup.com/?t=9694765692r=1w=2|packageless]] 
[[http://marc.theaimsgroup.com/?t=10449102012r=1w=2|classes]] 
[[http://marc.theaimsgroup.com/?t=10426557623r=1w=2|and]] 
[[http://marc.theaimsgroup.com/?t=10424974831r=1w=2|declare]] 
[[http://marc.theaimsgroup.com/?t=10299695013r=1w=2|all]] 
[[http://marc.theaimsgroup.com/?t=10292218941r=1w=2|imported classes]]!
+   * [[http://marc.info/?t=10431752924r=1w=2|Don't]] 
[[http://marc.info/?t=10438044013r=1w=2|use]] 
[[http://marc.info/?t=9694765692r=1w=2|packageless]] 
[[http://marc.info/?t=10449102012r=1w=2|classes]] 
[[http://marc.info/?t=10426557623r=1w=2|and]] 
[[http://marc.info/?t=10424974831r=1w=2|declare]] 
[[http://marc.info/?t=10299695013r=1w=2|all]] 
[[http://marc.info/?t=10292218941r=1w=2|imported classes]]!
-   * 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=103843452413727w=2|Another 
answer to a classloader issue]]
+   * [[http://marc.info/?l=tomcat-userm=103843452413727w=2|Another answer to 
a classloader issue]]
  
  If you get a {{{NoClassDefFoundError}}} exception, the root cause might be 
the same as for a {{{ClassNotFound}}} exception.
  

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



[Tomcat Wiki] Update of HowTo by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The HowTo page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/HowTo?action=diffrev1=102rev2=103

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  You might want to try serializing the response of 
'request.getUserPrincipal()' and deserialize it to an instance of 
[webapp]MyPrincipal.
  
  == Setting up SSL ==
- Threads from the 
[[http://jakarta.apache.org/tomcat/faq/tomcatuser.html|tomcat-user list]]
+ Threads from the 
[[http://tomcat.apache.org/lists.html#tomcat-users|tomcat-user list]]
  
  Using VeriSign:
  
-  * http://marc.theaimsgroup.com/?l=tomcat-userm=106285452711698w=2
+  * http://marc.info/?l=tomcat-userm=106285452711698w=2
-  * http://marc.theaimsgroup.com/?l=tomcat-userm=107584265122914w=2
+  * http://marc.info/?l=tomcat-userm=107584265122914w=2
  
  Using [[OpenSSL]]:
  
-  * http://marc.theaimsgroup.com/?l=tomcat-userm=106293430225790w=2
+  * http://marc.info/?l=tomcat-userm=106293430225790w=2
-  * http://marc.theaimsgroup.com/?l=tomcat-userm=106453566416102w=2
+  * http://marc.info/?l=tomcat-userm=106453566416102w=2
-  * http://marc.theaimsgroup.com/?l=tomcat-userm=106621232531781w=2
+  * http://marc.info/?l=tomcat-userm=106621232531781w=2
  
  A description of what SSL is all about anyway:
  
-  * http://marc.theaimsgroup.com/?l=tomcat-userm=106692394104667w=2
+  * http://marc.info/?l=tomcat-userm=106692394104667w=2
  
  == HowTo SSL Client Authentication with Fallback to FORM Authentication ==
  See [[SSLWithFORMFallback]]

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



[Tomcat Wiki] Update of FAQ/Security by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Security page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Security?action=diffrev1=8rev2=9

Comment:
Use macro to obfuscate email address

  == Preface ==
- This FAQ section provides help with some security-related issues. If you hear 
of a vulnerability or its exploitation, please let us know on the 
[[mailto:secur...@tomcat.apache.org|secur...@tomcat.apache.org]] mailing list.
+ This FAQ section provides help with some security-related issues. If you hear 
of a vulnerability or its exploitation, please let us know on the 
MailTo(security AT tomcat DOT apache DOT org) mailing list.
  === The Record ===
  
  There have been no public cases of damage done to a company, organization, or 
individual due to a Tomcat security issue. There have been no documented cases 
of data loss or application crashes caused by an intruder. While there have 
been numerous analyses conducted on Tomcat, partially because this is easy to 
do with Tomcat's source code openly available, there have been only 
'''theoretical''' vulnerabilities found. All of those were addressed even 
though there were no documented cases of actual exploitation of these 
vulnerabilities.

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



[Tomcat Wiki] Update of FAQ/Security by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Security page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Security?action=diffrev1=9rev2=10

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  
  Anchor(Q1)'''How do I use OpenSSL to set up my own Certificate Authority 
(CA)?'''
  
- [[http://marc.theaimsgroup.com/?l=tomcat-userm=106293430225790w=2|Using 
OpenSSL to set up your own CA]].
+ [[http://marc.info/?l=tomcat-userm=106293430225790w=2|Using OpenSSL to set 
up your own CA]].
  
  Anchor(Q2)'''OH NO! PORT 8005 is available for anyone on localhost to 
shutdown my tomcat!'''
  
  See these 2 discussions.
  
- * [[http://marc.theaimsgroup.com/?t=10439665323r=1w=2|Possible to 
switch off tcp/ip server shutdown?]]
+ * [[http://marc.info/?t=10439665323r=1w=2|Possible to switch off 
tcp/ip server shutdown?]]
- * [[http://marc.theaimsgroup.com/?t=10312664325r=1w=2|Tomcat 
shutdown  security]]
+ * [[http://marc.info/?t=10312664325r=1w=2|Tomcat shutdown  
security]]
  
  Anchor(Q3)'''What about Tomcat running as root?'''
  
  See these threads:
  
- * [[http://marc.theaimsgroup.com/?t=10451603873r=1w=2|Tomcat as 
root and security issues]]
+ * [[http://marc.info/?t=10451603873r=1w=2|Tomcat as root and 
security issues]]
  
  Anchor(Q4)'''How to I force all my pages to run under HTTPS?'''
  
- [[http://marc.theaimsgroup.com/?l=tomcat-userm=104951559722619w=2|Use 
security-constraint in web.xml]].
+ [[http://marc.info/?l=tomcat-userm=104951559722619w=2|Use 
security-constraint in web.xml]].
  
  Anchor(Q5)'''What is the default login for the manager and admin app?'''
  
@@ -54, +54 @@

  
  Anchor(Q7)'''How do I use jsvc/procrun to run Tomcat on port 80 
securely?'''
  
- Fairly easily ;) See the Setup page in the docs for your tomcat release, and 
read [[http://marc.theaimsgroup.com/?l=tomcat-userm=108566020231438w=2|this 
mailing list post]] for a complete setup example with permissions etc.
+ Fairly easily ;) See the Setup page in the docs for your tomcat release, and 
read [[http://marc.info/?l=tomcat-userm=108566020231438w=2|this mailing list 
post]] for a complete setup example with permissions etc.
  
  Anchor(Q8)'''Has Tomcat's security been independently analyzed or 
audited?'''
  
- Yes, by numerous organizations and individuals, many times. Try 
[[http://www.google.com/search?sourceid=navclientie=UTF-8q=is+tomcat+secure|this
 Google search]] and you'll see many references, guides, and analyses. 
+ Yes, by numerous organizations and individuals, many times. Try 
[[http://www.google.com/search?q=is+tomcat+secure|this Google search]] and 
you'll see many references, guides, and analyses. 
  
  Anchor(Q9)'''How do I change the Server header in the response?'''
  

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



[Tomcat Wiki] Update of FAQ/Memory by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Memory page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Memory?action=diffrev1=9rev2=10

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  
  This page discusses various memory issues. In a nutshell - if your computer 
has less than 128MB of ram - you will probably have trouble. Anyhow, also read 
the following threads for other memory related issues:
  
-  * 
[[http://marc.theaimsgroup.com/?t=10438897306r=1w=2|java.lang.OutOfMemoryError
 during deploy]]
+  * [[http://marc.info/?t=10438897306r=1w=2|java.lang.OutOfMemoryError 
during deploy]]
-  * [[http://marc.theaimsgroup.com/?t=10437834777r=1w=2|Memory 
requirements]]
+  * [[http://marc.info/?t=10437834777r=1w=2|Memory requirements]]
-  * [[http://marc.theaimsgroup.com/?t=10433306644r=1w=2|Memory Mgmt 
Tomcat]]
+  * [[http://marc.info/?t=10433306644r=1w=2|Memory Mgmt Tomcat]]
-  * [[http://marc.theaimsgroup.com/?t=10301137976r=1w=2|Tomcat Out of 
memory]]
+  * [[http://marc.info/?t=10301137976r=1w=2|Tomcat Out of memory]]
-  * [[http://marc.theaimsgroup.com/?t=10451996172r=1w=2|Tracking memory 
usage over time]]
+  * [[http://marc.info/?t=10451996172r=1w=2|Tracking memory usage over 
time]]
  
  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.
  

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



[Tomcat Wiki] Update of FAQ/Database by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Database page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Database?action=diffrev1=4rev2=5

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  
  This page is to discuss database error and DBCP. Until more content can 
appear here, here are some links to the mail archives to perform some searches:
  
-   * 
[[http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=databaseq=b|database]]
+   * [[http://marc.info/?l=tomcat-userw=2r=1s=databaseq=b|database]]
-   * 
[[http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=datasourceq=b|datasource]]
+   * [[http://marc.info/?l=tomcat-userw=2r=1s=datasourceq=b|datasource]]
-   * 
[[http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=oracleq=b|oracle]]
+   * [[http://marc.info/?l=tomcat-userw=2r=1s=oracleq=b|oracle]]
-   * [[http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=mysqlq=b|mysql]]
+   * [[http://marc.info/?l=tomcat-userw=2r=1s=mysqlq=b|mysql]]
-   * 
[[http://marc.theaimsgroup.com/?l=tomcat-userw=2r=1s=dbpoolq=b|dbpool]]
+   * [[http://marc.info/?l=tomcat-userw=2r=1s=dbpoolq=b|dbpool]]
  
  Other Links of interest:
  
@@ -20, +20 @@

* If you use the oracle thin driver, be sure to rename it to a jar file 
from a zip file. Tomcat only auto-magically loads files ending in .jar placed 
in a lib directory. It ignores all other file extensions.
  
  
- [[CategoryFAQ|CategoryFAQ]]
+ [[CategoryFAQ]]
  

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



[Tomcat Wiki] Update of FAQ/Logging by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Logging page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Logging?action=diffrev1=17rev2=18

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  
  See also the following mailing list discussions:
  
-  * [[http://marc.theaimsgroup.com/?l=tomcat-userm=106623436423859w=2|A 
log4j example]]
+  * [[http://marc.info/?l=tomcat-userm=106623436423859w=2|A log4j example]]
-  * 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=108330970225012w=2|Logging 
Configuration]]
+  * [[http://marc.info/?l=tomcat-userm=108330970225012w=2|Logging 
Configuration]]
-  * 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=108578233003073w=2|Example 
with JSVC and running on port 80.]]
+  * [[http://marc.info/?l=tomcat-userm=108578233003073w=2|Example with JSVC 
and running on port 80.]]
   * [[http://minaret.biz/tips/tomcatLogging.html|Tomcat and Log4j 
Configuration (and Velocity), addressing and solving the bootstrap 
commons-logging.jar problem]]
  
  Anchor(Q5)'''How should I log in my own webapps?'''
@@ -72, +72 @@

  
  Anchor(Q6)'''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=10554447261r=1w=2a|thread about 
rotation of 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.info/?t=10554447261r=1w=2a|thread about rotation of 
catalina.out]]
  
  Anchor(Q7)'''Where are the logs when running Tomcat as a Windows 
service?'''
  
@@ -127, +127 @@

  Restart Tomcat... and it's working!
  
  
- [[CategoryFAQ|CategoryFAQ]]
+ [[CategoryFAQ]]
  

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



[Tomcat Wiki] Update of FAQ/Linux_Unix by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Linux_Unix page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Linux_Unix?action=diffrev1=8rev2=9

  
  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=10480304763r=1w=2|here]], 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=102335321103262w=2|here]], or 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=101614645312259w=2|here]].
+ You either need to run headless or run an alternate X-server. Some more 
information can be found [[http://marc.info/?t=10480304763r=1w=2|here]], 
[[http://marc.info/?l=tomcat-userm=102335321103262w=2|here]], or 
[[http://marc.info/?l=tomcat-userm=101614645312259w=2|here]].
  Or if your are using a JVM 1.4 or better, you can use the system property 
{{{java.awt.headless=true}}}
  
  Anchor(Q3)'''Tomcat dies after I log out!'''
  
- This is a common complaint when using Solaris. Make sure you use {{{nohup}}} 
and see 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=104809785114238w=2|this 
thread]]
+ This is a common complaint when using Solaris. Make sure you use {{{nohup}}} 
and see [[http://marc.info/?l=tomcat-userm=104809785114238w=2|this thread]]
  
  Anchor(Q4)'''Error message: SEVERE: StandardServer.await: create[8005]:
  Throwable occurred: java.net.BindException: The socket name is not available 
on this system.'''

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



[Tomcat Wiki] Update of FAQ/Performance_and_Monitoring by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Performance_and_Monitoring page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Performance_and_Monitoring?action=diffrev1=8rev2=9

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  == Preface ==
  This is about Tomcat performance.
  
-  * [thread] [[http://marc.theaimsgroup.com/?t=10445538312r=1w=2|Tomcat 
Performance Concerns]]
+  * [thread] [[http://marc.info/?t=10445538312r=1w=2|Tomcat Performance 
Concerns]]
-  * [thread] [[http://marc.theaimsgroup.com/?t=10359888531r=1w=2|How do 
I increase performance on Tomcat?]]
+  * [thread] [[http://marc.info/?t=10359888531r=1w=2|How do I increase 
performance on Tomcat?]]
  
  Other (non-exhaustive) notes:
  
@@ -22, +22 @@

  == Answers ==
  Anchor(Q1)'''Is Tomcat faster than serving static HTML pages than Apache 
httpd?'''
  
- Yes depending on how you tune it. And NO depending on how you tune it. 
Anything less starts a religious war. We recommend performing your own 
benchmarks and 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=106036177509367w=2|see for 
yourself]].
+ Yes depending on how you tune it. And NO depending on how you tune it. 
Anything less starts a religious war. We recommend performing your own 
benchmarks and [[http://marc.info/?l=tomcat-userm=106036177509367w=2|see for 
yourself]].
  
  
  BR

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



[Tomcat Wiki] Update of FAQ/Windows by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Windows page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Windows?action=diffrev1=11rev2=12

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  == Answers ==
  Anchor(Q1)'''Why do I get Out of Environment Space?'''
  
- Check the Tomcat README, and 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=103918210305702w=2|this link]]
+ Check the Tomcat README, and 
[[http://marc.info/?l=tomcat-userm=103918210305702w=2|this link]]
  
  Anchor(Q2)'''When I start up tomcat (or when it is running), I get the 
error {{{java.lang.IllegalMonitorStateException: current thread not owner}}}'''
  

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



[Tomcat Wiki] Update of FAQ/Tomcat_User by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Tomcat_User page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Tomcat_User?action=diffrev1=4rev2=5

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  
  Anchor(Q3)'''How do I unsubscribe?'''
  
- See the [[http://tomcat.apache.org/lists.html|mailing list page]]. If you are 
unable to unsubscribe, it could be due to your e-mail system mangling your 
e-mail address or you have subscribed under an alias. In that case, maybe 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=104190907020995w=2|this 
thread]] will help.
+ See the [[http://tomcat.apache.org/lists.html|mailing list page]]. If you are 
unable to unsubscribe, it could be due to your e-mail system mangling your 
e-mail address or you have subscribed under an alias. In that case, maybe 
[[http://marc.info/?l=tomcat-userm=104190907020995w=2|this thread]] will help.
  
  If you send an e-mail to the list owner to remove you from the list, be 
prepared to continue receiving more e-mails from the lists until the owner has 
an opportunity to remove you from the list.
  

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



[Tomcat Wiki] Update of FAQ/FDA_Validation by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/FDA_Validation page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/FDA_Validation?action=diffrev1=5rev2=6

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  
  Anchor(Q2)'''Has anyone actually done it?'''
  
- Yes. As shown in 
[[http://marc.theaimsgroup.com/?l=tomcat-userm=109836874319797w=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.
+ Yes. As shown in [[http://marc.info/?l=tomcat-userm=109836874319797w=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.
  
  Anchor(Q3)'''Is Tomcat itself validated?'''
  

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



[Tomcat Wiki] Update of FAQ/Deployment by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The FAQ/Deployment page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/FAQ/Deployment?action=diffrev1=7rev2=8

Comment:
Replace http://marc.theaimsgroup.com/ with http://marc.info/

  == Answers ==
  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-userm=107590945807699w=2|MARC 
Archive]]
+ 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.info/?l=tomcat-userm=107590945807699w=2|MARC Archive]]
  
  Anchor(Q2)'''Why does the memory usage increase when I redeploy a web 
application?'''
  

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



[Tomcat Wiki] Update of HowTo by KonstantinKolinko

2011-07-11 Thread Apache Wiki
Dear Wiki user,

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

The HowTo page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/HowTo?action=diffrev1=103rev2=104

Comment:
Replace jakarta references with something more up-to-date

  == How do I add a question to this page? ==
  Anyone may edit this page to add their own content. That is why this page is 
part of a Wiki and not a hardcoded static file in the FAQ.
  
- However, ''do not'' add questions without answers to this page. If you have a 
question about how to do something in Tomcat which has not been addressed yet, 
ask the [[http://jakarta.apache.org/tomcat/faq/tomcatuser.html|tomcat-user 
list]]. Once you've figured out how to fix your problem, come back and update 
the Wiki to allow the rest of us to benefit from what you've learned!
+ However, ''do not'' add questions without answers to this page. If you have a 
question about how to do something in Tomcat which has not been addressed yet, 
ask the [[http://tomcat.apache.org/lists.html#tomcat-users|tomcat-user list]]. 
Once you've figured out how to fix your problem, come back and update the Wiki 
to allow the rest of us to benefit from what you've learned!
  
  == How do I set up and run Tomcat on Macintosh OS X? ==
  See [[TomcatOnMacOS]]
@@ -91, +91 @@

  
  In particular, here are a number of locations for Tomcat Connectors:
  
-  * [[http://jakarta.apache.org/tomcat/connectors-doc/index.html|Tomcat 
Connectors Documentation]]
+  * [[http://tomcat.apache.org/connectors-doc/index.html|Tomcat Connectors 
Documentation]]
-  * [[http://jakarta.apache.org/tomcat/connectors-doc/faq.html|Tomcat 
Connectors FAQ]]
+  * [[http://tomcat.apache.org/connectors-doc/miscellaneous/faq.html|Tomcat 
Connectors FAQ]]
-  * 
[[http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/config/apache.html|Configuring
 Tomcat Connectors for Apache]]
+  * 
[[http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html|Configuring
 Tomcat Connectors for Apache]]
+  * [[http://tomcat.apache.org/tomcat-7.0-doc/connectors.html|Connectors How 
To]]
+  * [[http://tomcat.apache.org/tomcat-7.0-doc/config/ajp.html|AJP Connector in 
Tomcat 7 Configuration Reference]]
  
  The following '''excellent''' article was written by Mladen Turk. He is a 
Developer and Consultant for JBoss Inc in Europe, where he is responsible for 
native integration. He is a long time commiter for Jakarta Tomcat Connectors, 
Apache Httpd and Apache Portable Runtime projects.
  
@@ -123, +125 @@

   1. Turn off the Java JIT compiler. See the Java Docs on how to do this.
  
  == How do I share sessions across web apps? ==
- You cannot share sessions directly across web apps, as that would be a 
violation of the Servlet Specification.  There are workarounds, including using 
a singleton class loaded from the common classloader repository to hold shared 
information, or putting some of this shared information in a database or 
another data store.  Some of these approaches have been discussed on the 
[[http://jakarta.apache.org/tomcat/faq/tomcatuser.html|tomcat-user mailing 
list]], whose archives you should search for more information.
+ You cannot share sessions directly across web apps, as that would be a 
violation of the Servlet Specification.  There are workarounds, including using 
a singleton class loaded from the common classloader repository to hold shared 
information, or putting some of this shared information in a database or 
another data store.  Some of these approaches have been discussed on the 
[[http://tomcat.apache.org/lists.html#tomcat-users|tomcat-user mailing list]], 
whose archives you should search for more information.
  
  Sharing sessions across containers for clustering or replication purposes is 
a different matter altogether.
- 
- == Why doesn't the NetBeans example build for me? ==
- I have found two issues with the build.xml provided here: 
http://jakarta.apache.org/struts/faqs/netbeans.html
- 
- First, add this to the top of your properties:
- 
- {{{
- property environment=env /
- }}}
- Next find this line in the war target:
- 
- {{{
- classes dir=${build.dir} includes=**/*.properties /
- }}}
- Change it so it reads like this:
- 
- {{{
- classes dir=${src.dir} includes=**/*.properties /
- }}}
- Now it will work!
  
  == I'm encountering classloader problems when using JNI under Tomcat ==
  The important thing to know about using JNI under Tomcat is that one cannot 
place the native libraries OR their JNI interfaces under the WEB-INF/lib or 
WEB-INF/classes directories of a web application and expect to be able to 
reload the webapp without restarting the server. The class that calls 
System.loadLibrary(String) must be loaded by a classloader that is not affected 
by reloading the web application itself.
@@ -283, +265 @@

  See HowTo/FasterStartUp
  
  == How do I contribute to Tomcat's documentation? ==
- - Download the source bundle or grab the source 

svn commit: r1145355 - /tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 21:10:08 2011
New Revision: 1145355

URL: http://svn.apache.org/viewvc?rev=1145355view=rev
Log:
Remove unused import

Modified:
tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java

Modified: tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java?rev=1145355r1=1145354r2=1145355view=diff
==
--- tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java Mon Jul 11 
21:10:08 2011
@@ -21,7 +21,6 @@ package org.apache.catalina.util;
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
 import java.util.Map;
-import java.util.TimeZone;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;



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



svn commit: r1145380 - /tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 22:08:06 2011
New Revision: 1145380

URL: http://svn.apache.org/viewvc?rev=1145380view=rev
Log:
Remove unused attribute

Modified:
tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=1145380r1=1145379r2=1145380view=diff
==
--- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Mon Jul 
11 22:08:06 2011
@@ -1659,7 +1659,6 @@ public class DefaultServlet
 request.setAttribute(org.apache.tomcat.sendfile.start, 
Long.valueOf(range.start));
 request.setAttribute(org.apache.tomcat.sendfile.end, 
Long.valueOf(range.end + 1));
 }
-request.setAttribute(org.apache.tomcat.sendfile.token, this);
 return true;
 }
 return false;



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



svn commit: r1145381 - in /tomcat/trunk/webapps/docs: changelog.xml config/valve.xml

2011-07-11 Thread rjung
Author: rjung
Date: Mon Jul 11 22:08:30 2011
New Revision: 1145381

URL: http://svn.apache.org/viewvc?rev=1145381view=rev
Log:
A little bit of docs is better than nothing ...

Modified:
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/valve.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1145381r1=1145380r2=1145381view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 11 22:08:30 2011
@@ -142,6 +142,9 @@
 improve the lt;c:ifgt; example to make failures more obvious. Based 
on
 suggestions by Charles. (markt)
   /fix
+  add
+Document ExtendedAccessLogValve. (rjung)
+  /add
 /changelog
   /subsection
   subsection name=Other

Modified: tomcat/trunk/webapps/docs/config/valve.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/valve.xml?rev=1145381r1=1145380r2=1145381view=diff
==
--- tomcat/trunk/webapps/docs/config/valve.xml (original)
+++ tomcat/trunk/webapps/docs/config/valve.xml Mon Jul 11 22:08:30 2011
@@ -128,9 +128,7 @@
 from the request and response to be logged, or the word
 codecommon/code or codecombined/code to select a
 standard format.  See below for more information on configuring
-this attribute. Note that the optimized access does only support
-codecommon/code and codecombined/code as the value for this
-attribute./p
+this attribute./p
   /attribute
 
   attribute name=prefix required=false
@@ -279,6 +277,185 @@
 /section
 
 
+section name=Extended Access Log Valve
+
+  subsection name=Introduction
+
+pThe strongExtended Access Log Valve/strong is a variant of
+the Access Log Valve. It is not a real extension of the standard
+Access Log valve, instead it supports the so-called
+a href=http://www.w3.org/TR/WD-logfile.html;Extended Log File Format/a
+defined by the W3C. The main difference to the standard
+codeAccessLogValve/code are the supported pattern values./p
+
+  /subsection
+
+  subsection name=Attributes
+
+pThe strongExtended Access Log Valve/strong supports the following
+configuration attributes:/p
+
+attributes
+
+  attribute name=className required=true
+pJava class name of the implementation to use.  This MUST be set to
+strongorg.apache.catalina.valves.ExtendedAccessLogValve/strong to
+use the extended access log valve./p
+  /attribute
+
+  attribute name=directory required=false
+pAbsolute or relative pathname of a directory in which log files
+created by this valve will be placed.  If a relative path is
+specified, it is interpreted as relative to $CATALINA_BASE.  If
+no directory attribute is specified, the default value is logs
+(relative to $CATALINA_BASE)./p
+  /attribute
+
+  attribute name=encoding required=false
+pCharacter set used to write the log file. An empty string means
+to use the system default character set. Default value: use the
+system default character set.
+/p
+  /attribute
+
+  attribute name=pattern required=false
+pA formatting layout identifying the various information fields
+from the request and response to be logged.
+See below for more information on configuring this attribute./p
+  /attribute
+
+  attribute name=prefix required=false
+pThe prefix added to the start of each log file's name.  If not
+specified, the default value is access_log..  To specify no prefix,
+use a zero-length string./p
+  /attribute
+
+  attribute name=requestAttributesEnabled required=false
+pSet to codetrue/code to check for the existance of request
+attributes (typically set by the RemoteIpValve and similar) that should
+be used to override the values returned by the request for remote
+address, remote host, server port and protocol. If the attributes are
+not set, or this attribute is set to codefalse/code then the 
values 
+from the request will be used. If not set, the default value of
+codefalse/code will be used./p
+  /attribute
+
+  attribute name=resolveHosts required=false
+pSet to codetrue/code to convert the IP address of the remote
+host into the corresponding host name via a DNS lookup.  Set to
+codefalse/code to skip this lookup, and report the remote IP
+address instead./p
+  /attribute
+
+  attribute name=suffix required=false
+pThe suffix added to the end of each log file's name.  If not
+specified, the default value is .  To specify no suffix,
+use a 

svn commit: r1145383 - in /tomcat/trunk: java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml

2011-07-11 Thread markt
Author: markt
Date: Mon Jul 11 22:27:06 2011
New Revision: 1145383

URL: http://svn.apache.org/viewvc?rev=1145383view=rev
Log:
Protect against infinite loops in the HTTP NIO connector if sendfile is 
configured to send more data than is available in the file. (markt)

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1145383r1=1145382r2=1145383view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Mon Jul 11 
22:27:06 2011
@@ -1240,6 +1240,13 @@ public class NioEndpoint extends Abstrac
 sd.pos += written;
 sd.length -= written;
 attachment.access();
+} else {
+// Unusual not to be unable to transfer any bytes
+// Check the length was set correctly
+if (sd.fchannel.size() = sd.pos) {
+throw new IOException(Sendfile configured to  +
+send more data than was available);
+}
 }
 }
 if ( sd.length = 0  sc.getOutboundRemaining()=0) {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1145383r1=1145382r2=1145383view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 11 22:27:06 2011
@@ -120,6 +120,10 @@
 Add missing thread name in RequestProcessor when Servlet 3 Async
 is used. Fixes null thread name in access log and JMX MBean. (rjung)
   /fix
+  fix
+Protect against infinite loops in the HTTP NIO connector if sendfile is
+configured to send more data than is available in the file. (markt)
+  /fix
 /changelog
   /subsection
   subsection name=Cluster



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



svn commit: r1145387 - in /tomcat/trunk/webapps/docs: config/ajp.xml config/http.xml config/valve.xml funcspecs/fs-admin-objects.xml

2011-07-11 Thread rjung
Author: rjung
Date: Mon Jul 11 22:30:45 2011
New Revision: 1145387

URL: http://svn.apache.org/viewvc?rev=1145387view=rev
Log:
Never compare docs and code:

- enableLookups for connector was
  false by default at least the last 5 years.

- resolveHosts for normal and extended
  access log valve wasn't functional in
  the last 4 years (see e.g. r494191) and
  IMHO since noone complaint switching
  enableLookups to true instead is an
  appropriate alternative. So document
  that resolveHosts is no longer supported.

Modified:
tomcat/trunk/webapps/docs/config/ajp.xml
tomcat/trunk/webapps/docs/config/http.xml
tomcat/trunk/webapps/docs/config/valve.xml
tomcat/trunk/webapps/docs/funcspecs/fs-admin-objects.xml

Modified: tomcat/trunk/webapps/docs/config/ajp.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/ajp.xml?rev=1145387r1=1145386r2=1145387view=diff
==
--- tomcat/trunk/webapps/docs/config/ajp.xml (original)
+++ tomcat/trunk/webapps/docs/config/ajp.xml Mon Jul 11 22:30:45 2011
@@ -92,7 +92,7 @@
   order to return the actual host name of the remote client.  Set
   to codefalse/code to skip the DNS lookup and return the IP
   address in String form instead (thereby improving performance).
-  By default, DNS lookups are enabled./p
+  By default, DNS lookups are disabled./p
 /attribute
 
 attribute name=maxPostSize required=false

Modified: tomcat/trunk/webapps/docs/config/http.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/http.xml?rev=1145387r1=1145386r2=1145387view=diff
==
--- tomcat/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/trunk/webapps/docs/config/http.xml Mon Jul 11 22:30:45 2011
@@ -90,7 +90,7 @@
   order to return the actual host name of the remote client.  Set
   to codefalse/code to skip the DNS lookup and return the IP
   address in String form instead (thereby improving performance).
-  By default, DNS lookups are enabled./p
+  By default, DNS lookups are disabled./p
 /attribute
 
 attribute name=maxPostSize required=false

Modified: tomcat/trunk/webapps/docs/config/valve.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/valve.xml?rev=1145387r1=1145386r2=1145387view=diff
==
--- tomcat/trunk/webapps/docs/config/valve.xml (original)
+++ tomcat/trunk/webapps/docs/config/valve.xml Mon Jul 11 22:30:45 2011
@@ -148,10 +148,8 @@
   /attribute
 
   attribute name=resolveHosts required=false
-pSet to codetrue/code to convert the IP address of the remote
-host into the corresponding host name via a DNS lookup.  Set to
-codefalse/code to skip this lookup, and report the remote IP
-address instead./p
+pThis attribute is no longer supported. Use the connector
+attribute codeenableLookups/code instead./p
   /attribute
 
   attribute name=suffix required=false
@@ -209,7 +207,7 @@
 lib%b/b - Bytes sent, excluding HTTP headers, or '-' if zero/li
 lib%B/b - Bytes sent, excluding HTTP headers/li
 lib%h/b - Remote host name (or IP address if
-coderesolveHosts/code is false)/li
+codeenableLookups/code for the connector is false)/li
 lib%H/b - Request protocol/li
 lib%l/b - Remote logical username from identd (always returns
 '-')/li
@@ -341,10 +339,8 @@
   /attribute
 
   attribute name=resolveHosts required=false
-pSet to codetrue/code to convert the IP address of the remote
-host into the corresponding host name via a DNS lookup.  Set to
-codefalse/code to skip this lookup, and report the remote IP
-address instead./p
+pThis attribute is no longer supported. Use the connector
+attribute codeenableLookups/code instead./p
   /attribute
 
   attribute name=suffix required=false

Modified: tomcat/trunk/webapps/docs/funcspecs/fs-admin-objects.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/funcspecs/fs-admin-objects.xml?rev=1145387r1=1145386r2=1145387view=diff
==
--- tomcat/trunk/webapps/docs/funcspecs/fs-admin-objects.xml (original)
+++ tomcat/trunk/webapps/docs/funcspecs/fs-admin-objects.xml Mon Jul 11 
22:30:45 2011
@@ -118,7 +118,7 @@ Operations/a that can be performed whe
   licodedebug/code - Debugging detail level.  [0]/li
   licodeenableLookups/code - Should we perform DNS lookups on remote
   IP addresses when coderequest.getRemoteHost()/code is called?
-  [true]/li
+  [false]/li
   licodemaxProcessors/code - The maximum number of processor threads
   supported by this connector.  [20]/li
   licodeminProcessors/code - The minimum number of processor threads




svn commit: r1145388 - /tomcat/trunk/webapps/docs/changelog.xml

2011-07-11 Thread rjung
Author: rjung
Date: Mon Jul 11 22:33:54 2011
New Revision: 1145388

URL: http://svn.apache.org/viewvc?rev=1145388view=rev
Log:
Maybe someone wants to realize that change.

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1145388r1=1145387r2=1145388view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Jul 11 22:33:54 2011
@@ -149,6 +149,11 @@
   add
 Document ExtendedAccessLogValve. (rjung)
   /add
+  fix
+Correct default value of codeenableLookups/code for connectors
+and mention, that coderesolveHosts/code for the AccessLogValve
+is replaced by codeenableLookups/code. (rjung)
+  /fix
 /changelog
   /subsection
   subsection name=Other



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



Re: Use canonical IPv6 text representation in logs

2011-07-11 Thread Ognjen Blagojevic

On 11.7.2011 20:57, Konstantin Kolinko wrote:

I wonder how Apache HTTPD server handles IP6 addresses.


Out-of-the-box, without any specific configuration, my httpd 2.2.3 
installation on CentOS 5.6, seems to use canonized text representation. 
Here is the log excerpt, slightly obfuscated:



2001::0:a::aa - - [11/Jul/2011:22:32:03 +0200] GET /aaa/aaa.css 
HTTP/1.1 304 - http://aaa.example.com/aaa/aaa.aaa; Mozilla/5.0 
(Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0



So does Linux:


login as: root
root@aaa's password:
Last login: Wed Jul  6 14:17:27 2011 from 2001::0:a::aa
[root@aaa ~]# host aaa
aaa.example.com has address 123.12.1.123
aaa.example.com has IPv6 address 2001::0:aa::aaa


...and Windows XP:


C:\Documents and Settings\ognjennetstat -na

Active Connections

  Proto  Local Address  Foreign AddressState
(snip)
  TCP[2001::0:a::aa]:2276  [2001::0:aa::aaa]:22 
ESTABLISHED 0




2. AccessLogValve system property (-D...)
3. Global Tomcat XML parameter?
4. Global Tomcat system property?


I do not like 2.,3. or 4.


I understand, but then we should add similar parameter to every other 
filter/valve/logger that could use IPv6 addresses, right?



-Ognjen

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