RE: oops, forgot something - RE: ROOT/index.html

2001-07-22 Thread Rob S.

Hmm... is the non-html email filter on the list blocking my ability to
attach an HTML file to my email?

- r

 -Original Message-
 From: Rob S. [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 22, 2001 1:41 AM
 To: [EMAIL PROTECTED]
 Subject: oops, forgot something - RE: ROOT/index.html


 I dunno why that webmailer butchers text-based attachments.
 Grrr...  Tried
 it under NS4, style problem of course.  Bah!

 - r





NT/2000 service donation?

2001-07-22 Thread Joe Flowers

If the attached TomcatService.exe program is worthy, I would like to
donate it to the Tomcat project.

What makes this program interesting is that it starts and stops Tomcat
using the 
%TOMCAT_HOME%\bin\startup.bat and %TOMCAT_HOME%\bin\shutdown.bat files.

I have had and have seen a ton of questions and problems related to
starting Tomcat with an NT/2000 service. If you can start/stop Tomcat
with the Tomcat startup.bat and shutdown.bat files, then this program
should
work too since it uses those exact same Tomcat .bat files.

Let me know if the project is interested in this donation.

Best Wishes.

[EMAIL PROTECTED]
 TomcatService101d.zip


Re: NT/2000 service donation?

2001-07-22 Thread Pier P. Fumagalli

Joe Flowers at [EMAIL PROTECTED] wrote:
 
 If the attached TomcatService program is worthy, I would like to
 donate it to the Tomcat project.
 
 What makes this program interesting is that it starts and stops Tomcat
 using the 
 %TOMCAT_HOME%\bin\startup.bat and %TOMCAT_HOME%\bin\shutdown.bat files.
 
 I have had and have seen a ton of questions and problems related to
 starting Tomcat with an NT/2000 service. If you can start/stop Tomcat
 with the Tomcat startup.bat and stop.bat files, then this program should
 work too, since it uses those exact same Tomcat .bat files.
 
 Let me know if the project is interested in this donation.

I'd like to see the sources (also because we cannot really accept a
binary-only contribution, there is no way to fix and update it).

Regarding service-related stuff, I'd like you to check out what's in the
tomcat 4.0 repository, there's a bunch of code that will be used from the
next release...

Pier




Re: Post B6 modifications...

2001-07-22 Thread Pier P. Fumagalli

Pier P. Fumagalli at [EMAIL PROTECTED] wrote:

 This is the first set of modifications I made to the Catalina code to allow
 port  1024 binding under Unix. Basically, I added an initialize() method
 to Server, Service and Connector, and that gets called appropriately before
 start(). Now, the only thing left to do is to move the ServerSocket
 creation within connectors in initialize(), and launch Catalina with a
 wrapper around the Service code I committed last week.
 
 Basically, during load() in service, we build the whole components tree
 and call initialize() on the Server. Then during start() and stop() we
 call the same methods in Server, and (in theory) the trick should be done.
 
 I'd need to modify Remy's BootstrapService and CatalinaService to perform a
 two-stage initialization process (and I don't know what JavaService, the one
 he's using under Windows does), but, more or less, that should be it...
 
 This patch actually starts fixing things, but doesn't break the build
 neither compromises functionality (checked it already), but I would like
 someone (Craig/Remy/Amy/Glenn...) to review it and, if ok, apply it...
 
 Cheers...

Since no one commented, I'm just going to commit, and if there's something
wrong, we can always roll back...

Pier




Re: Post B6 modifications...

2001-07-22 Thread Remy Maucherat

 Pier P. Fumagalli at [EMAIL PROTECTED] wrote:

  This is the first set of modifications I made to the Catalina code to
allow
  port  1024 binding under Unix. Basically, I added an initialize()
method
  to Server, Service and Connector, and that gets called appropriately
before
  start(). Now, the only thing left to do is to move the ServerSocket
  creation within connectors in initialize(), and launch Catalina with a
  wrapper around the Service code I committed last week.
 
  Basically, during load() in service, we build the whole components
tree
  and call initialize() on the Server. Then during start() and
stop() we
  call the same methods in Server, and (in theory) the trick should be
done.
 
  I'd need to modify Remy's BootstrapService and CatalinaService to
perform a
  two-stage initialization process (and I don't know what JavaService, the
one
  he's using under Windows does), but, more or less, that should be it...
 
  This patch actually starts fixing things, but doesn't break the build
  neither compromises functionality (checked it already), but I would like
  someone (Craig/Remy/Amy/Glenn...) to review it and, if ok, apply it...
 
  Cheers...

 Since no one commented, I'm just going to commit, and if there's something
 wrong, we can always roll back...

Hi Pier,

That sucks for you appartment :-((

Sorry, I've been in Santa Cruz friday, and then I forgot about your patch
(since I was s happy that we released b6 in a clean state).
So I didn't have a chance yet to complain about it ;-)

Actually, I think it's ok, esp since you didn't change the Container
interface (that would have been a lot of trouble).

Could you avoid the tabs next time ? Even Craig stopped it in TC 4.0 ;-)

Q: Is there Win32 code already somewhere ? The port 80 binding trick won't
mean much there, since the service is run by the System account by default
(ie, it has more-than-root privileges), although you can change that (I
don't know to which extent). If there is, does it use JNI ? JavaService is
really cool, because it makes Tomcat look like a normal native process.

Remy




Re: Post B6 modifications...

2001-07-22 Thread Pier P. Fumagalli

Remy Maucherat at [EMAIL PROTECTED] wrote:
 
 [...]
 Actually, I think it's ok, esp since you didn't change the Container
 interface (that would have been a lot of trouble).

Yeah, didn't want to create that many troubles...

 Could you avoid the tabs next time ? Even Craig stopped it in TC 4.0 ;-)

Fuck, I forgot to preprocess the files Doin' it right now :)

 Q: Is there Win32 code already somewhere ? The port 80 binding trick won't
 mean much there, since the service is run by the System account by default
 (ie, it has more-than-root privileges), although you can change that (I
 don't know to which extent). If there is, does it use JNI ? JavaService is
 really cool, because it makes Tomcat look like a normal native process.

Nope, there's nothing for Win32 as of now... If you give me a pointer to the
sources, I'll integrate it with my service code for Tomcat (don't want to
look at all crappy service code in the Win32 API...

Wasn't it BSD?

Pier




Re: Post B6 modifications...

2001-07-22 Thread Pier P. Fumagalli

Pier P. Fumagalli at [EMAIL PROTECTED] wrote:
 Remy Maucherat at [EMAIL PROTECTED] wrote:
 
 Could you avoid the tabs next time ? Even Craig stopped it in TC 4.0 ;-)
 
 Fuck, I forgot to preprocess the files Doin' it right now :)

I'll run it over all catalina files... :)

Pier




Re: Post B6 modifications...

2001-07-22 Thread Pier P. Fumagalli

Remy Maucherat at [EMAIL PROTECTED] wrote:

 Wasn't it BSD?
 
 Yes, but BSD != Apache, so I don't think we can cut  paste unless they
 agree to donate the code ;-)
 You can try talking to them. I just asked them the permission to integrate a
 binary, which they gladly gave me (although the license allowed me to use
 the binary without asking them).
 
 http://www.alexandriasc.com/software/JavaService/index.html

Depends on the license... We can't modify their copyright, for sure, but if
it's a post-2000 BSD license (without advertising clause), we won't have any
problem...

The binary was passed on the ML today, but without sources, we can't accept
it, as IMVHO, it's unmaintainable code...

Pier




Re: Post B6 modifications...

2001-07-22 Thread Elijah Roberts

On Sunday July 22, 2001 Remy Maucherat wrote:
   Yes, but BSD != Apache, so I don't think we can cut  paste unless they
   agree to donate the code ;-)
   You can try talking to them. I just asked them the permission to
 integrate a
   binary, which they gladly gave me (although the license allowed me to
 use
   the binary without asking them).
  
   http://www.alexandriasc.com/software/JavaService/index.html
 
  Depends on the license... We can't modify their copyright, for sure, but
 if
  it's a post-2000 BSD license (without advertising clause), we won't have
 any
  problem...
 
 I have no clue.

I'd be happy to donate the code, if you want. Just let me know what, if
anything, I need to do.

Elijah Roberts
[EMAIL PROTECTED]



Re: Post B6 modifications...

2001-07-22 Thread Pier P. Fumagalli

Remy Maucherat at [EMAIL PROTECTED] wrote:

 http://www.alexandriasc.com/software/JavaService/license.html

It's a post-2000 BSD... We don't have to alter the copyright, but we can
included it without any other legal matter... Probably the best would be to
start modifying their sources and update them to our model, while, at the
same time, asking them to donate the code :)

How does it sound?

Pier




Re: Post B6 modifications...

2001-07-22 Thread Pier P. Fumagalli

Pier P. Fumagalli at [EMAIL PROTECTED] wrote:

 Pier P. Fumagalli at [EMAIL PROTECTED] wrote:
 Remy Maucherat at [EMAIL PROTECTED] wrote:
 
 Could you avoid the tabs next time ? Even Craig stopped it in TC 4.0 ;-)
 
 Fuck, I forgot to preprocess the files Doin' it right now :)
 
 I'll run it over all catalina files... :)

Done, it's a _HUGE_ commit, but it's through cleanly, and it builds, so
nothing has been tweaked...
ALL files had at least ONE tab (can you believe it)? Now, no tabs anymore.

Pier




RE: Post B6 modifications...

2001-07-22 Thread Kevin Seguin

  http://www.alexandriasc.com/software/JavaService/license.html
 
 It's a post-2000 BSD... We don't have to alter the copyright, 
 but we can
 included it without any other legal matter... Probably the 
 best would be to
 start modifying their sources and update them to our model, 
 while, at the
 same time, asking them to donate the code :)
 
 How does it sound?
 
 Pier
 

+1.



Re: Post B6 modifications...

2001-07-22 Thread Pier P. Fumagalli

Elijah Roberts at [EMAIL PROTECTED] wrote:
 
 I'd be happy to donate the code, if you want. Just let me know what, if
 anything, I need to do.

Oh, that's great, I didn't figure out you were on the Mailing List...

To give you a little background, I wrote the Service stuff in Tomcat 4.0 to
allow port binding on Unix with ports  1024 and without running as Root...

I'm planning to integrate it with some Windows code, and from a very fast
reading of your JavaService, it can be integrated easily...

I'll take a chance at it next week, and we'll see what comes up...

Thanks for the help, though... Really appreciate it...

Pier




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina Connector.java Server.java Service.java

2001-07-22 Thread pier

pier01/07/22 14:02:46

  Modified:catalina/src/share/org/apache/catalina Connector.java
Server.java Service.java
  Log:
  Forgot to update the main interfaces.
  
  Revision  ChangesPath
  1.9   +12 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Connector.java
  
  Index: Connector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Connector.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Connector.java2001/07/22 20:13:30 1.8
  +++ Connector.java2001/07/22 21:02:45 1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Connector.java,v 
1.8 2001/07/22 20:13:30 pier Exp $
  - * $Revision: 1.8 $
  - * $Date: 2001/07/22 20:13:30 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Connector.java,v 
1.9 2001/07/22 21:02:45 pier Exp $
  + * $Revision: 1.9 $
  + * $Date: 2001/07/22 21:02:45 $
*
* 
*
  @@ -117,7 +117,7 @@
* normative.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.8 $ $Date: 2001/07/22 20:13:30 $
  + * @version $Revision: 1.9 $ $Date: 2001/07/22 21:02:45 $
*/
   
   public interface Connector {
  @@ -240,5 +240,13 @@
*/
   public Response createResponse();
   
  +/**
  + * Invoke a pre-startup initialization. This is used to allow connectors
  + * to bind to restricted ports under Unix operating environments.
  + *
  + * @exception LifecycleException If this server was already initialized.
  + */
  +public void initialize()
  +throws LifecycleException;
   
   }
  
  
  
  1.6   +12 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Server.java
  
  Index: Server.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Server.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Server.java   2001/07/22 20:13:30 1.5
  +++ Server.java   2001/07/22 21:02:45 1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Server.java,v 1.5 
2001/07/22 20:13:30 pier Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/07/22 20:13:30 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Server.java,v 1.6 
2001/07/22 21:02:45 pier Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/07/22 21:02:45 $
*
* 
*
  @@ -87,7 +87,7 @@
* If the command matches, shutdown of the server is initiated.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2001/07/22 20:13:30 $
  + * @version $Revision: 1.6 $ $Date: 2001/07/22 21:02:45 $
*/
   
   public interface Server {
  @@ -163,5 +163,12 @@
*/
   public void removeService(Service service);
   
  -
  +/**
  + * Invoke a pre-startup initialization. This is used to allow connectors
  + * to bind to restricted ports under Unix operating environments.
  + *
  + * @exception LifecycleException If this server was already initialized.
  + */
  +public void initialize()
  +throws LifecycleException;
   }
  
  
  
  1.6   +12 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Service.java
  
  Index: Service.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Service.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Service.java  2001/07/22 20:13:30 1.5
  +++ Service.java  2001/07/22 21:02:46 1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Service.java,v 1.5 
2001/07/22 20:13:30 pier Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/07/22 20:13:30 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Service.java,v 1.6 
2001/07/22 21:02:46 pier Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/07/22 21:02:46 $
*
* 
*
  @@ -76,7 +76,7 @@
* and classes on the system class path.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2001/07/22 20:13:30 $
  + * @version $Revision: 1.6 $ $Date: 2001/07/22 21:02:46 $
*/
   
   public interface Service {
  @@ -150,5 +150,13 @@
*/
   public void removeConnector(Connector connector);
   
  +/**
  + * Invoke a pre-startup initialization. This is used to allow connectors
  + * to bind to 

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java

2001-07-22 Thread remm

remm01/07/22 14:23:17

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Fix for bug #2725 (non JARs files put in /WEB-INF/lib cause constant
reloads of a reloadable context).
Reported by Jeff Turner jeff at socialchange.net.au.
  
  Revision  ChangesPath
  1.11  +25 -12
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WebappClassLoader.java2001/07/22 20:25:10 1.10
  +++ WebappClassLoader.java2001/07/22 21:23:17 1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.10 2001/07/22 20:25:10 pier Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/07/22 20:25:10 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.11 2001/07/22 21:23:17 remm Exp $
  + * $Revision: 1.11 $
  + * $Date: 2001/07/22 21:23:17 $
*
* 
*
  @@ -123,7 +123,7 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.10 $ $Date: 2001/07/22 20:25:10 $
  + * @version $Revision: 1.11 $ $Date: 2001/07/22 21:23:17 $
*/
   public class WebappClassLoader
   extends URLClassLoader
  @@ -719,20 +719,33 @@
   
   try {
   NamingEnumeration enum = resources.listBindings(getJarPath());
  -int i;
  -for (i = 0; enum.hasMoreElements()  (i  length); i++) {
  +int i = 0;
  +while (enum.hasMoreElements()  (i  length)) {
   NameClassPair ncPair = (NameClassPair) enum.nextElement();
  -if (!ncPair.getName().equals(jarNames[i])) {
  +String name = ncPair.getName();
  +// Ignore non JARs present in the lib folder
  +if (!name.endsWith(.jar))
  +continue;
  +if (!name.equals(jarNames[i])) {
   // Missing JAR
  -log(Additional JARs have been added : '
  -+ ncPair.getName() + ');
  +log(Additional JARs have been added : ' 
  ++ name + ');
   return (true);
   }
  +i++;
   }
   if (enum.hasMoreElements()) {
  -// There was more JARs
  -log(Additional JARs have been added);
  -return (true);
  +while (enum.hasMoreElements()) {
  +NameClassPair ncPair = 
  +(NameClassPair) enum.nextElement();
  +String name = ncPair.getName();
  +// Additional non-JAR files are allowed
  +if (name.endsWith(.jar)) {
  +// There was more JARs
  +log(Additional JARs have been added);
  +return (true);
  +}
  +}
   } else if (i  jarNames.length) {
   // There was less JARs
   log(Additional JARs have been added);
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10 HttpConnector.java

2001-07-22 Thread pier

pier01/07/22 15:36:09

  Modified:catalina/src/share/org/apache/catalina/connector/http
HttpConnector.java
   catalina/src/share/org/apache/catalina/connector/http10
HttpConnector.java
  Log:
  Moved socket creation in the initialize() method, to allow port = 1024
  binding when running as non-root and using JSVC.
  
  Revision  ChangesPath
  1.21  +12 -12
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java
  
  Index: HttpConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- HttpConnector.java2001/07/22 20:25:07 1.20
  +++ HttpConnector.java2001/07/22 22:36:09 1.21
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
 1.20 2001/07/22 20:25:07 pier Exp $
  - * $Revision: 1.20 $
  - * $Date: 2001/07/22 20:25:07 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
 1.21 2001/07/22 22:36:09 pier Exp $
  + * $Revision: 1.21 $
  + * $Date: 2001/07/22 22:36:09 $
*
* 
*
  @@ -95,7 +95,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.20 $ $Date: 2001/07/22 20:25:07 $
  + * @version $Revision: 1.21 $ $Date: 2001/07/22 22:36:09 $
*/
   
   
  @@ -1073,7 +1073,14 @@
   throw new LifecycleException (
   sm.getString(httpConnector.alreadyInitialized));
   this.initialized=true;
  -System.err.println(HTTP Connector initialized);
  +
  +// Establish a server socket on the specified port
  +try {
  +serverSocket = open();
  +} catch (IOException e) {
  +throw new LifecycleException(threadName + .open, e);
  +}
  +
   }
   
   
  @@ -1091,13 +1098,6 @@
   threadName = HttpConnector[ + port + ];
   lifecycle.fireLifecycleEvent(START_EVENT, null);
   started = true;
  -
  -// Establish a server socket on the specified port
  -try {
  -serverSocket = open();
  -} catch (IOException e) {
  -throw new LifecycleException(threadName + .open, e);
  -}
   
   // Start our background thread
   threadStart();
  
  
  
  1.10  +12 -11
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpConnector.java
  
  Index: HttpConnector.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpConnector.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- HttpConnector.java2001/07/22 20:25:07 1.9
  +++ HttpConnector.java2001/07/22 22:36:09 1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpConnector.java,v
 1.9 2001/07/22 20:25:07 pier Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/07/22 20:25:07 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpConnector.java,v
 1.10 2001/07/22 22:36:09 pier Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/07/22 22:36:09 $
*
* 
*
  @@ -94,7 +94,7 @@
* purposes.  Not intended to be the final solution.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.9 $ $Date: 2001/07/22 20:25:07 $
  + * @version $Revision: 1.10 $ $Date: 2001/07/22 22:36:09 $
*/
   
   
  @@ -977,6 +977,14 @@
   throw new LifecycleException (
   sm.getString(httpConnector.alreadyInitialized));
   this.initialized=true;
  +
  +// Establish a server socket on the specified port
  +try {
  +serverSocket = open();
  +} catch (IOException e) {
  +throw new LifecycleException(threadName + .open, e);
  +}
  +
   }
   
   /**
  @@ -993,13 +1001,6 @@
   threadName = HttpConnector[ + port + ];
   lifecycle.fireLifecycleEvent(START_EVENT, null);
   started = true;
  -
  -// Establish a server socket on the specified port
  -try {
  -serverSocket = open();
  -} catch (IOException e) {
  -throw new LifecycleException(threadName + .open, e);
  -}
   
   // Start our background thread
   threadStart();
  
  
  



Re: Problem with mod_jk 1.2.0 (latest CVS snapshot)

2001-07-22 Thread Bojan Smojver

GOMEZ Henri wrote:
 I still have to distribute this DSO version of Apache and mod_jk to some
 slower machines to see if that makes any difference at all. The machine
 that didn't produce any errors is a 1 GHz Athlon, so timing issues could
 have been resolved by brute force, who knows...
 
 Thanks to tell us what happened...

Just installed the DSO version on a Pentium 166. Well, it segfaults when
I load PHP pages on this machine but it doesn't on normal pages after a
graceful restart. Which leads me to believe... that I haven't a clue why
is all this happening! Back to square one (ie. make distclean etc.)

Shall keep you posted.

Bojan



cvs commit: jakarta-tomcat-connectors/webapp README.txt

2001-07-22 Thread pier

pier01/07/22 16:11:19

  Modified:webapp   README.txt
  Log:
  Updated documentation thanks to Muminur Rashid Choudhury [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.10  +3 -1  jakarta-tomcat-connectors/webapp/README.txt
  
  Index: README.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/README.txt,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- README.txt2001/07/18 18:31:51 1.9
  +++ README.txt2001/07/22 23:11:19 1.10
  @@ -54,8 +54,10 @@
   is not set in your environment, you'll have to specify the root
   path of your JDK installation on this command line. To compile
   the Java classes, you will need to set your CLASSPATH variable to
  -include the catalina.jar distributed with Tomcat 4.0. Example:
  +include the catalina.jar and servlet.jar distributed with
  +Tomcat 4.0. For example:
 # CLASSPATH=$CATALINA_HOME/server/lib/catalina.jar
  +  # CLASSPATH=$CLASSPATH:$CATALINA_HOME/common/lib/server.jar
 # export CLASSPATH
   
   --enable-debug
  
  
  



Re: Post B6 modifications...

2001-07-22 Thread Remy Maucherat

 Remy Maucherat at [EMAIL PROTECTED] wrote:

  http://www.alexandriasc.com/software/JavaService/license.html

 It's a post-2000 BSD... We don't have to alter the copyright, but we can
 included it without any other legal matter... Probably the best would be
to
 start modifying their sources and update them to our model, while, at the
 same time, asking them to donate the code :)

 How does it sound?

This + Elijah's answer = very good :-)

Remy




Re: Post B6 modifications...

2001-07-22 Thread Pier P. Fumagalli

Remy Maucherat at [EMAIL PROTECTED] wrote:

 Remy Maucherat at [EMAIL PROTECTED] wrote:
 
 http://www.alexandriasc.com/software/JavaService/license.html
 
 It's a post-2000 BSD... We don't have to alter the copyright, but we can
 included it without any other legal matter... Probably the best would be
 to
 start modifying their sources and update them to our model, while, at the
 same time, asking them to donate the code :)
 
 How does it sound?
 
 This + Elijah's answer = very good :-)

Ok, so what I need from you is an implementation of the Service interface
for Catalina...
All three methods (load, start and stop) are called by the container, so we
should remove start and stop from the command line...

Can you take a look @ it?

Pier




Cannot link iPlanet to Tomcat

2001-07-22 Thread Ray Shun

Hi pals,

I tried to use the nsapi_redirect.so to link iplanet
with Tomcat, but the following error emerge in the
iplanet side:

Configuration initialization failed: Error running init function
load-modules: dlopen of
/home0/dweb/jakarta-tomcat-3.2.2/libexec/nsapi_redirector.so failed
(ld.so.1: ns-httpd: fatal: relocation error: file
/home0/dweb/jakarta-tomcat-3.2.2/libexec/nsapi_redirector.so: symbol
ajp13_worker_factory: referenced symbol not found)

Do you have any idea?

Thanks!
Ray

==
===
Shun Yeuk Kiu, Ray
E-mail: [EMAIL PROTECTED]
Homepage: http://home.ust.hk/~rayshun

=

RRR   AAA YY  YY
---  RRRR AA AA YYYY -
   ---rrrr-aa-aa--yy--yy --
 --rrr--ayy--- ---
 ---rrrr-aa-aayy-- --
---  RR RRAA AAYY-
  RR  RR   AA AAYY

=




cvs commit: jakarta-tomcat-4.0/catalina build.xml

2001-07-22 Thread remm

remm01/07/22 20:12:02

  Modified:catalina build.xml
  Log:
  - Build the service classes (../service/java), and put
org.apache.service.Service and org.apache.service.ServiceController in
bootstrap.jar.
  
  Revision  ChangesPath
  1.50  +5 -1  jakarta-tomcat-4.0/catalina/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/build.xml,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- build.xml 2001/07/18 22:47:29 1.49
  +++ build.xml 2001/07/23 03:12:02 1.50
  @@ -130,6 +130,10 @@
classname=javax.mail.internet.MimeMessage /
   available property=jdk.1.3.present
classname=java.lang.reflect.Proxy /
  +!-- Compile Service API --
  +javac   srcdir=../service/java destdir=${catalina.build}/classes
  + deprecation=off debug=on optimize=off target=1.2
  + excludes=**/CVS/** /
   !-- Compile internal server components --
   javac   srcdir=src/share destdir=${catalina.build}/classes

classpath=${parser.jar}:${jaxp.jar}:${regexp.jar}:${servlet.jar}:${jcert.jar}:${jnet.jar}:${jsse.jar}:${jmxri.jar}
  @@ -159,7 +163,7 @@
   !-- Construct bootstrap JAR file --
   jar   jarfile=${catalina.build}/bin/bootstrap.jar
  basedir=${catalina.build}/classes
  -   
includes=org/apache/catalina/startup/Bootstrap.class,org/apache/catalina/startup/BootstrapService.class,org/apache/catalina/loader/StandardClassLoader*.class,org/apache/catalina/loader/Extension.class,org/apache/catalina/loader/Reloader.class,org/apache/catalina/startup/SecurityManagerDebug.class,org/apache/naming/JndiPermission.class
 
  +   
includes=org/apache/service/Service.class,org/apache/service/ServiceController.class,org/apache/catalina/startup/Bootstrap.class,org/apache/catalina/startup/BootstrapService.class,org/apache/catalina/loader/StandardClassLoader*.class,org/apache/catalina/loader/Extension.class,org/apache/catalina/loader/Reloader.class,org/apache/catalina/startup/SecurityManagerDebug.class,org/apache/naming/JndiPermission.class
 
  manifest=etc/bootstrap.MF
  /
   jar   jarfile=${catalina.build}/common/lib/naming.jar
  
  
  



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

2001-07-22 Thread remm

remm01/07/22 20:12:45

  Modified:catalina/src/share/org/apache/catalina/startup
CatalinaService.java
  Log:
  - Separate start into load + start.
  
  Revision  ChangesPath
  1.3   +43 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/CatalinaService.java
  
  Index: CatalinaService.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/CatalinaService.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CatalinaService.java  2001/07/22 20:25:13 1.2
  +++ CatalinaService.java  2001/07/23 03:12:45 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/CatalinaService.java,v
 1.2 2001/07/22 20:25:13 pier Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/07/22 20:25:13 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/CatalinaService.java,v
 1.3 2001/07/23 03:12:45 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/07/23 03:12:45 $
*
* 
*
  @@ -104,7 +104,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.2 $ $Date: 2001/07/22 20:25:13 $
  + * @version $Revision: 1.3 $ $Date: 2001/07/23 03:12:45 $
*/
   
   public class CatalinaService extends Catalina {
  @@ -163,9 +163,24 @@
   
   
   /**
  + * Execute the processing that has been configured from the command line.
  + */
  +protected void execute() throws Exception {
  +
  +if (starting) {
  +load();
  +start();
  +} else if (stopping) {
  +stop();
  +}
  +
  +}
  +
  +
  +/**
* Start a new server instance.
*/
  -protected void start() {
  +public void load() {
   
   // Create and execute our mapper
   XmlMapper mapper = createStartMapper();
  @@ -221,6 +236,28 @@
   // Start the new server
   if (server instanceof Lifecycle) {
   try {
  +server.initialize();
  +} catch (LifecycleException e) {
  +System.out.println(Catalina.start:  + e);
  +e.printStackTrace(System.out);
  +if (e.getThrowable() != null) {
  +System.out.println(- Root Cause -);
  +e.getThrowable().printStackTrace(System.out);
  +}
  +}
  +}
  +
  +}
  +
  +
  +/**
  + * Start a new server instance.
  + */
  +public void start() {
  +
  +// Start the new server
  +if (server instanceof Lifecycle) {
  +try {
   ((Lifecycle) server).start();
   } catch (LifecycleException e) {
   System.out.println(Catalina.start:  + e);
  @@ -238,7 +275,7 @@
   /**
* Stop an existing server instance.
*/
  -protected void stop() {
  +public void stop() {
   
   // Shut down the server
   if (server instanceof Lifecycle) {
  
  
  



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

2001-07-22 Thread remm

remm01/07/22 20:14:46

  Modified:catalina/src/share/org/apache/catalina/startup
BootstrapService.java
  Log:
  - Implement Service interface.
  - The legacy static methods are still there until JavaService is modifieded to
use the Service interface instead, but it will be removed when it's done.
  
  Revision  ChangesPath
  1.3   +142 -5
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java
  
  Index: BootstrapService.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BootstrapService.java 2001/07/22 20:25:13 1.2
  +++ BootstrapService.java 2001/07/23 03:14:46 1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v
 1.2 2001/07/22 20:25:13 pier Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/07/22 20:25:13 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v
 1.3 2001/07/23 03:14:46 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/07/23 03:14:46 $
*
* 
*
  @@ -71,6 +71,8 @@
   import java.net.MalformedURLException;
   import java.net.URL;
   import java.util.ArrayList;
  +import org.apache.service.Service;
  +import org.apache.service.ServiceController;
   import org.apache.catalina.loader.Extension;
   import org.apache.catalina.loader.StandardClassLoader;
   
  @@ -84,10 +86,11 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.2 $ $Date: 2001/07/22 20:25:13 $
  + * @version $Revision: 1.3 $ $Date: 2001/07/23 03:14:46 $
*/
   
  -public final class BootstrapService {
  +public final class BootstrapService 
  +implements Service {
   
   
   // --- Static Variables
  @@ -103,6 +106,140 @@
* Catalina instance.
*/
   private static Object catalina = null;
  +
  +
  +/**
  + * Catalina service.
  + */
  +private Object catalinaService = null;
  +
  +
  +//  Service Methods
  +
  +
  +/**
  + * Load the Catalina Service.
  + */
  +public void load(ServiceController controller, String arguments[])
  +throws Throwable {
  +
  +System.out.println(Create Catalina server);
  +
  +// Construct the class loaders we will need
  +ClassLoader commonLoader = createCommonLoader();
  +ClassLoader catalinaLoader =
  +createCatalinaLoader(commonLoader);
  +ClassLoader sharedLoader = createSharedLoader(commonLoader);
  +
  +Thread.currentThread().setContextClassLoader(catalinaLoader);
  +
  +// Load our startup class and call its process() method
  +
  +if( System.getSecurityManager() != null ) {
  +// Pre load some classes required for SecurityManager
  +// so that defineClassInPackage does not throw a
  +// security exception.
  +String basePackage = org.apache.catalina.;
  +catalinaLoader.loadClass
  +(basePackage +
  + core.ApplicationContext$PrivilegedGetRequestDispatcher);
  +catalinaLoader.loadClass
  +(basePackage +
  + core.ApplicationContext$PrivilegedGetResource);
  +catalinaLoader.loadClass
  +(basePackage +
  + core.ApplicationContext$PrivilegedGetResourcePaths);
  +catalinaLoader.loadClass
  +(basePackage +
  + core.ApplicationContext$PrivilegedLogMessage);
  +catalinaLoader.loadClass
  +(basePackage +
  + core.ApplicationContext$PrivilegedLogException);
  +catalinaLoader.loadClass
  +(basePackage +
  + core.ApplicationContext$PrivilegedLogThrowable);
  +catalinaLoader.loadClass
  +(basePackage +
  + core.ApplicationDispatcher$PrivilegedForward);
  +catalinaLoader.loadClass
  +(basePackage +
  + core.ApplicationDispatcher$PrivilegedInclude);
  +catalinaLoader.loadClass
  +(basePackage +
  + connector.HttpRequestBase$PrivilegedGetSession);
  +catalinaLoader.loadClass
  +(basePackage +
  + loader.WebappClassLoader$PrivilegedFindResource);
  +catalinaLoader.loadClass
  +(basePackage + session.StandardSession);
  +

Re: Problem with mod_jk 1.2.0 (latest CVS snapshot)

2001-07-22 Thread Bojan Smojver

GOMEZ Henri wrote:
 
 Just did a DSO version and couldn't replicate the problem (BTW, I've
 recompiled/statically linked Apache and mod_jk again since then and the
 problem was still there). So, maybe it has to do with statically linking
 Apache after all...
 
 Strange problem. What's the difference between static and dynamic.
 We may have missed something at mod_jk init time ?

Now I have some new info here. After recompiling everything clean, I've
taken out PHP altogether. So it's not part of the equation. It is
sufficient to compile mod_jk in and use static pages only (ie. no
JSP's/VM at all). If you gracefully restart the server a number of times
(the number varies), it will eventually segfault.

The only absolutely safe solution is to do stop and then start. Then it
works OK. So, I guess looking into the init code would be the proper
thing to do.

If you give me a few pointers, I can help.

Bojan