Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspC.java

2003-03-18 Thread Costin Manolache
Remy Maucherat wrote:

 [EMAIL PROTECTED] wrote:
 costin  2003/03/17 12:53:40
 
   Modified:jasper2/src/share/org/apache/jasper Tag: tomcat_4_branch
 JspC.java
   Log:
   I don't know if this can make it into the release - but I can't get
   jspc to work as an ant task without this.
   The problem is that struts is using the thread class loader to locate
   some classes at compile time ( which is correct ), and we don't have it
   set.
   
   Feel free to revert if it causes any problem or if you have a better
   solution.
 
 The patch isn't present in the 5.0 codebase, and it appears to work fine.
 
 I have to note that I had added the same code in 5.0 in my attempts to
 fix the issues with the tag files (before Kin-Man properly fixed it),
 and ran into a lot of CL errors because of it. So it could be causing
 issues.

I'm using JDK1.4.1. 

Different versions of Struts behave differently. The root of the problem 
is loading of resources or other classes at translation time.
Some programms ( including various versions of struts ) use the thread class
loader - which in normal use case is a good choice and will find jars in
the webapp.

For precompile - if we don't set the thread loader, then all the code that 
uses it will fail - at least if we use ant and a classpath. It'll probably
work if everything is included in the CLASSPATH.

I can try some workarounds for my build - but I think setting the thread
loader to emulate the runtime compilation ( where the TCL is set ) is the
right solution.  I just don't see how it could work otherwise for jars that
expect it to be set.

Costin
 
 We'll see if people can reproduce the precompilation problem with 4.1.23
 (I can't on JDK 1.4.1; which JDK are you using ?), and otherwise, I'd
 feel safer if the patch was reverted.



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



DO NOT REPLY [Bug 15776] - cannot use non default channel port in jk2

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

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

cannot use non default channel port in jk2





--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 08:35 ---
Deleting $CATALINA_HOME/bin/tomcat-jni.jar resolved this for me.  The classes 
in tomcat-jni conflict with the classes in $CATALINA_HOME/server/lib/tomcat-
jk2.jar.

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



DO NOT REPLY [Bug 16988] - Can't create apr

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

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

Can't create apr





--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 08:36 ---
Deleting $CATALINA_HOME/bin/tomcat-jni.jar resolved this for me.  The classes 
in tomcat-jni conflict with the classes in $CATALINA_HOME/server/lib/tomcat-
jk2.jar.

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



DO NOT REPLY [Bug 4663] - Broken Pipe under some load

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

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

Broken Pipe under some load





--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 10:12 ---
We are experiencing the same error with jboss-3.0.6_tomcat-4.1.18. 

Can we apply any work-
arround for this problem?

We are thinking to use apache as web server.

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



cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteResponse.java

2003-03-18 Thread remm
remm2003/03/18 02:38:46

  Modified:coyote/src/java/org/apache/coyote/tomcat4 Tag: coyote_10
CoyoteResponse.java
  Log:
  - Fix the status of committed after the response is suspended (bug 16508).
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.31.2.1  +5 -5  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java,v
  retrieving revision 1.31
  retrieving revision 1.31.2.1
  diff -u -r1.31 -r1.31.2.1
  --- CoyoteResponse.java   19 Dec 2002 08:59:50 -  1.31
  +++ CoyoteResponse.java   18 Mar 2003 10:38:46 -  1.31.2.1
  @@ -350,7 +350,7 @@
* Application commit flag accessor.
*/
   public boolean isAppCommitted() {
  -return (this.appCommitted || isCommitted());
  +return (this.appCommitted || isCommitted() || isSuspended());
   }
   
   
  
  
  

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



cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteResponse.java

2003-03-18 Thread remm
remm2003/03/18 02:42:21

  Modified:coyote/src/java/org/apache/coyote/tomcat4
CoyoteResponse.java
  Log:
  - Port patch.
  
  Revision  ChangesPath
  1.32  +5 -5  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteResponse.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- CoyoteResponse.java   19 Dec 2002 08:59:50 -  1.31
  +++ CoyoteResponse.java   18 Mar 2003 10:42:21 -  1.32
  @@ -350,7 +350,7 @@
* Application commit flag accessor.
*/
   public boolean isAppCommitted() {
  -return (this.appCommitted || isCommitted());
  +return (this.appCommitted || isCommitted() || isSuspended());
   }
   
   
  
  
  

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



[GUMP] Build timed out - jk2

2003-03-18 Thread Craig McClanahan

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


Buildfile: build.xml

init.taskdef:

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

init.win32.properties:

init.win32.mc:

init.win32:

init.netware:

init.os:

guess.server:
 [echo] Apache2 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/${env.APACHE2_HOME} 
${apache2.detect}
 [echo] Apache13 /usr true
 [echo] IIS ${iis.home} ${iis.detect}
 [echo] Iplanet ${iplanet.home} ${iplanet.detect}
 [echo] JNI ${build.jni}


init:
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-connectors/jk/build/jk2

apache20:

apache13:
[mkdir] Created dir: 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/build/jk2/apache13
   [so] Compiling 39 out of 39
Compiling 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_jni.c
Compiling /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel.c
Compiling 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_logger_file.c
Compiling /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_env.c
Compiling 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c
Compiling 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
Compiling 
/home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_channel_un.c
Compiling /home/rubys/jakarta/jakarta-tomcat-connectors/jk/native2/common/jk_config.c
/home/rubys/bin/timeout: timed out

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



[GUMP] Build Failure - jakarta-tomcat-5

2003-03-18 Thread bobh

This email is autogenerated from the output from:
http://cvs.apache.org/builds/gump/2003-03-18/jakarta-tomcat-5.html


Buildfile: build.xml

prepare-release:
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/release
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/release/v5.0
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/release/v5.0/bin
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/release/v5.0/src

init:
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/build
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/build/classes
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/build/server/lib
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib

deploy-static:
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/common/lib
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat-5/build/server/lib

BUILD FAILED
file:///home/rubys/jakarta/jakarta-tomcat-5/build.xml:141: Warning: Could not find 
file /home/rubys/jakarta/jakarta-commons/modeler/commons-modeler.jar to copy.

Total time: 2 seconds

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



cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5 CoyoteResponse.java

2003-03-18 Thread remm
remm2003/03/18 02:54:54

  Modified:coyote/src/java/org/apache/coyote/tomcat5
CoyoteResponse.java
  Log:
  - Port patch.
  - Note: The appCommitted flag is not useful, but I'll leave it in in the event we 
want
to separate the application commit (calling flush) with the real socket commit.
I do not quite undestand why the application is allowed to make operations
which have direct impact on the network layer, without allowing the
container to optimize anything.
  
  Revision  ChangesPath
  1.19  +5 -5  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java
  
  Index: CoyoteResponse.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat5/CoyoteResponse.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- CoyoteResponse.java   9 Jan 2003 18:15:05 -   1.18
  +++ CoyoteResponse.java   18 Mar 2003 10:54:54 -  1.19
  @@ -364,7 +364,7 @@
* Application commit flag accessor.
*/
   public boolean isAppCommitted() {
  -return (this.appCommitted || isCommitted());
  +return (this.appCommitted || isCommitted() || isSuspended());
   }
   
   
  
  
  

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



DO NOT REPLY [Bug 16508] - Response is not being committed after RequestDispatcher forward

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

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

Response is not being committed after RequestDispatcher forward

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 10:57 ---
This is fixed. I'm not convinced this was actually working in 4.1.12, looking at
the diffs.

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



cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.1.txt

2003-03-18 Thread remm
remm2003/03/18 02:56:12

  Modified:.RELEASE-NOTES-4.1.txt
  Log:
  - Status update.
  
  Revision  ChangesPath
  1.69  +9 -2  jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt
  
  Index: RELEASE-NOTES-4.1.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- RELEASE-NOTES-4.1.txt 17 Mar 2003 10:21:32 -  1.68
  +++ RELEASE-NOTES-4.1.txt 18 Mar 2003 10:56:12 -  1.69
  @@ -907,9 +907,13 @@
   [4.1.23] CoyoteAdapter:
Reject decoded URIs which don't start with '/'.
   
  -[4.1.23] Cookies:
  +[4.1.24] Cookies:
Add handling for bad cookies.
   
  +[4.1.24] #16508
  + CoyoteResponse:
  + Fix value of the committed flag after the response is finished.
  +
   
   
   Jasper Bug Fixes:
  @@ -1214,6 +1218,9 @@
   
   [4.1.23] Compiler:
Avoid NPE when using JSPC using the built-in compiler.
  +
  +[4.1.24] JspC:
  + Set the thread context class loader to the specified classpath.
   
   
   
  
  
  

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



[Fwd: failure notice]

2003-03-18 Thread Amy Roh
FYI.  The change was too big to be posted.

 Original Message 
Subject: failure notice
Date: 18 Mar 2003 10:48:29 -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Hi. This is the qmail-send program at apache.org.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
[EMAIL PROTECTED]:
ezmlm-reject: fatal: Sorry, I don't accept messages larger than 10 
bytes (#5.2.3)

--- Below this line is a copy of the message.

Return-Path: [EMAIL PROTECTED]
Received: (qmail 43645 invoked by uid 500); 18 Mar 2003 10:48:29 -
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 43618 invoked from network); 18 Mar 2003 10:48:28 -
Received: from icarus.apache.org (208.185.179.13)
  by daedalus.apache.org with SMTP; 18 Mar 2003 10:48:28 -
Received: (qmail 24363 invoked by uid 1290); 18 Mar 2003 10:48:27 -
Date: 18 Mar 2003 10:48:27 -
Message-ID: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: cvs commit: 
jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve 
AddValveAction.java DeleteValvesAction.java ValveUtil.java
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N

amyroh  2003/03/18 02:48:26

  Modified:webapps/admin/WEB-INF web.xml
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin
Lists.java SetUpTreeAction.java
TomcatTreeBuilder.java TreeControlNode.java
webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector
AddConnectorAction.java DeleteConnectorAction.java
DeleteConnectorsAction.java
SaveConnectorAction.java
webapps/admin/WEB-INF/classes/org/apache/webapp/admin/context
AddContextAction.java DeleteContextAction.java
DeleteContextsAction.java EditContextAction.java
SaveContextAction.java
webapps/admin/WEB-INF/classes/org/apache/webapp/admin/defaultcontext
AddDefaultContextAction.java
DeleteDefaultContextAction.java
DeleteDefaultContextsAction.java
EditDefaultContextAction.java
SaveDefaultContextAction.java
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/host
DeleteHostAction.java DeleteHostsAction.java
EditHostAction.java SaveHostAction.java
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/logger
AddLoggerAction.java DeleteLoggerAction.java
DeleteLoggersAction.java SaveLoggerAction.java
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/realm
AddRealmAction.java DeleteRealmsAction.java
EditRealmAction.java SaveJDBCRealmAction.java
SaveJNDIRealmAction.java SaveMemoryRealmAction.java
SaveUserDatabaseRealmAction.java
webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources
DeleteDataSourcesAction.java
DeleteEnvEntriesAction.java
DeleteMailSessionsAction.java
DeleteResourceLinksAction.java
DeleteUserDatabasesAction.java
ListDataSourcesAction.java
ListEnvEntriesAction.java
ListMailSessionsAction.java
ListResourceLinksAction.java ResourceUtils.java
ResourcesTreeBuilder.java SaveDataSourceAction.java
SaveEnvEntryAction.java SaveMailSessionAction.java
SaveResourceLinkAction.java
SaveUserDatabaseAction.java
webapps/admin/WEB-INF/classes/org/apache/webapp/admin/service
DeleteServiceAction.java DeleteServicesAction.java
SaveServiceAction.java
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users
UsersTreeBuilder.java
   webapps/admin/WEB-INF/classes/org/apache/webapp/admin/valve
AddValveAction.java DeleteValvesAction.java
ValveUtil.java
  Log:
  Partial work towards to synch up MBean ObjectNames without service 
attribute.
  Need to deprecate the usage of MBeanFactory and use Catalina components'
  JMX calls instead.



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


DO NOT REPLY [Bug 18100] New: - jspc dependency checking doesn't work

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

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

jspc dependency checking doesn't work

   Summary: jspc dependency checking doesn't work
   Product: Tomcat 4
   Version: 4.1.23
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Jasper 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Jspc has an error in the dependency checking.




ant -verbose gives:




compileJsp2:


 [jspc] Compiling C:\crm-ronald\crm\web\help\helpdisp.jsp because java file 
C:\temp\jspc\java\jspc\helpdisp.java does not exist


 [jspc] Compiling C:\crm-ronald\crm\web\help\helpsearch.jsp because java 
file C:\temp\jspc\java\jspc\helpsearch.java does not exist




I have jspc package=jspc ../jspc in my build.xml.


Jspc generates:


c:\temp\jspc\java\help\helpdisp_jsp.java with a package of jspc.help.


It should generate (I think):


c:\temp\jspc\java\jspc\help\helpdisp_jsp.java.




Javac doesn't complain and everything works, but it compiles all the jsp's 
everytime, which takes a lot of time.

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



DO NOT REPLY [Bug 18100] - jspc dependency checking doesn't work

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

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

jspc dependency checking doesn't work

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 12:15 ---
This probably has to do with me using the jspc task of ant 1.5.2.

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



DO NOT REPLY [Bug 15576] - IllegalArgumentException during adding a cookie

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

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

IllegalArgumentException during adding a cookie





--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 16:19 ---
I began seeing this bug after upgrading from tomcat 4.0.4 to 4.1.18...the error
definitley occurs when you try to add a cookie that has version 0.  however, 0
is the default value (at least as far as jdk1.3.1 goes...
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/Cookie.html#getVersion()

the workaround i've been using is to explicitly set the version of my cookies to
1.  not exactly sure what ramifications this will have.

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ApplicationDispatcher.java

2003-03-18 Thread jfarcand
jfarcand2003/03/18 08:23:36

  Modified:catalina/src/share/org/apache/catalina/core
ApplicationDispatcher.java
  Log:
  Properly set the value used to create filter chain under a 
ApplicationDispatcher.forward
  
  Fix for bug: 17783,17784,17785,17787
  
  Revision  ChangesPath
  1.12  +19 -38
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
  
  Index: ApplicationDispatcher.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ApplicationDispatcher.java19 Feb 2003 20:05:33 -  1.11
  +++ ApplicationDispatcher.java18 Mar 2003 16:23:36 -  1.12
  @@ -129,7 +129,7 @@
   this.response = response;
   }
   
  -public Object run() throws ServletException, IOException {
  +public Object run() throws java.lang.Exception {
   doForward(request,response);
   return null;
   }
  @@ -397,17 +397,10 @@
   
   if ( log.isDebugEnabled() )
   log.debug( Non-HTTP Forward);
  -// only set the Dispatcher Type to Forward if it has not been set. It 
will have
  -// been set by the ErrorDispatcherValue in the case of an ERROR
  -// it will be REQUEST coming in from the StandardWrapperValue and 
  -// ERROR coming from the ErrorDispatcherValue
  -if (request.getAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR) 
!= null){
  -Integer disInt = 
(Integer)request.getAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR);
  -if (disInt.intValue() != ApplicationFilterFactory.ERROR) {
  -
request.setAttribute(ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR, 
origServletPath);
  -
request.setAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR, new 
Integer(ApplicationFilterFactory.FORWARD));
  -}
  -}
  +
  +
outerRequest.setAttribute(ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR, 
origServletPath);
  +
outerRequest.setAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR, new 
Integer(ApplicationFilterFactory.FORWARD));
  +
   invoke(request, response);
   }
   
  @@ -416,17 +409,11 @@
   
   if ( log.isDebugEnabled() )
   log.debug( Named Dispatcher Forward);
  -// only set the Dispatcher Type to Forward if it has not been set. It 
will have
  -// been set by the ErrorDispatcherValue in the case of an ERROR
  -// it will be REQUEST coming in from the StandardWrapperValue and 
  -// ERROR coming from the ErrorDispatcherValue
  -if (request.getAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR) 
!= null){
  -Integer disInt = 
(Integer)request.getAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR);
  -if (disInt.intValue() != ApplicationFilterFactory.ERROR) {
  -
request.setAttribute(ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR, 
origServletPath);
  -
request.setAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR, new 
Integer(ApplicationFilterFactory.FORWARD));
  -}
  -}
  +
  +
  +
request.setAttribute(ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR, 
origServletPath);
  +request.setAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR, new 
Integer(ApplicationFilterFactory.FORWARD));
  +
   invoke(request, response);
   
   }
  @@ -468,17 +455,9 @@
wrequest.setQueryParams(queryString);
   }
   
  -// only set the Dispatcher Type to Forward if it has not been set. It 
will have
  -// been set by the ErrorDispatcherValue in the case of an ERROR
  -// it will be REQUEST coming in from the StandardWrapperValue and 
  -// ERROR coming from the ErrorDispatcherValue
  -if 
(wrequest.getAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR) != null){
  -Integer disInt = 
(Integer)request.getAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR);
  -if (disInt.intValue() != ApplicationFilterFactory.ERROR) {
  -
wrequest.setAttribute(ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR, 
origServletPath);
  -
wrequest.setAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR, new 
Integer(ApplicationFilterFactory.FORWARD));
  -}
  -}
  +

DO NOT REPLY [Bug 17784] - filter not invoked when dispatcher value set to FORWARD only

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

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

filter not invoked  when dispatcher value set   to FORWARD only

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 16:26 ---
The forward mechanism was broken. Please try an let me know.

Thanks,

-- Jeanfrancois

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



DO NOT REPLY [Bug 17783] - filter invoked incorrectly when dispatcher value set to FORWARD only

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

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

filter invoked incorrectly when dispatcher value set to FORWARD only

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 16:26 ---
The forward mechanism was broken. Please try an let me know.

Thanks,

-- Jeanfrancois

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



DO NOT REPLY [Bug 17785] - filter not invoked at all RequestDispatcher.include actions

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

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

filter not invoked at all RequestDispatcher.include actions

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 16:26 ---
The forward mechanism was broken. Please try an let me know.

Thanks,

-- Jeanfrancois

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



DO NOT REPLY [Bug 17787] - filter not invoked whenDISPATCHER value set to ERROR

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

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

filter not invoked whenDISPATCHER value set to ERROR

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 16:27 ---
The forward mechanism was broken. Please try an let me know.

Thanks,

-- Jeanfrancois

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



cvs commit: jakarta-tomcat-connectors/jk/xdocs menu.jk2.idx

2003-03-18 Thread jfclere
jfclere 2003/03/18 08:35:18

  Modified:jk/xdocs menu.jk2.idx
  Log:
  The style does not allow a section in section...
  An empty section is not as nice as a subsection but that the only work-around
  I have found.
  
  Revision  ChangesPath
  1.5   +1 -1  jakarta-tomcat-connectors/jk/xdocs/menu.jk2.idx
  
  Index: menu.jk2.idx
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/menu.jk2.idx,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- menu.jk2.idx  16 Mar 2003 00:56:33 -  1.4
  +++ menu.jk2.idx  18 Mar 2003 16:35:18 -  1.5
  @@ -1,6 +1,7 @@
   ?xml version=1.0 encoding=ISO-8859-1?
   
   section name=JK2
  +/section
   section name=Configuration in the Tomcat
   document href=jk2/configtc.xml/
   document href=jk2/configtccom.xml/
  @@ -16,5 +17,4 @@
   /section
   section name=Howto
   document href=jk2/confighowto.xml/
  -/section
   /section
  
  
  

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



DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context

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

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

DataSourceRealm can not find JNDI name in context

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|CLOSED  |REOPENED
 Resolution|FIXED   |



--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 18:54 ---
I've made my own realm which uses DataSource, based on the DataSourceRealm code,
and dealt with the

   javax.naming.NameNotFoundException: Name java: is not bound in this Context

problem. In addition to removing the connection check from the start method (as
Glenn indicated), I also changed these lines in open():

   StandardServer server = (StandardServer) ServerFactory.getServer();
   Context context = server.getGlobalNamingContext();

to:

   Context context = new InitialContext();

I think this is what allowed me to put my realm and datasource within the
context of my webapp, rather than in GlobalNamingResources.  This seems like a
worthwhile change to me. On the other hand, the InitialContext class is
imported, but not used, in DataSourceRealm - so, maybe my way had problems in
the past that were corrected with the getGlobalNamingContext() approach.

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



DO NOT REPLY [Bug 18019] - DbcpDataSourceFactory and getConnection(String, String)

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

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

DbcpDataSourceFactory and getConnection(String, String)

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Blocker |Normal

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



DO NOT REPLY [Bug 18044] - Session object recycling before all bound listeners has been notified.

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

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

Session object recycling before all bound listeners has been notified.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|DUPLICATE   |



--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 22:49 ---
I have obtained the sources from cvs tomcat_331_final branch and the fix for
this (or bug 15894) does not seems to be part of it.

It seems to have been applied to the head only, since I found it resolved 
in the release notes for 3.3.2.

This problem should be considered a major issue and it would be nice to have
a patch for 3.3.1/3.3.1a if the 3.3.2 release date is still to be determined.

Any comment and help would be appreciated.

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



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator AuthenticatorBase.java

2003-03-18 Thread keith
keith   2003/03/18 17:33:17

  Modified:.RELEASE-NOTES-4.1.txt
   catalina/src/share/org/apache/catalina/authenticator
AuthenticatorBase.java
  Log:
  Rollback incorrect fix for 14616
  
  Revision  ChangesPath
  1.70  +1 -5  jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt
  
  Index: RELEASE-NOTES-4.1.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- RELEASE-NOTES-4.1.txt 18 Mar 2003 10:56:12 -  1.69
  +++ RELEASE-NOTES-4.1.txt 19 Mar 2003 01:33:16 -  1.70
  @@ -731,10 +731,6 @@
JDBCStore
Fix bug where first session in result set was skipped.
   
  -[4.1.23] #14616
  - AuthenticatorBase
  - Redirect for trailing slash prior to auth challenge for root contexts 
  -
   
   
   Coyote Bug Fixes:
  
  
  
  1.37  +6 -14 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java
  
  Index: AuthenticatorBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/AuthenticatorBase.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- AuthenticatorBase.java12 Mar 2003 14:48:13 -  1.36
  +++ AuthenticatorBase.java19 Mar 2003 01:33:17 -  1.37
  @@ -444,16 +444,6 @@
   HttpRequest hrequest = (HttpRequest) request;
   HttpResponse hresponse = (HttpResponse) response;
   
  -// Do not authenticate prior to redirects for trailing slashes,
  -// at least for the root of the context
  -String requestURI = hrequest.getDecodedRequestURI();
  -String contextPath = this.context.getPath();
  -if (requestURI.charAt(requestURI.length() - 1) != '/' 
  -requestURI.equals(contextPath)) {
  -context.invokeNext(request, response);
  -return;
  -}
  -
   if (debug = 1)
   log(Security checking request  +
   ((HttpServletRequest) request.getRequest()).getMethod() +   +
  @@ -484,6 +474,8 @@
   // Special handling for form-based logins to deal with the case
   // where the login form (and therefore the j_security_check URI
   // to which it submits) might be outside the secured area
  +String requestURI = hrequest.getDecodedRequestURI();
  +String contextPath = this.context.getPath();
   if (requestURI.startsWith(contextPath) 
   requestURI.endsWith(Constants.FORM_ACTION)) {
   if (!authenticate(hrequest, hresponse, config)) {
  
  
  

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



[PATCH] jakarta-servletapi-5 - EL examples

2003-03-18 Thread Mark Roth
Quick patch to improve JSP 2.0 EL examples:

* Added example of conditional operator ${(1==2) ? 3 : 4}
  Commented out, since this is not yet implemented.
* Changed quoting from old-style ${'${'} 1 + 2 }
  to new-style \${ 1 + 2 }
---
Mark Roth, Java Software
JSP 2.0 Co-Specification Lead
Sun Microsystems, Inc.
Index: jsr152/examples/jsp2/el/basic-arithmetic.jsp
===
RCS file: 
/home/cvspublic/jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-arithmetic.jsp,v
retrieving revision 1.1
diff -u -r1.1 basic-arithmetic.jsp
--- jsr152/examples/jsp2/el/basic-arithmetic.jsp7 Sep 2002 00:47:59 -  
 1.1
+++ jsr152/examples/jsp2/el/basic-arithmetic.jsp19 Mar 2003 03:39:43 -
@@ -18,49 +18,55 @@
tdbResult/b/td
  /thead
  tr
-   td${'${'}1}/td
+   td\${1}/td
td${1}/td
  /tr
  tr
-   td${'${'}1 + 2}/td
+   td\${1 + 2}/td
td${1 + 2}/td
  /tr
  tr
-   td${'${'}1.2 + 2.3}/td
+   td\${1.2 + 2.3}/td
td${1.2 + 2.3}/td
  /tr
  tr
-   td${'${'}1.2E4 + 1.4}/td
+   td\${1.2E4 + 1.4}/td
td${1.2E4 + 1.4}/td
  /tr
  tr
-   td${'${'}-4 - 2}/td
+   td\${-4 - 2}/td
td${-4 - 2}/td
  /tr
  tr
-   td${'${'}21 * 2}/td
+   td\${21 * 2}/td
td${21 * 2}/td
  /tr
  tr
-   td${'${'}3/4}/td
+   td\${3/4}/td
td${3/4}/td
  /tr
  tr
-   td${'${'}3 div 4}/td
+   td\${3 div 4}/td
td${3 div 4}/td
  /tr
  tr
-   td${'${'}3/0}/td
+   td\${3/0}/td
td${3/0}/td
  /tr
  tr
-   td${'${'}10%4}/td
+   td\${10%4}/td
td${10%4}/td
  /tr
  tr
-   td${'${'}10 mod 4}/td
+   td\${10 mod 4}/td
td${10 mod 4}/td
  /tr
+%-- XXX - NOT YET IMPLEMENTED
+  tr
+td\${(1==2) ? 3 : 4}/td
+td${(1==2) ? 3 : 4}/td
+  /tr
+--%
/table
   /code
 /blockquote
Index: jsr152/examples/jsp2/el/basic-arithmetic.txt
===
RCS file: 
/home/cvspublic/jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-arithmetic.txt,v
retrieving revision 1.1
diff -u -r1.1 basic-arithmetic.txt
--- jsr152/examples/jsp2/el/basic-arithmetic.txt7 Sep 2002 00:47:59 -  
 1.1
+++ jsr152/examples/jsp2/el/basic-arithmetic.txt19 Mar 2003 03:39:43 -
@@ -18,49 +18,55 @@
tdbResult/b/td
  /thead
  tr
-   td${'${'}1}/td
+   td\${1}/td
td${1}/td
  /tr
  tr
-   td${'${'}1 + 2}/td
+   td\${1 + 2}/td
td${1 + 2}/td
  /tr
  tr
-   td${'${'}1.2 + 2.3}/td
+   td\${1.2 + 2.3}/td
td${1.2 + 2.3}/td
  /tr
  tr
-   td${'${'}1.2E4 + 1.4}/td
+   td\${1.2E4 + 1.4}/td
td${1.2E4 + 1.4}/td
  /tr
  tr
-   td${'${'}-4 - 2}/td
+   td\${-4 - 2}/td
td${-4 - 2}/td
  /tr
  tr
-   td${'${'}21 * 2}/td
+   td\${21 * 2}/td
td${21 * 2}/td
  /tr
  tr
-   td${'${'}3/4}/td
+   td\${3/4}/td
td${3/4}/td
  /tr
  tr
-   td${'${'}3 div 4}/td
+   td\${3 div 4}/td
td${3 div 4}/td
  /tr
  tr
-   td${'${'}3/0}/td
+   td\${3/0}/td
td${3/0}/td
  /tr
  tr
-   td${'${'}10%4}/td
+   td\${10%4}/td
td${10%4}/td
  /tr
  tr
-   td${'${'}10 mod 4}/td
+   td\${10 mod 4}/td
td${10 mod 4}/td
  /tr
+%-- XXX - NOT YET IMPLEMENTED
+  tr
+td\${(1==2) ? 3 : 4}/td
+td${(1==2) ? 3 : 4}/td
+  /tr
+--%
/table
   /code
 /blockquote
Index: jsr152/examples/jsp2/el/basic-comparisons.jsp
===
RCS file: 
/home/cvspublic/jakarta-servletapi-5/jsr152/examples/jsp2/el/basic-comparisons.jsp,v
retrieving revision 1.1
diff -u -r1.1 basic-comparisons.jsp
--- jsr152/examples/jsp2/el/basic-comparisons.jsp   7 Sep 2002 00:47:59 -  
 1.1
+++ jsr152/examples/jsp2/el/basic-comparisons.jsp   19 Mar 2003 03:39:43 -
@@ -24,51 +24,51 @@
tdbResult/b/td
  /thead
  tr
-   td${'${'}1 lt; 2}/td
+   td\${1 lt; 2}/td
td${1  2}/td
  /tr
  tr
-   td${'${'}1 lt 2}/td
+   td\${1 lt 2}/td
td${1 lt 2}/td
  /tr
  tr
-   td${'${'}1 gt; 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardEngine.java

2003-03-18 Thread costin
costin  2003/03/18 23:23:57

  Modified:catalina/src/share/org/apache/catalina/core
StandardEngine.java
  Log:
  Register standard engine.
  
  After all the init is done, I'll start testing the destroy and reloading.
  
  Revision  ChangesPath
  1.7   +9 -4  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java
  
  Index: StandardEngine.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StandardEngine.java   17 Mar 2003 19:16:42 -  1.6
  +++ StandardEngine.java   19 Mar 2003 07:23:57 -  1.7
  @@ -85,6 +85,7 @@
   import org.apache.catalina.util.ServerInfo;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.commons.modeler.Registry;
   
   /**
* Standard implementation of the bEngine/b interface.  Each
  @@ -383,6 +384,7 @@
   domain=getName();
   log.info( Register  + domain );
   oname=new ObjectName(domain + :type=Engine);
  +Registry.getRegistry().registerComponent(this, oname, null);
   } catch( Throwable t ) {
   log.info(Error registering , t );
   }
  @@ -415,6 +417,9 @@
   public void start() throws LifecycleException {
   if( started ) {
   return;
  +}
  +if( !initialized ) {
  +init();
   }
   // Log our server identification information
   //System.out.println(ServerInfo.getServerInfo());
  
  
  

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



Xerces Question

2003-03-18 Thread Bill Barker
I've been trying to set up a CLIENT-CERT authentication for MemoryRealm (one
of the few that handles it :).  The CN for the cert has embedded quot;
characters in it.  It seems that xerces chokes on attributes that have
quot; embedded in them (which I had learned was the only reason to have
quot; defined in the first place :).  I've tried all of the XML tricks that
I know (e.g. !ENTITY quote #x026;#x022;), but nothing works.  Any hints
on how to embed quot; into an attribute?



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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHost.java

2003-03-18 Thread costin
costin  2003/03/18 23:24:40

  Modified:catalina/src/share/org/apache/catalina/core
StandardHost.java
  Log:
  Updates.
  
  Revision  ChangesPath
  1.6   +35 -24
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java
  
  Index: StandardHost.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StandardHost.java 17 Mar 2003 07:32:53 -  1.5
  +++ StandardHost.java 19 Mar 2003 07:24:40 -  1.6
  @@ -65,6 +65,7 @@
   import java.net.URL;
   import javax.management.ObjectName;
   import javax.management.MBeanServer;
  +import javax.management.MalformedObjectNameException;
   import org.apache.catalina.Container;
   import org.apache.catalina.Context;
   import org.apache.catalina.DefaultContext;
  @@ -74,6 +75,7 @@
   import org.apache.catalina.Valve;
   import org.apache.catalina.valves.ErrorDispatcherValve;
   import org.apache.catalina.valves.ValveBase;
  +import org.apache.commons.modeler.Registry;
   
   
   /**
  @@ -759,18 +761,8 @@
   if( started ) {
   return;
   }
  -if( oname==null ) {
  -// not registered in JMX yet - standalone mode
  -try {
  -StandardEngine engine=(StandardEngine)parent;
  -domain=engine.getName();
  -log.info( Register  + domain );
  -oname=new ObjectName(domain + :type=Host,host= +
  -this.getName());
  -} catch( Throwable t ) {
  -log.info(Error registering , t );
  -}
  -}
  +if( ! initialized )
  +init();
   // Set error report valve
   if ((errorReportValveClass != null)
(!errorReportValveClass.equals())) {
  @@ -1031,21 +1023,40 @@
   return aliases;
   }
   
  -public void init() throws Exception {
  +private boolean initialized=false;
  +
  +public void init() {
  +if( initialized ) return;
  +initialized=true;
  +
   // already registered.
  -if( getParent() != null ) return;
  -
  -// Register with the Engine
  -ObjectName serviceName=new ObjectName(domain + :type=Engine);
  -
  -if( mserver.isRegistered( serviceName )) {
  -log.info(Registering with the Engine);
  +if( getParent() == null ) {
   try {
  -mserver.invoke( serviceName, addChild,
  -new Object[] { this },
  -new String[] { org.apache.catalina.Container } );
  +// Register with the Engine
  +ObjectName serviceName=new ObjectName(domain + :type=Engine);
  +
  +if( mserver.isRegistered( serviceName )) {
  +log.info(Registering with the Engine);
  +mserver.invoke( serviceName, addChild,
  +new Object[] { this },
  +new String[] { org.apache.catalina.Container } );
  +}
   } catch( Exception ex ) {
   ex.printStackTrace();
  +}
  +}
  +
  +if( oname==null ) {
  +// not registered in JMX yet - standalone mode
  +try {
  +StandardEngine engine=(StandardEngine)parent;
  +domain=engine.getName();
  +log.info( Register  + domain );
  +oname=new ObjectName(domain + :type=Host,host= +
  +this.getName());
  +Registry.getRegistry().registerComponent(this, oname, null);
  +} catch( Throwable t ) {
  +log.info(Error registering , t );
   }
   }
   }
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/logger LoggerBase.java

2003-03-18 Thread costin
costin  2003/03/18 23:27:57

  Modified:catalina/src/share/org/apache/catalina/logger
LoggerBase.java
  Log:
  Registration for loggers.
  
  We do need to make a final decision about this. I didn't get any feedback on the
  logger names used in context  ( with the context path as prefix of the logger name ).
  IMO the logging in tomcat should be delegated via commons-logging to an external
  implementation - either jdk1.4 logging or log4j.
  
  We do need to decide on the names of the loggers and provide some default
  configs, and eventually start bundling log4j or config files for jdk1.4 ( or
  both ). If we do that, LoggerBase and all other classes will remain only
  for backward compatibility.
  
  Revision  ChangesPath
  1.2   +123 -9
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/logger/LoggerBase.java
  
  Index: LoggerBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/logger/LoggerBase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoggerBase.java   18 Jul 2002 16:48:01 -  1.1
  +++ LoggerBase.java   19 Mar 2003 07:27:57 -  1.2
  @@ -69,10 +69,20 @@
   import java.beans.PropertyChangeListener;
   import java.io.CharArrayWriter;
   import java.io.PrintWriter;
  +import java.util.Set;
   import javax.servlet.ServletException;
  +import javax.management.ObjectName;
  +import javax.management.MBeanServer;
  +import javax.management.MBeanRegistration;
   import org.apache.catalina.Container;
   import org.apache.catalina.LifecycleException;
   import org.apache.catalina.Logger;
  +import org.apache.catalina.Lifecycle;
  +import org.apache.catalina.core.StandardEngine;
  +import org.apache.catalina.core.StandardHost;
  +import org.apache.catalina.core.StandardContext;
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   
   
   /**
  @@ -84,10 +94,11 @@
* @version $Revision$ $Date$
*/
   
  -public abstract class LoggerBase
  -implements Logger {
  -
  -
  +public class LoggerBase
  +implements Logger, MBeanRegistration 
  + {
  +private static Log log = LogFactory.getLog(LoggerBase.class);
  +
   // - Instance Variables
   
   
  @@ -252,7 +263,9 @@
* @param message A codeString/code specifying the message to be
*  written to the log file
*/
  -public abstract void log(String msg);
  +public void log(String msg) {
  +log.info(msg);
  +}
   
   
   /**
  @@ -349,5 +362,106 @@
   
   }
   
  +protected String domain;
  +protected String host;
  +protected String path;
  +protected ObjectName oname;
  +protected ObjectName controller;
  +protected MBeanServer mserver;
  +
  +public ObjectName getController() {
  +return controller;
  +}
  +
  +public void setController(ObjectName controller) {
  +this.controller = controller;
  +}
  +
  +public ObjectName getObjectName() {
  +return oname;
  +}
  +
  +public String getDomain() {
  +return domain;
  +}
  +
  +public ObjectName preRegister(MBeanServer server,
  +  ObjectName name) throws Exception {
  +oname=name;
  +mserver=server;
  +domain=name.getDomain();
  +
  +host=name.getKeyProperty(host);
  +path=name.getKeyProperty(path);
  +
  +if( container== null ) {
  +// Register with the parent
  +try {
  +ObjectName cname=null;
  +if( host == null ) {
  +// global
  +cname=new ObjectName(domain +:type=Engine);
  +} else if( path==null ) {
  +cname=new ObjectName(domain +
  +:type=Host,host= + host);
  +} else {
  +cname=new ObjectName(domain +:j2eeType=WebModule,name=// +
  +host + / + path);
  +}
  +log.info(Register with  + cname);
  +mserver.invoke(cname, setLogger, new Object[] {this},
  +new String[] {org.apache.catalina.Logger});
  +} catch (Exception e) {
  +e.printStackTrace();  //To change body of catch statement use 
Options | File Templates.
  +}
  +}
  +
  +return name;
  +}
  +
  +public void postRegister(Boolean registrationDone) {
  +}
  +
  +public void preDeregister() throws Exception {
  +}
   
  +public void postDeregister() {
  +}
  +
  +public void init() {
  +
  +}
  +
  +public void destroy() {
  +
  +}
  +
  +public ObjectName 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans MBeanUtils.java

2003-03-18 Thread costin
costin  2003/03/18 23:28:31

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanUtils.java
  Log:
  One more split of the large descriptors file.
  
  Revision  ChangesPath
  1.13  +5 -4  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- MBeanUtils.java   17 Mar 2003 07:39:13 -  1.12
  +++ MBeanUtils.java   19 Mar 2003 07:28:31 -  1.13
  @@ -1630,6 +1630,7 @@
   ClassLoader cl=ServerLifecycleListener.class.getClassLoader();
   
   registry.loadDescriptors(org.apache.catalina.mbeans,  cl);
  +registry.loadDescriptors(org.apache.catalina.authenticator, cl);
   registry.loadDescriptors(org.apache.catalina.core, cl);
   registry.loadDescriptors(org.apache.catalina.valves,  cl);
   registry.loadDescriptors(org.apache.coyote.tomcat5, cl);
  
  
  

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



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

2003-03-18 Thread costin
costin  2003/03/18 23:29:21

  Modified:catalina/src/share/org/apache/catalina/mbeans
mbeans-descriptors.xml
  Added:   catalina/src/share/org/apache/catalina/authenticator
mbeans-descriptors.xml
  Log:
  More move of descriptors to the same package with the described component.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/authenticator/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  ?xml version=1.0?
  mbeans-descriptors
  
mbean name=BasicAuthenticator
   description=An Authenticator and Valve implementation of HTTP BASIC 
Authentication
   domain=Catalina
   group=Valve
   type=org.apache.catalina.authenticator.BasicAuthenticator
  
  attribute   name=algorithm
 description=The message digest algorithm to be used when generating 
session identifiers
 type=java.lang.String/

  attribute name=cache
 description=Should we cache authenticated Principals if the request 
is part of an HTTP session?
 type=boolean/

  attribute   name=className
 description=Fully qualified class name of the managed object
 type=java.lang.String
 writeable=false/

  attribute name=debug
 description=The debugging detail level for this component
 type=int/
  
  attribute name=entropy
 description=A String initialization parameter used to increase the  
entropy of the initialization of our random number generator
 type=java.lang.String/
/mbean


mbean name=DigestAuthenticator
   description=An Authenticator and Valve implementation of HTTP DIGEST 
Authentication
   domain=Catalina
   group=Valve
   type=org.apache.catalina.authenticator.DigestAuthenticator
  
  attribute name=algorithm
 description=The message digest algorithm to be used when generating 
session identifiers
 type=java.lang.String/

  attribute name=cache
 description=Should we cache authenticated Principals if the request 
is part of an HTTP session?
 type=boolean/
  
  attribute   name=className
 description=Fully qualified class name of the managed object
 type=java.lang.String
 writeable=false/

  attribute   name=debug
 description=The debugging detail level for this component
 type=int/

  attribute   name=entropy
 description=A String initialization parameter used to increase the  
entropy of the initialization of our random number generator
 type=java.lang.String/
/mbean

mbean name=FormAuthenticator
   description=An Authenticator and Valve implementation of FORM BASED 
Authentication
   domain=Catalina
   group=Valve
   type=org.apache.catalina.authenticator.FormAuthenticator
  
  attribute   name=algorithm
 description=The message digest algorithm to be used when generating 
session identifiers
 type=java.lang.String/

  attribute   name=cache
 description=Should we cache authenticated Principals if the request 
is part of an HTTP session?
 type=boolean/
  
  attribute   name=className
 description=Fully qualified class name of the managed object
 type=java.lang.String
 writeable=false/
  
  attribute   name=debug
 description=The debugging detail level for this component
 type=int/

  attribute   name=entropy
 description=A String initialization parameter used to increase the 
entropy of the initialization of our random number generator
 type=java.lang.String/
/mbean

mbean name=NonLoginAuthenticator
   description=An Authenticator and Valve implementation that checks only 
security constraints not involving user authentication
   domain=Catalina
   group=Valve
   type=org.apache.catalina.authenticator.NonLoginAuthenticator
  
  attribute name=algorithm
 description=The message digest algorithm to be used when generating 
session identifiers
 type=java.lang.String/

  attribute name=cache
 description=Should we cache authenticated Principals if the request 
is part of an HTTP session?
 type=boolean/

  attribute name=className
 description=Fully qualified class name of the managed object
 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans ServerLifecycleListener.java

2003-03-18 Thread costin
costin  2003/03/18 23:30:07

  Modified:catalina/src/share/org/apache/catalina/mbeans
ServerLifecycleListener.java
  Log:
  Loggers will be registered directly
  
  Revision  ChangesPath
  1.10  +10 -10
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java
  
  Index: ServerLifecycleListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ServerLifecycleListener.java  17 Mar 2003 19:22:54 -  1.9
  +++ ServerLifecycleListener.java  19 Mar 2003 07:30:07 -  1.10
  @@ -460,7 +460,7 @@
   if ((cLogger != null)  (cLogger != hLogger)) {
   if (log.isDebugEnabled())
   log.debug(Creating MBean for Logger  + cLogger);
  -MBeanUtils.createMBean(cLogger);
  +//MBeanUtils.createMBean(cLogger);
   }
   Manager cManager = context.getManager();
   if (cManager != null) {
  @@ -602,7 +602,7 @@
   if (eLogger != null) {
   if (log.isDebugEnabled())
   log.debug(Creating MBean for Logger  + eLogger);
  -MBeanUtils.createMBean(eLogger);
  +//MBeanUtils.createMBean(eLogger);
   }
   Realm eRealm = engine.getRealm();
   if (eRealm != null) {
  @@ -652,7 +652,7 @@
   if ((hLogger != null)  (hLogger != eLogger)) {
   if (log.isDebugEnabled())
   log.debug(Creating MBean for Logger  + hLogger);
  -MBeanUtils.createMBean(hLogger);
  +//MBeanUtils.createMBean(hLogger);
   }
   Realm eRealm = host.getParent().getRealm();
   Realm hRealm = host.getRealm();
  @@ -856,7 +856,7 @@
   if ((cLogger != null)  (cLogger != hLogger)) {
   if (log.isDebugEnabled())
   log.debug(Destroying MBean for Logger  + cLogger);
  -MBeanUtils.destroyMBean(cLogger);
  +//MBeanUtils.destroyMBean(cLogger);
   }
   Loader cLoader = context.getLoader();
   if (cLoader != null) {
  @@ -1009,7 +1009,7 @@
   if (eLogger != null) {
   if (log.isDebugEnabled())
   log.debug(Destroying MBean for Logger  + eLogger);
  -MBeanUtils.destroyMBean(eLogger);
  +//MBeanUtils.destroyMBean(eLogger);
   }
   
   // Deregister the MBean for the Engine itself
  @@ -1053,7 +1053,7 @@
   if ((hLogger != null)  (hLogger != eLogger)) {
   if (log.isDebugEnabled())
   log.debug(Destroying MBean for Logger  + hLogger);
  -MBeanUtils.destroyMBean(hLogger);
  +//MBeanUtils.destroyMBean(hLogger);
   }
   
   // Deregister the MBean for the Host itself
  @@ -1293,13 +1293,13 @@
   if (log.isDebugEnabled()) {
   log.debug(Removing MBean for Logger  + oldValue);
   }
  -MBeanUtils.destroyMBean((Logger) oldValue);
  +   // MBeanUtils.destroyMBean((Logger) oldValue);
   }
   if (newValue != null) {
   if (log.isDebugEnabled()) {
   log.debug(Creating MBean for Logger  + newValue);
   }
  -MBeanUtils.createMBean((Logger) newValue);
  +//MBeanUtils.createMBean((Logger) newValue);
   }
   } else if (manager.equals(propertyName)) {
   if (oldValue != null) {
  @@ -1379,13 +1379,13 @@
   if (log.isDebugEnabled()) {
   log.debug(Removing MBean for Logger  + oldValue);
   }
  -MBeanUtils.destroyMBean((Logger) oldValue);
  +//MBeanUtils.destroyMBean((Logger) oldValue);
   }
   if (newValue != null) {
   if (log.isDebugEnabled()) {
   log.debug(Creating MBean for Logger  + newValue);
   }
  -MBeanUtils.createMBean((Logger) newValue);
  +//MBeanUtils.createMBean((Logger) newValue);
   }
   } else if (manager.equals(propertyName)) {
   if (oldValue != null) {
  
  
  

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



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

2003-03-18 Thread costin
costin  2003/03/18 23:32:48

  Modified:catalina/src/share/org/apache/catalina/core
ContainerBase.java
  Log:
  Logger registration.
  Must be done in container since loggers don't implement lifecycle.
  
  Revision  ChangesPath
  1.10  +17 -2 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java
  
  Index: ContainerBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ContainerBase.java17 Mar 2003 06:50:21 -  1.9
  +++ ContainerBase.java19 Mar 2003 07:32:48 -  1.10
  @@ -93,6 +93,8 @@
   import org.apache.catalina.Request;
   import org.apache.catalina.Response;
   import org.apache.catalina.Valve;
  +import org.apache.catalina.logger.LoggerBase;
  +import org.apache.catalina.session.StandardManager;
   import org.apache.catalina.valves.ValveBase;
   import org.apache.catalina.util.LifecycleSupport;
   import org.apache.catalina.util.StringManager;
  @@ -445,6 +447,7 @@
   }
   }
   
  +
   // Start the new component if necessary
   if (logger != null)
   logger.setContainer(this);
  @@ -1195,7 +1198,19 @@
   log.info(sm.getString(containerBase.alreadyStarted, logName()));
   return;
   }
  -
  +
  +if( logger instanceof LoggerBase ) {
  +LoggerBase lb=(LoggerBase)logger;
  +if( lb.getObjectName()==null ) {
  +ObjectName lname=lb.createObjectName();
  +try {
  +Registry.getRegistry().registerComponent(lb, lname, null);
  +} catch( Exception ex ) {
  +log.error( Can't register logger  + lname, ex);
  +}
  +}
  +}
  +
   // Notify our interested LifecycleListeners
   lifecycle.fireLifecycleEvent(BEFORE_START_EVENT, null);
   
  
  
  

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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/logger LoggerBase.java

2003-03-18 Thread Bill Barker

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 11:27 PM
Subject: cvs commit:
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/logger
LoggerBase.java


 costin  2003/03/18 23:27:57

   Modified:catalina/src/share/org/apache/catalina/logger
 LoggerBase.java
   Log:
   Registration for loggers.

   We do need to make a final decision about this. I didn't get any
feedback on the
   logger names used in context  ( with the context path as prefix of the
logger name ).
   IMO the logging in tomcat should be delegated via commons-logging to an
external
   implementation - either jdk1.4 logging or log4j.

   We do need to decide on the names of the loggers and provide some
default
   configs, and eventually start bundling log4j or config files for jdk1.4
( or
   both ). If we do that, LoggerBase and all other classes will remain only
   for backward compatibility.


+1, but we need to at least support Ceki's proposal to split web-app logging
by ContextClassLoader.  Easy enough to do in 3.3.2-dev (yes, well, it's
still on my plate :), and should be almost as easy in 5.x.



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