Re: jk2 renaming - need revue and comments

2002-02-19 Thread jean-frederic clere

GOMEZ Henri wrote:
> 
> Ouf, finished the renaming of jk2 (native2)
> 
> Some remarks :
> 
> 1) I choose to rename ALL JK directive since there are
>just too many which are common in JK (SSL, LOG, DATE...)
> 
> ...
> 
> AP_INIT_TAKE1(
> "Jk2WorkersFile", jk2_set1, "workerFile", RSRC_CONF,
> "the name of a worker file for the Jakarta servlet containers"),
> AP_INIT_TAKE1(
> "Jk2Properties", jk2_set1,  "workerFile", RSRC_CONF,
> "Properties file containing additional settings ( replaces JkWoprkerFile )"),
> AP_INIT_TAKE2(
> "Jk2Set", jk2_set2, NULL, RSRC_CONF,
> "Set a jk property, same syntax and rules as in JkWorkersFile"),
> AP_INIT_TAKE2(
> "Jk2Mount", jk2_set2, "mount", RSRC_CONF,
> "A mount point from a context to a Tomcat worker"),
> AP_INIT_TAKE2(
> "Jk2Worker", jk2_setWorker, NULL, RSRC_CONF,
> "Defines workers and worker properties "),
> AP_INIT_TAKE2(
> "Jk2Webapp", jk2_setWebapp, NULL, ACCESS_CONF,
> "Defines a webapp in a Location directive and it's properties"),
> AP_INIT_TAKE2(
> "Jk2Servlet", jk2_setServlet, NULL, ACCESS_CONF,
> "Defines a servlet in a Location directive"),
> AP_INIT_TAKE1(
> "Jk2MountCopy", jk2_set1, "root_apps_are_global", RSRC_CONF,
> "Should the base server mounts be copied from main server to the virtual 
>server"),
> AP_INIT_TAKE1(
> "Jk2LogFile", jk2_set1, "logFile", RSRC_CONF,
> "Full path to the Jakarta Tomcat module log file"),
> AP_INIT_TAKE1(
> "Jk2LogLevel", jk2_set1, "logLevel", RSRC_CONF,
> "The Jakarta Tomcat module log level, can be debug, "
> "info, error or emerg"),
> AP_INIT_TAKE1(
> "Jk2LogStampFormat", jk2_set1, "logStampFormat", RSRC_CONF,
> "The Jakarta Tomcat module log format, follow strftime synthax"),
> AP_INIT_TAKE1(
> "Jk2HTTPSIndicator", jk2_set1, "HttpsIndicator", RSRC_CONF,
> "Name of the Apache environment that contains SSL indication"),
> AP_INIT_TAKE1(
> "Jk2CERTSIndicator", jk2_set1, "CertsIndicator", RSRC_CONF,
> "Name of the Apache environment that contains SSL client certificates"),
> AP_INIT_TAKE1(
>  "Jk2CIPHERIndicator", jk2_set1, "CipherIndicator", RSRC_CONF,
> "Name of the Apache environment that contains SSL client cipher"),
> AP_INIT_TAKE1(
> "Jk2SESSIONIndicator", jk2_set1, "SessionIndicator", RSRC_CONF,
> "Name of the Apache environment that contains SSL session"),
> AP_INIT_TAKE1(
> "Jk2KEYSIZEIndicator", jk2_set1, "KeySizeIndicator", RSRC_CONF,
> "Name of the Apache environment that contains SSL key size in use"),
> AP_INIT_TAKE1(
> "Jk2ExtractSSL", jk2_set1, "extractSsl", RSRC_CONF,
> "Turns on SSL processing and information gathering by mod_jk"),
> AP_INIT_TAKE1(
> "Jk2ForwardSSLKeySize", jk2_set1, "forwardSslKeySize", RSRC_CONF,
> "Forward SSL Key Size, to follow 2.3 specs but may broke old TC 3.2,"
> "off is backward compatible"),
> AP_INIT_TAKE1(
> "ForwardURICompat",  jk2_set1, "forwardUriCompat", RSRC_CONF,
> "Forward URI normally, less spec compliant but mod_rewrite compatible (old 
>TC)"),
> AP_INIT_TAKE1(
> "Jk2ForwardURICompatUnparsed", jk2_set1, "forwardUriCompatUnparsed", 
>RSRC_CONF,
> "Forward URI as unparsed, spec compliant but broke mod_rewrite (old TC)"),
> AP_INIT_TAKE1(
> "Jk2ForwardURIEscaped", jk2_set1, "forwardUriEscaped", RSRC_CONF,
> "Forward URI escaped and Tomcat (3.3 rc2) stuff will do the decoding part"),
> AP_INIT_TAKE2(
> "Jk2EnvVar", jk2_set2, "env", RSRC_CONF,
> "Adds a name of environment variable that should be sent from web server "
> "to servlet-engine"),
> 

Well I am not sure that changing the directive names serves any other purpose
that preventing using the old mod_jk configuration.

> ...
> 
> 2) When you have on Apache 2.0, mod_jk (native) and mod_jk2 (native2), both
>report in error log as mod_jk/1.2.0 !
> 
> [Wed Feb 20 00:19:28 2002] [notice] Apache/2.0.28 (Unix) mod_ssl/3.0a0 
>OpenSSL/0.9.6b DAV/2 mod_jk/1.2.0 mod_jk/1.2.0 configured -- resuming normal 
>operations


mod_jk/2.0.0 sounds better.

> 
> 3) To have both installed you should rename mod_jk.so from native2 to mod_jk2.so
>for example in apache lib.
> 
> So 
> 
> - Why not rename mod_jk in native2 to mod_jk2.

No because we are already in jakarta-tomcat-connectors/jk (mod_jk2 does not
bring more information than native2).

> 
> - All directives are now Jk2...
> 
> - mod_jk2 start at version 1.0.0
> 
> JF, Costin, Kevin, Mike, Remy (;), thanks to comments
> 
> -
> Henri Gomez ___[_]
> EMAIL : [EMAIL PROTECTED](. .)
> PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
> PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
> 

DO NOT REPLY [Bug 6569] New: - setLocale() doesn't set the Content-Type charset attribute

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6569

setLocale() doesn't set the Content-Type charset attribute

   Summary: setLocale() doesn't set the Content-Type charset
attribute
   Product: Tomcat 4
   Version: 4.0.2 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


According to the 2.3 spec, setLocale() should set the Content-Type header's
charset attribute, but this sample returns just "Content-Type: text/html":

public class LocaleServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
res.setContentType("text/html");
res.setLocale(Locale.JAPANESE);
PrintWriter out = res.getWriter();
out.println("Hello!");
}
}

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4518] - load-on-startup is not working with jsp page.

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=4518

load-on-startup is not working with jsp page.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
  Component|Unknown |Jasper
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-01-22 00:51 ---
As of 4.0.2-b1, it still not working.  The jspinit method is not being executed 
on startup.  Tomcat 3.3 had the same problem which they just fixed last month 
in a nightly build - bug id 5390.

--- Additional Comments From [EMAIL PROTECTED]  2002-02-20 07:13 ---
This has been fixed on both branches.
4.0.3-b1 will have the fix, as well as nightly for 02/20.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0 OUTSTANDING-BUGS-4.0.3.txt RELEASE-NOTES-4.0.3-B1.txt

2002-02-19 Thread remm

remm02/02/19 23:10:56

  Modified:.Tag: tomcat_40_branch OUTSTANDING-BUGS-4.0.3.txt
RELEASE-NOTES-4.0.3-B1.txt
  Log:
  - Bug status update.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.7   +0 -1  jakarta-tomcat-4.0/Attic/OUTSTANDING-BUGS-4.0.3.txt
  
  Index: OUTSTANDING-BUGS-4.0.3.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/Attic/OUTSTANDING-BUGS-4.0.3.txt,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- OUTSTANDING-BUGS-4.0.3.txt15 Feb 2002 23:21:07 -  1.1.2.6
  +++ OUTSTANDING-BUGS-4.0.3.txt20 Feb 2002 07:10:56 -  1.1.2.7
  @@ -8,7 +8,6 @@
   
   
   3509webapp Apache 1.3.20 & mod_webapp & Tomcat 4b7 HANGS under Win
  -4518jasper load-on-startup is not working with jsp page
   4793webapp mod_webapp connector doesn´t work
   4930webapp java.io.StreamCorruptedException: Type code out of range, 
  is 0 with Apache WebApp module
  
  
  
  1.1.2.8   +5 -1  jakarta-tomcat-4.0/Attic/RELEASE-NOTES-4.0.3-B1.txt
  
  Index: RELEASE-NOTES-4.0.3-B1.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/Attic/RELEASE-NOTES-4.0.3-B1.txt,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- RELEASE-NOTES-4.0.3-B1.txt19 Feb 2002 17:47:05 -  1.1.2.7
  +++ RELEASE-NOTES-4.0.3-B1.txt20 Feb 2002 07:10:56 -  1.1.2.8
  @@ -3,7 +3,7 @@
   Release Notes
   =
   
  -$Id: RELEASE-NOTES-4.0.3-B1.txt,v 1.1.2.7 2002/02/19 17:47:05 remm Exp $
  +$Id: RELEASE-NOTES-4.0.3-B1.txt,v 1.1.2.8 2002/02/20 07:10:56 remm Exp $
   
   
   
  @@ -97,8 +97,10 @@
   --
   
   3770  HttpSessionListener.sessionCreated() called twice for each session
  +4518  Jsp-file and load-on-startup and init-param does not work
   5422  HTTP Headers not being cleared after form authentication
   5647  AJP13 connector will not pass authentication requests
  +6090  Listener not instantiated in tld file
   6374  Class not found for: org/w3c/dom/range/Range
   6396  LoggerBase class is package not public
   6406  All classes in $CATALINA_HOME/classes become invisible 
  @@ -108,6 +110,8 @@
   6468  Content-type not set for errors
   6480  HttpServletRequest.getPathTranslated() returns different results 
 on repeated actions
  +6550  Old WebappClassLoaders can't be GC'd
  +6558  NPE in RequestDumperValve.toString if debug in catalina/XmlMapper
   
   
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-02-19 Thread remm

remm02/02/19 23:09:49

  Modified:catalina/src/share/org/apache/catalina/core Tag:
tomcat_40_branch StandardWrapper.java
  Log:
  - Port fix for bug 4518 (spec compliance issue with jspInit).
  - This is a port of fix for 5390 to Tomcat 4.
  - This is a nasty hack (but it works). Hopefully, the new Jasper will have a nice way
to handle this, but there's no other solution at the moment :-(
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.29.2.8  +16 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
  
  Index: StandardWrapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
  retrieving revision 1.29.2.7
  retrieving revision 1.29.2.8
  diff -u -r1.29.2.7 -r1.29.2.8
  --- StandardWrapper.java  20 Dec 2001 10:00:39 -  1.29.2.7
  +++ StandardWrapper.java  20 Feb 2002 07:09:48 -  1.29.2.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.29.2.7 2001/12/20 10:00:39 remm Exp $
  - * $Revision: 1.29.2.7 $
  - * $Date: 2001/12/20 10:00:39 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.29.2.8 2002/02/20 07:09:48 remm Exp $
  + * $Revision: 1.29.2.8 $
  + * $Date: 2002/02/20 07:09:48 $
*
* 
*
  @@ -90,6 +90,8 @@
   import org.apache.catalina.Request;
   import org.apache.catalina.Response;
   import org.apache.catalina.Wrapper;
  +import org.apache.catalina.connector.HttpRequestBase;
  +import org.apache.catalina.connector.HttpResponseBase;
   import org.apache.catalina.loader.StandardClassLoader;
   import org.apache.catalina.util.Enumerator;
   import org.apache.catalina.util.InstanceSupport;
  @@ -102,7 +104,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.29.2.7 $ $Date: 2001/12/20 10:00:39 $
  + * @version $Revision: 1.29.2.8 $ $Date: 2002/02/20 07:09:48 $
*/
   
   public final class StandardWrapper
  @@ -914,6 +916,16 @@
   instanceSupport.fireInstanceEvent(InstanceEvent.BEFORE_INIT_EVENT,
 servlet);
   servlet.init(facade);
  +servlet.init(facade);
  +// Invoke jspInit on JSP pages
  +if ((loadOnStartup > 0) && (jspFile != null)) {
  +// Invoking jspInit
  +HttpRequestBase req = new HttpRequestBase();
  +HttpResponseBase res = new HttpResponseBase();
  +req.setServletPath(jspFile);
  +req.setQueryString("jsp_precompile=true");
  +servlet.service(req, res);
  +}
   instanceSupport.fireInstanceEvent(InstanceEvent.AFTER_INIT_EVENT,
 servlet);
   } catch (UnavailableException f) {
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-02-19 Thread remm

remm02/02/19 23:09:24

  Modified:catalina/src/share/org/apache/catalina/core
StandardWrapper.java
  Log:
  - Fix bug 4518 (spec compliance issue with jspInit).
  - This is a port of fix for 5390 to Tomcat 4.
  - This is a nasty hack (but it works). Hopefully, the new Jasper will have a nice way
to handle this, but there's no other solution at the moment :-(
  
  Revision  ChangesPath
  1.37  +15 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
  
  Index: StandardWrapper.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- StandardWrapper.java  26 Jan 2002 02:01:56 -  1.36
  +++ StandardWrapper.java  20 Feb 2002 07:09:24 -  1.37
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.36 2002/01/26 02:01:56 craigmcc Exp $
  - * $Revision: 1.36 $
  - * $Date: 2002/01/26 02:01:56 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.37 2002/02/20 07:09:24 remm Exp $
  + * $Revision: 1.37 $
  + * $Date: 2002/02/20 07:09:24 $
*
* 
*
  @@ -90,6 +90,8 @@
   import org.apache.catalina.Request;
   import org.apache.catalina.Response;
   import org.apache.catalina.Wrapper;
  +import org.apache.catalina.connector.HttpRequestBase;
  +import org.apache.catalina.connector.HttpResponseBase;
   import org.apache.catalina.loader.StandardClassLoader;
   import org.apache.catalina.util.Enumerator;
   import org.apache.catalina.util.InstanceSupport;
  @@ -102,7 +104,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.36 $ $Date: 2002/01/26 02:01:56 $
  + * @version $Revision: 1.37 $ $Date: 2002/02/20 07:09:24 $
*/
   
   public final class StandardWrapper
  @@ -915,6 +917,15 @@
   instanceSupport.fireInstanceEvent(InstanceEvent.BEFORE_INIT_EVENT,
 servlet);
   servlet.init(facade);
  +// Invoke jspInit on JSP pages
  +if ((loadOnStartup > 0) && (jspFile != null)) {
  +// Invoking jspInit
  +HttpRequestBase req = new HttpRequestBase();
  +HttpResponseBase res = new HttpResponseBase();
  +req.setServletPath(jspFile);
  +req.setQueryString("jsp_precompile=true");
  +servlet.service(req, res);
  +}
   instanceSupport.fireInstanceEvent(InstanceEvent.AFTER_INIT_EVENT,
 servlet);
   } catch (UnavailableException f) {
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/xml PathMatch.java SaxContext.java XmlAction.java XmlMapper.java XmlMatch.java

2002-02-19 Thread remm

remm02/02/19 19:22:51

  Removed: catalina/src/share/org/apache/catalina/util/xml
PathMatch.java SaxContext.java XmlAction.java
XmlMapper.java XmlMatch.java
  Log:
  - Remove the old XML mapper code.
  - If it is still useful, let me know and I'll resurrect it.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6090] - Listener not instantiated in tld file

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6090

Listener not instantiated in tld file

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-02-20 03:20 ---
Fixed in both branches. Nightly for 02/20 will have the fix.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-02-19 Thread remm

remm02/02/19 19:18:32

  Modified:catalina/src/share/org/apache/catalina/startup Tag:
tomcat_40_branch ContextConfig.java
  Log:
  - Fix bug 6090. WEB-INF will now be scanned for TLD files containing listeners.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.52.2.1  +27 -12
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.52
  retrieving revision 1.52.2.1
  diff -u -r1.52 -r1.52.2.1
  --- ContextConfig.java4 Sep 2001 18:15:30 -   1.52
  +++ ContextConfig.java20 Feb 2002 03:18:32 -  1.52.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.52 2001/09/04 18:15:30 craigmcc Exp $
  - * $Revision: 1.52 $
  - * $Date: 2001/09/04 18:15:30 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.52.2.1 2002/02/20 03:18:32 remm Exp $
  + * $Revision: 1.52.2.1 $
  + * $Date: 2002/02/20 03:18:32 $
*
* 
*
  @@ -128,7 +128,7 @@
* of that Context, and the associated defined servlets.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.52 $ $Date: 2001/09/04 18:15:30 $
  + * @version $Revision: 1.52.2.1 $ $Date: 2002/02/20 03:18:32 $
*/
   
   public final class ContextConfig
  @@ -1044,27 +1044,42 @@
   
   }
   
  -// Second, scan tag libraries defined in JAR files
  -// FIXME - Yet another dependence on files
  +DirContext resources = context.getResources();
  +
  +// Second, scan tag libraries defined in tld files in /WEB-INF
  +if (debug >= 1)
  +log("Scanning TLD files in /WEB-INF");
  +String webinfName = "/WEB-INF";
  +// Looking up directory /WEB-INF in the context
  +try {
  +NamingEnumeration enum = resources.list(webinfName);
  +while (enum.hasMoreElements()) {
  +NameClassPair ncPair = (NameClassPair) enum.nextElement();
  +String filename = webinfName + "/" + ncPair.getName();
  +if (!filename.endsWith(".tld"))
  +continue;
  +tldConfigTld(filename, mapper);
  +}
  +} catch (NamingException e) {
  +// Silent catch: it's valid that no /WEB-INF directory exists
  +}
  +
  +// Third, scan tag libraries defined in JAR files
   if (debug >= 1)
   log("Scanning library JAR files");
  -DirContext resources = context.getResources();
   String libName = "/WEB-INF/lib";
  -DirContext libDir = null;
   // Looking up directory /WEB-INF/lib in the context
   try {
   NamingEnumeration enum = resources.list(libName);
   while (enum.hasMoreElements()) {
  -NameClassPair ncPair =
  -(NameClassPair) enum.nextElement();
  +NameClassPair ncPair = (NameClassPair) enum.nextElement();
   String filename = libName + "/" + ncPair.getName();
   if (!filename.endsWith(".jar"))
   continue;
   tldConfigJar(filename, mapper);
   }
   } catch (NamingException e) {
  -// Silent catch: it's valid that no /WEB-INF/lib directory
  -//exists
  +// Silent catch: it's valid that no /WEB-INF/lib directory exists
   }
   
   }
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-02-19 Thread remm

remm02/02/19 19:18:19

  Modified:catalina/src/share/org/apache/catalina/startup
ContextConfig.java
  Log:
  - Fix bug 6090. WEB-INF will now be scanned for TLD files containing listeners.
  
  Revision  ChangesPath
  1.58  +27 -12
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- ContextConfig.java19 Feb 2002 22:16:00 -  1.57
  +++ ContextConfig.java20 Feb 2002 03:18:19 -  1.58
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.57 2002/02/19 22:16:00 craigmcc Exp $
  - * $Revision: 1.57 $
  - * $Date: 2002/02/19 22:16:00 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
 1.58 2002/02/20 03:18:19 remm Exp $
  + * $Revision: 1.58 $
  + * $Date: 2002/02/20 03:18:19 $
*
* 
*
  @@ -127,7 +127,7 @@
* of that Context, and the associated defined servlets.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.57 $ $Date: 2002/02/19 22:16:00 $
  + * @version $Revision: 1.58 $ $Date: 2002/02/20 03:18:19 $
*/
   
   public final class ContextConfig
  @@ -823,27 +823,42 @@
   
   }
   
  -// Second, scan tag libraries defined in JAR files
  -// FIXME - Yet another dependence on files
  +DirContext resources = context.getResources();
  +
  +// Second, scan tag libraries defined in tld files in /WEB-INF
  +if (debug >= 1)
  +log("Scanning TLD files in /WEB-INF");
  +String webinfName = "/WEB-INF";
  +// Looking up directory /WEB-INF in the context
  +try {
  +NamingEnumeration enum = resources.list(webinfName);
  +while (enum.hasMoreElements()) {
  +NameClassPair ncPair = (NameClassPair) enum.nextElement();
  +String filename = webinfName + "/" + ncPair.getName();
  +if (!filename.endsWith(".tld"))
  +continue;
  +tldConfigTld(filename, digester);
  +}
  +} catch (NamingException e) {
  +// Silent catch: it's valid that no /WEB-INF directory exists
  +}
  +
  +// Third, scan tag libraries defined in JAR files
   if (debug >= 1)
   log("Scanning library JAR files");
  -DirContext resources = context.getResources();
   String libName = "/WEB-INF/lib";
  -DirContext libDir = null;
   // Looking up directory /WEB-INF/lib in the context
   try {
   NamingEnumeration enum = resources.list(libName);
   while (enum.hasMoreElements()) {
  -NameClassPair ncPair =
  -(NameClassPair) enum.nextElement();
  +NameClassPair ncPair = (NameClassPair) enum.nextElement();
   String filename = libName + "/" + ncPair.getName();
   if (!filename.endsWith(".jar"))
   continue;
   tldConfigJar(filename, digester);
   }
   } catch (NamingException e) {
  -// Silent catch: it's valid that no /WEB-INF/lib directory
  -//exists
  +// Silent catch: it's valid that no /WEB-INF/lib directory exists
   }
   
   }
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/resources/confinstall server_2.xml

2002-02-19 Thread remm

remm02/02/19 18:44:11

  Modified:resources/confinstall server_2.xml
  Log:
  - Fix incorrect resource name in the config file used by the installer.
  
  Revision  ChangesPath
  1.2   +1 -1  jakarta-tomcat-4.0/resources/confinstall/server_2.xml
  
  Index: server_2.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/resources/confinstall/server_2.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- server_2.xml  1 Feb 2002 00:15:11 -   1.1
  +++ server_2.xml  20 Feb 2002 02:44:11 -  1.2
  @@ -76,7 +76,7 @@
  that are performed against this UserDatabase are immediately
  available for use by the Realm.  -->
 
  + debug="0" resourceName="java:UserDatabase"/>
   
 
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config ajp.xml

2002-02-19 Thread remm

remm02/02/19 18:40:22

  Modified:webapps/tomcat-docs/config Tag: tomcat_40_branch ajp.xml
  Log:
  - Add documentation on the 'tomcatAuthentication' flag.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.2.2.6   +10 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/config/Attic/ajp.xml
  
  Index: ajp.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/Attic/ajp.xml,v
  retrieving revision 1.2.2.5
  retrieving revision 1.2.2.6
  diff -u -r1.2.2.5 -r1.2.2.6
  --- ajp.xml   30 Jan 2002 17:32:10 -  1.2.2.5
  +++ ajp.xml   20 Feb 2002 02:40:22 -  1.2.2.6
  @@ -132,6 +132,16 @@
 to a particular port number on a particular IP address.
   
   
  +
  +  This flag, which value defaults to true, indicates
  +  whether or not authentication will be handled by Tomcat or the native 
  +  web server. If the attribute value is true, any pricipal 
  +  authenticated by the native web server will be ignored, and Tomcat will 
  +  take care of the authentication. If the attribute value 
  +  is false, Tomcat will not attempt to authenticate 
  +  a principal if the native web server has already authenticated one.
  +
  +
 
   
 
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config jk.xml

2002-02-19 Thread remm

remm02/02/19 18:39:26

  Modified:webapps/tomcat-docs/config jk.xml
  Log:
  - Add documentation on the 'tomcatAuthentication' flag.
  
  Revision  ChangesPath
  1.4   +10 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/config/jk.xml
  
  Index: jk.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/jk.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk.xml31 Jan 2002 18:45:14 -  1.3
  +++ jk.xml20 Feb 2002 02:39:26 -  1.4
  @@ -132,6 +132,16 @@
 to a particular port number on a particular IP address.
   
   
  +
  +  This flag, which value defaults to true, indicates
  +  whether or not authentication will be handled by Tomcat or the native 
  +  web server. If the attribute value is true, any pricipal 
  +  authenticated by the native web server will be ignored, and Tomcat will 
  +  take care of the authentication. If the attribute value 
  +  is false, Tomcat will not attempt to authenticate 
  +  a principal if the native web server has already authenticated one.
  +
  +
 
   
 
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat Design Diagram

2002-02-19 Thread Amy Roh



steve martin wrote:
> 
> Could anyone point me to the UML diagram or similar
> design diagram of Catalina and Jasper?
> 

There are some nice UML diagrams that document the internal architecture
of the Catalina in CATALINA_HOME\catalina\docs\dev\architecture.html

Amy

> Any suggestion as to where I should start to learn
> about Tomcat 4 architecture?
> 
> thanks,
> steve
> 
> __
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat Design Diagram

2002-02-19 Thread steve martin

Could anyone point me to the UML diagram or similar
design diagram of Catalina and Jasper?

Any suggestion as to where I should start to learn
about Tomcat 4 architecture?

thanks,
steve

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6550] - Old WebappClassLoaders can't be GC'd. Not all references removed.

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6550

Old WebappClassLoaders can't be GC'd. Not all references removed.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-02-20 01:28 ---
Fixed in both branches. Nightly for 02/20 will have the patch. Thanks a lot for
the analysis and the patch.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-02-19 Thread remm

remm02/02/19 17:26:26

  Modified:catalina/src/share/org/apache/catalina/core Tag:
tomcat_40_branch StandardContext.java
  Log:
  - Port fix for bug 6550 (memory leak when reloading).
  - This version of the fix is a lot more hackish, beacause TC 4.0 doesn't have
the refactoring of the naming context handling as a listener :-(
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.78.2.12 +9 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.78.2.11
  retrieving revision 1.78.2.12
  diff -u -r1.78.2.11 -r1.78.2.12
  --- StandardContext.java  14 Feb 2002 19:54:00 -  1.78.2.11
  +++ StandardContext.java  20 Feb 2002 01:26:26 -  1.78.2.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.78.2.11 2002/02/14 19:54:00 remm Exp $
  - * $Revision: 1.78.2.11 $
  - * $Date: 2002/02/14 19:54:00 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.78.2.12 2002/02/20 01:26:26 remm Exp $
  + * $Revision: 1.78.2.12 $
  + * $Date: 2002/02/20 01:26:26 $
*
* 
*
  @@ -142,7 +142,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.78.2.11 $ $Date: 2002/02/14 19:54:00 $
  + * @version $Revision: 1.78.2.12 $ $Date: 2002/02/20 01:26:26 $
*/
   
   public class StandardContext
  @@ -2418,6 +2418,10 @@
   }
   }
   
  +if (isUseNaming()) {
  +ContextBindings.unbindClassLoader(this, this);
  +}
  +
   // Restart our application class loader
   if ((loader != null) && (loader instanceof Lifecycle)) {
   try {
  @@ -3444,6 +3448,7 @@
   // Create and register the associated naming context, if internal
   // naming is used
   if (isUseNaming()) {
  +ContextBindings.unbindClassLoader(this, this);
   ContextAccessController.unsetSecurityToken
   (getNamingContextName(), this);
   }
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-02-19 Thread remm

remm02/02/19 17:18:55

  Modified:catalina/src/share/org/apache/catalina/core
NamingContextListener.java
  Log:
  - Fix bug 6550 (memory leak when reloading).
  - Patch submitted by Thomas Åhlén 
  
  Revision  ChangesPath
  1.9   +6 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
  
  Index: NamingContextListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- NamingContextListener.java23 Jan 2002 00:20:18 -  1.8
  +++ NamingContextListener.java20 Feb 2002 01:18:55 -  1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
 1.8 2002/01/23 00:20:18 remm Exp $
  - * $Revision: 1.8 $
  - * $Date: 2002/01/23 00:20:18 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
 1.9 2002/02/20 01:18:55 remm Exp $
  + * $Revision: 1.9 $
  + * $Date: 2002/02/20 01:18:55 $
*
* 
*
  @@ -116,7 +116,7 @@
* with each context and server.
*
* @author Remy Maucherat
  - * @version $Revision: 1.8 $ $Date: 2002/01/23 00:20:18 $
  + * @version $Revision: 1.9 $ $Date: 2002/02/20 01:18:55 $
*/
   
   public class NamingContextListener
  @@ -329,6 +329,8 @@
   
   // Setting the context in read/write mode
   ContextAccessController.setWritable(getName(), container);
  +
  +ContextBindings.unbindClassLoader(container, container);
   
   ContextAccessController.unsetSecurityToken(getName(), container);
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/service/support apfunctions.m4 apjava.m4 apsupport.m4 buildconf.sh config.guess config.sub install.sh

2002-02-19 Thread remm

remm02/02/19 17:07:50

  Removed: service  .cvsignore INSTALL.txt Makedefs.in Makefile.in
configure.in
   service/java .cvsignore Makefile.in Service.java
ServiceController.java ServiceLoader.java
SimpleService.java
   service/native .cvsignore Makefile.in arguments.c
arguments.h debug.c debug.h dso-dlfcn.c dso-dyld.c
dso.h help.c help.h home.c home.h java.c java.h
jsvc-unix.c jsvc.h location.c location.h replace.c
replace.h signals.c
   service/support apfunctions.m4 apjava.m4 apsupport.m4
buildconf.sh config.guess config.sub install.sh
  Log:
  - Add an optional dependency on commons-daemon.
  - BootstrapService (which I don't plan to rename because of script compatibility 
concerns)
will not be compiled if commons-daemon is not present.
  - BootstrapService now implements the new Daemon interface (which is
very similar to the Service interface used before).
  - Note: I didn't test the service intalled by the installer, so it may fail.
  - Remove older service code.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0 BUILDING.txt

2002-02-19 Thread remm

remm02/02/19 17:07:34

  Modified:.BUILDING.txt
  Log:
  - Add an optional dependency on commons-daemon.
  - BootstrapService (which I don't plan to rename because of script compatibility 
concerns)
will not be compiled if commons-daemon is not present.
  - BootstrapService now implements the new Daemon interface (which is
very similar to the Service interface used before).
  - Note: I didn't test the service intalled by the installer, so it may fail.
  - Remove older service code.
  
  Revision  ChangesPath
  1.27  +32 -6 jakarta-tomcat-4.0/BUILDING.txt
  
  Index: BUILDING.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/BUILDING.txt,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- BUILDING.txt  12 Feb 2002 23:45:40 -  1.26
  +++ BUILDING.txt  20 Feb 2002 01:07:34 -  1.27
  @@ -1,4 +1,4 @@
  -$Id: BUILDING.txt,v 1.26 2002/02/12 23:45:40 remm Exp $
  +$Id: BUILDING.txt,v 1.27 2002/02/20 01:07:34 remm Exp $
   
   
  Building The Tomcat 4.0 Servlet/JSP Container
  @@ -234,7 +234,7 @@
 the JNDI directory, parallel to "jndi.jar".
   
   
  -(11) Steps (12)-(23) are optional, but are necessary to build a complete binary
  +(11) Steps (12)-(24) are optional, but are necessary to build a complete binary
distribution of Tomcat 4.0. Set the "full.dist" property to "on" in the
build.properties file (see step (23)) to build a complete distribution.
Regular contributors to Tomcat are encouraged to use the complete build 
  @@ -411,7 +411,26 @@
 distribution resides in its own directory.
   
   
  -(24) Customize Build Properties For This Subproject
  +(24) Download and Install the Commons Daemon Binary Distribution
  +
  +NOTE:  This step is only required if you wish to build the classes needed to
  +run Tomcat as a native operating system daemon using commons-daemon.
  +
  +* Download a binary distribution of version 20020219 or later from:
  +
  +http://jakarta.apache.org/builds/jakarta-commons/nightly/commons-daemon
  +
  +  On a Windows platform, you will need:
  +commons-daemon-MMDD.zip
  +
  +  On a Unix platform, you will need:
  +commons-daemon-MMDD.tar.gz
  +
  +* Unpack the binary distribution into a convenient location so that the
  +  distribution resides in its own directory.
  +
  +
  +(25) Customize Build Properties For This Subproject
   
   Most Jakarta subprojects allow you to customize Ant properties (with default
   values defined in the "build.xml" file.  This is done by creating a text file
  @@ -435,7 +454,7 @@
   each developer will have their own version.
   
   
  -(25) Build A Binary Distribution
  +(26) Build A Binary Distribution
   
   Open a command line shell, and issue the following commands:
   
  @@ -443,8 +462,15 @@
 ant -projecthelp
   
   If everything is installed correctly, you should see a list of the Ant
  -"targets" that represent different commands you might wish to build.  By
  -convention, the "dist" target creates a complete binary distribution.  To
  +"targets" that represent different commands you might wish to build.
  +
  +You can check that all dependencies are correctly installed by using 
  +the following commands:
  +
  +  cd ${tomcat.source}
  +  ant detect
  +
  +By convention, the "dist" target creates a complete binary distribution.  To
   execute it, type the following commands:
   
 cd ${tomcat.source}
  
  
  

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




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

2002-02-19 Thread remm

remm02/02/19 17:01:34

  Modified:catalina/src/share/org/apache/catalina/startup
BootstrapService.java
  Log:
  - Add an optional dependency on commons-daemon.
  - BootstrapService (which I don't plan to rename because of script compatibility 
concerns)
will not be compiled if commons-daemon is not present.
  - BootstrapService now implements the new Daemon interface (which is
very similar to the Service interface used before).
  - Note: I didn't test the service intalled by the installer, so it may fail.
  - Remove older service code.
  
  Revision  ChangesPath
  1.14  +23 -13
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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- BootstrapService.java 18 Feb 2002 19:59:28 -  1.13
  +++ BootstrapService.java 20 Feb 2002 01:01:34 -  1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v
 1.13 2002/02/18 19:59:28 remm Exp $
  - * $Revision: 1.13 $
  - * $Date: 2002/02/18 19:59:28 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v
 1.14 2002/02/20 01:01:34 remm Exp $
  + * $Revision: 1.14 $
  + * $Date: 2002/02/20 01:01:34 $
*
* 
*
  @@ -71,8 +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.commons.daemon.Daemon;
  +import org.apache.commons.daemon.DaemonContext;
   import org.apache.catalina.loader.Extension;
   import org.apache.catalina.loader.StandardClassLoader;
   
  @@ -86,11 +86,11 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.13 $ $Date: 2002/02/18 19:59:28 $
  + * @version $Revision: 1.14 $ $Date: 2002/02/20 01:01:34 $
*/
   
   public final class BootstrapService 
  -implements Service {
  +implements Daemon {
   
   
   // --- Static Variables
  @@ -99,7 +99,7 @@
   /**
* Service object used by main.
*/
  -private static Service service = null;
  +private static Daemon service = null;
   
   
   /**
  @@ -120,8 +120,8 @@
   /**
* Load the Catalina Service.
*/
  -public void load(ServiceController controller, String arguments[])
  -throws Throwable {
  +public void init(DaemonContext context)
  +throws Exception {
   
   log("Create Catalina server");
   
  @@ -211,7 +211,7 @@
* Start the Catalina Service.
*/
   public void start()
  -throws Throwable {
  +throws Exception {
   
   log("Starting service");
   String methodName = "start";
  @@ -226,7 +226,7 @@
* Stop the Catalina Service.
*/
   public void stop()
  -throws Throwable {
  +throws Exception {
   
   log("Stopping service");
   String methodName = "stop";
  @@ -237,6 +237,16 @@
   }
   
   
  +/**
  + * Destroy the Catalina Service.
  + */
  +public void destroy() {
  +
  +// FIXME
  +
  +}
  +
  +
   // --- Main Program
   
   
  @@ -256,7 +266,7 @@
   if (service == null) {
   service = new BootstrapService();
   try {
  -service.load(null, args);
  +service.init(null);
   } catch (Throwable t) {
   t.printStackTrace();
   return;
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2002-02-19 Thread remm

remm02/02/19 17:01:10

  Modified:catalina build.xml
  Log:
  - Add an optional dependency on commons-daemon.
  - BootstrapService (which I don't plan to rename because of script compatibility 
concerns)
will not be compiled if commons-daemon is not present.
  - BootstrapService now implements the new Daemon interface (which is
very similar to the Service interface used before).
  - Note: I didn't test the service intalled by the installer, so it may fail.
  - Remove older service code.
  
  Revision  ChangesPath
  1.105 +28 -9 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.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- build.xml 13 Feb 2002 20:01:37 -  1.104
  +++ build.xml 20 Feb 2002 01:01:10 -  1.105
  @@ -45,6 +45,7 @@
   
   
   
  +
   
   
   
  @@ -76,6 +77,7 @@
   
   
   
  +
   
   
   
  @@ -135,6 +137,9 @@
   
  +
   
  @@ -213,6 +218,7 @@
classpath="${xerces.jar}:${xercesImpl.jar}" />
   
   
  +
   
   
   
  @@ -248,6 +254,12 @@
   
   
   
  +
  +  
  +
  +
  +  
  +
   
 
   
  @@ -321,6 +333,12 @@
   
   
   
  +
  +  
  +
  +
  +  
  +
   
 
   
  @@ -557,6 +575,7 @@
   
   
   
  +
   
   
   
  @@ -577,6 +596,7 @@
   
   
   
  +
   
   
   
  @@ -590,6 +610,7 @@
   
   
   
  +
   
   
   
  @@ -603,6 +624,7 @@
   
   
   
  +
   
   
   
  @@ -644,6 +666,9 @@
   
   
 
  +  
  +
  +  
 
   
 
  @@ -698,7 +723,7 @@
   
   
 
  -  
  +  
   
   
   
  @@ -750,12 +775,6 @@
 
 
   
  -
  -
  -
   
   
 
  +  
 
 
 
  -
  -
   
   
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/etc bootstrap.MF

2002-02-19 Thread remm

remm02/02/19 17:00:57

  Modified:catalina/etc bootstrap.MF
  Log:
  - Add an optional dependency on commons-daemon.
  - BootstrapService (which I don't plan to rename because of script compatibility 
concerns)
will not be compiled if commons-daemon is not present.
  - BootstrapService now implements the new Daemon interface (which is
very similar to the Service interface used before).
  - Note: I didn't test the service intalled by the installer, so it may fail.
  - Remove older service code.
  
  Revision  ChangesPath
  1.2   +1 -0  jakarta-tomcat-4.0/catalina/etc/bootstrap.MF
  
  Index: bootstrap.MF
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/etc/bootstrap.MF,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bootstrap.MF  16 Jul 2001 06:57:09 -  1.1
  +++ bootstrap.MF  20 Feb 2002 01:00:57 -  1.2
  @@ -1,4 +1,5 @@
   Manifest-Version: 1.0
   Main-Class: org.apache.catalina.startup.Bootstrap
  +Class-Path: commons-daemon.jar
   Specification-Title: Catalina
   Specification-Version: 1.0
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread Remy Maucherat

> Remy,
>
> Remy Maucherat wrote:
> > jsvc and the Daemon code don't use the normal Bootstrap class, but
rather
> > use BootstrapService, which is the one which implements the
Service/Daemon
> > interface. This shouldn't call StandardServer.await, but rather will
only
> > call the start and stop method.
> >
> > So doing the setuid change during the daemon init method should work,
since
> > that's where the connectors are initialized.
> >
> > Or did I get something wrong ?
>
> await() is invoked in the Catalina.start() method. So, if you start
standalone (as Unix /etc/rc.d scripts do), Tomcat will invoke
Catalina.start().

But BootstrapService uses CatalinaService, which doesn't do that.
I agree that the standard classes are not suitable to be run as a daemon,
but they've never been designed for that (I have written BootstrapService
and CatalinaService in collaboration with Pier specially for this purpose).

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0 build.properties.sample

2002-02-19 Thread remm

remm02/02/19 16:56:58

  Modified:.build.properties.sample
  Log:
  - Add an optional dependency on commons-daemon.
  - BootstrapService (which I don't plan to rename because of script compatibility 
concerns)
will not be compiled if commons-daemon is not present.
  - BootstrapService now implements the new Daemon interface (which is
very similar to the Service interface used before).
  - Note: I didn't test the service intalled by the installer, so it may fail.
  - Remove older service code.
  
  Revision  ChangesPath
  1.30  +7 -1  jakarta-tomcat-4.0/build.properties.sample
  
  Index: build.properties.sample
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/build.properties.sample,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- build.properties.sample   8 Feb 2002 07:19:03 -   1.29
  +++ build.properties.sample   20 Feb 2002 00:56:58 -  1.30
  @@ -6,7 +6,7 @@
   # modules that Tomcat depends on.  Copy this file to "build.properties"
   # in the top-level source directory, and customize it as needed.
   #
  -# $Id: build.properties.sample,v 1.29 2002/02/08 07:19:03 remm Exp $
  +# $Id: build.properties.sample,v 1.30 2002/02/20 00:56:58 remm Exp $
   # -
   
   
  @@ -49,6 +49,12 @@
   commons-collections.home=${base.path}/commons-collections-1.0
   commons-collections.lib=${commons-collections.home}
   commons-collections.jar=${commons-collections.lib}/commons-collections.jar
  +
  +
  +# - Commons Daemon, version 20020219 or later -
  +commons-daemon.home=${base.path}/commons-daemon
  +commons-daemon.lib=${commons-daemon.home}
  +commons-daemon.jar=${commons-daemon.lib}/commons-daemon.jar
   
   
   # - Commons Digester, version 1.1.1 or later -
  
  
  

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




Re: [Daemon] New commons component

2002-02-19 Thread Patrick Luby

Remy,

Remy Maucherat wrote:
> jsvc and the Daemon code don't use the normal Bootstrap class, but rather
> use BootstrapService, which is the one which implements the Service/Daemon
> interface. This shouldn't call StandardServer.await, but rather will only
> call the start and stop method.
> 
> So doing the setuid change during the daemon init method should work, since
> that's where the connectors are initialized.
> 
> Or did I get something wrong ?

await() is invoked in the Catalina.start() method. So, if you start standalone (as 
Unix /etc/rc.d scripts do), Tomcat will invoke Catalina.start().

Patrick

_
Patrick Luby  Email: [EMAIL PROTECTED]
Sun Microsystems  Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread Remy Maucherat

> Costin,
>
> [EMAIL PROTECTED] wrote:
> >
> > That would be after all connectors have opened the ports, but before
_any_
> > user code gets executed ( including the context init which trigers
loading
> > of on-startup servlets ).
>
> In Tomcat 4.x, the last port opened is in StandardServer.await() - this is
the
> shutdown port. The bad news is that all of the connectors are started
before
> this call. Hence, I suspect that there is, currently, a small window for
user
> code to get executed before the setuid would be called in
StandardServer.await().
>
> Looks like the Tomcat 4.x code in Catalina.start() will need to be
reworked.
> However, after a quick review of the code, I don't think it is that much
work.
> All of the connectors bind to their ports in their initialize() method and
no
> user code, AFAIK, is executed in this method. After all connectors are
> intialized(), only then are the connectors started. So, I am thinking that
all I
> need to do is move the shutdown port binding out of StandardServer.await()
and
> into StandardServer.initialize(). Since StandardServer.initialize()
invokes
> initialize() on all of the connectors, I can put the setuid code at the
end of
> the StandardServer.initialize() method.
>
> Of course, this is how I think it will work so I definitely need to try it
out.
> Maybe later this week I will have some time to try this out and make sure
that
> it actually works.

jsvc and the Daemon code don't use the normal Bootstrap class, but rather
use BootstrapService, which is the one which implements the Service/Daemon
interface. This shouldn't call StandardServer.await, but rather will only
call the start and stop method.

So doing the setuid change during the daemon init method should work, since
that's where the connectors are initialized.

Or did I get something wrong ?

BTW, let me know if you're interested in contributing to Daemon. I can add
your name to the proposal in the commons. Same goes for Costin, Henri, etc,
etc. The more people contributing to the component, the faster it will get
out of the sandbox :)

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [PATCH] log output can get messed up with org.apache.catalina.logger.FileLogger

2002-02-19 Thread Remy Maucherat

> attached is a patch with one possible solution  - i could commit this, but
i generally
> don't commit on tomcat4, so i'd like some +1's before committing :)

+1, but you don't need my permission (I'd complain if I don't like a patch).
If you can, commit the patch on both branches.

Thanks,
Remy



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: jk2 renaming - need revue and comments

2002-02-19 Thread costinm

On Wed, 20 Feb 2002, GOMEZ Henri wrote:

> 1) I choose to rename ALL JK directive since there are
>just too many which are common in JK (SSL, LOG, DATE...)

I think we should get rid of them too :-)

JkWorkersFile should be replaced with a Jk2Properties ( and 
we should use jk2.properties instead of workers.properties ).

The file can be used for all the settings - there is no
need for special directives for logstamp format, etc.
Same for 'uri forward' 'ssl', etc - all can go in the 
properties file.

In addition, "Jk2Set name value" can be used for those
who want to have all settings in httpd.conf.

That means we'll have 2 config styles:
- Generic, properties based workers/jk2.properties + uriMap.properties.

- Server specific, all in httpd.conf - using JkSet and .

> - Why not rename mod_jk in native2 to mod_jk2.

+1

> - All directives are now Jk2...
> 
> - mod_jk2 start at version 1.0.0 

I would call it 2.0 :-)

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Daemon] New commons component

2002-02-19 Thread GOMEZ Henri

It's very easy at least in Unix world to have tomcat
run as a basic user :

Attached is the wrapper code (tomcat4) I use in TC 4.0.2 RPMS 
which replace catalina.sh

dtomcat4 is a modified version of catalina.sh

Ditto for jasper4 and djasper4

I'm unsure it's very usefull to have Tomcat 4.0 start
as root (admin), since they usually listen on port > 1024
(8080, 8081, 8007, 8008, 8009).

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



djasper4
Description: djasper4


dtomcat4
Description: dtomcat4


jasper4
Description: jasper4


tomcat4
Description: tomcat4

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


jk2 renaming - need revue and comments

2002-02-19 Thread GOMEZ Henri

Ouf, finished the renaming of jk2 (native2)

Some remarks :

1) I choose to rename ALL JK directive since there are
   just too many which are common in JK (SSL, LOG, DATE...)

...

AP_INIT_TAKE1(
"Jk2WorkersFile", jk2_set1, "workerFile", RSRC_CONF,
"the name of a worker file for the Jakarta servlet containers"),
AP_INIT_TAKE1(
"Jk2Properties", jk2_set1,  "workerFile", RSRC_CONF,
"Properties file containing additional settings ( replaces JkWoprkerFile )"),
AP_INIT_TAKE2(
"Jk2Set", jk2_set2, NULL, RSRC_CONF,
"Set a jk property, same syntax and rules as in JkWorkersFile"),
AP_INIT_TAKE2(
"Jk2Mount", jk2_set2, "mount", RSRC_CONF,
"A mount point from a context to a Tomcat worker"),
AP_INIT_TAKE2(
"Jk2Worker", jk2_setWorker, NULL, RSRC_CONF,
"Defines workers and worker properties "),
AP_INIT_TAKE2(
"Jk2Webapp", jk2_setWebapp, NULL, ACCESS_CONF,
"Defines a webapp in a Location directive and it's properties"),
AP_INIT_TAKE2(
"Jk2Servlet", jk2_setServlet, NULL, ACCESS_CONF,
"Defines a servlet in a Location directive"),
AP_INIT_TAKE1(
"Jk2MountCopy", jk2_set1, "root_apps_are_global", RSRC_CONF,
"Should the base server mounts be copied from main server to the virtual 
server"),
AP_INIT_TAKE1(
"Jk2LogFile", jk2_set1, "logFile", RSRC_CONF,
"Full path to the Jakarta Tomcat module log file"),
AP_INIT_TAKE1(
"Jk2LogLevel", jk2_set1, "logLevel", RSRC_CONF,
"The Jakarta Tomcat module log level, can be debug, "
"info, error or emerg"),
AP_INIT_TAKE1(
"Jk2LogStampFormat", jk2_set1, "logStampFormat", RSRC_CONF,
"The Jakarta Tomcat module log format, follow strftime synthax"),
AP_INIT_TAKE1(
"Jk2HTTPSIndicator", jk2_set1, "HttpsIndicator", RSRC_CONF,
"Name of the Apache environment that contains SSL indication"),
AP_INIT_TAKE1(
"Jk2CERTSIndicator", jk2_set1, "CertsIndicator", RSRC_CONF,
"Name of the Apache environment that contains SSL client certificates"),
AP_INIT_TAKE1(
 "Jk2CIPHERIndicator", jk2_set1, "CipherIndicator", RSRC_CONF,
"Name of the Apache environment that contains SSL client cipher"),
AP_INIT_TAKE1(
"Jk2SESSIONIndicator", jk2_set1, "SessionIndicator", RSRC_CONF,
"Name of the Apache environment that contains SSL session"),
AP_INIT_TAKE1(
"Jk2KEYSIZEIndicator", jk2_set1, "KeySizeIndicator", RSRC_CONF,
"Name of the Apache environment that contains SSL key size in use"),
AP_INIT_TAKE1(
"Jk2ExtractSSL", jk2_set1, "extractSsl", RSRC_CONF,
"Turns on SSL processing and information gathering by mod_jk"),
AP_INIT_TAKE1(
"Jk2ForwardSSLKeySize", jk2_set1, "forwardSslKeySize", RSRC_CONF,
"Forward SSL Key Size, to follow 2.3 specs but may broke old TC 3.2,"
"off is backward compatible"),
AP_INIT_TAKE1(
"ForwardURICompat",  jk2_set1, "forwardUriCompat", RSRC_CONF,
"Forward URI normally, less spec compliant but mod_rewrite compatible (old 
TC)"),
AP_INIT_TAKE1(
"Jk2ForwardURICompatUnparsed", jk2_set1, "forwardUriCompatUnparsed", RSRC_CONF,
"Forward URI as unparsed, spec compliant but broke mod_rewrite (old TC)"),
AP_INIT_TAKE1(
"Jk2ForwardURIEscaped", jk2_set1, "forwardUriEscaped", RSRC_CONF,
"Forward URI escaped and Tomcat (3.3 rc2) stuff will do the decoding part"),
AP_INIT_TAKE2(
"Jk2EnvVar", jk2_set2, "env", RSRC_CONF,
"Adds a name of environment variable that should be sent from web server "
"to servlet-engine"),

...

2) When you have on Apache 2.0, mod_jk (native) and mod_jk2 (native2), both
   report in error log as mod_jk/1.2.0 !

[Wed Feb 20 00:19:28 2002] [notice] Apache/2.0.28 (Unix) mod_ssl/3.0a0 OpenSSL/0.9.6b 
DAV/2 mod_jk/1.2.0 mod_jk/1.2.0 configured -- resuming normal operations

3) To have both installed you should rename mod_jk.so from native2 to mod_jk2.so
   for example in apache lib.

So 

- Why not rename mod_jk in native2 to mod_jk2.

- All directives are now Jk2...

- mod_jk2 start at version 1.0.0 


JF, Costin, Kevin, Mike, Remy (;), thanks to comments


-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



jk2_renaming.diff.gz
Description: jk2_renaming.diff.gz

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


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

2002-02-19 Thread craigmcc

craigmcc02/02/19 14:16:00

  Modified:catalina/src/share/org/apache/catalina/mbeans
MBeanUtils.java ServerLifecycleListener.java
   catalina/src/share/org/apache/catalina/startup
ContextConfig.java
  Log:
  Correct the mechanism by which MBean names were generated for Valves.  The
  previous algorithm did not support repeated generation of the same name for
  the same Valve instance, which manifested itself as failure to find the
  appropriate MBeans at shutdown time (so that shutdown could complete).
  
  Fix a couple of places in ContextConfig where new valves were being added,
  but the appropriate event listener notifications were not getting sent.
  This causes some Valve MBeans to not get created at startup time.
  
  PR: 4639432
  
  Revision  ChangesPath
  1.27  +13 -30
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- MBeanUtils.java   19 Feb 2002 02:15:27 -  1.26
  +++ MBeanUtils.java   19 Feb 2002 22:16:00 -  1.27
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.26 2002/02/19 02:15:27 craigmcc Exp $
  - * $Revision: 1.26 $
  - * $Date: 2002/02/19 02:15:27 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
 1.27 2002/02/19 22:16:00 craigmcc Exp $
  + * $Revision: 1.27 $
  + * $Date: 2002/02/19 22:16:00 $
*
* 
*
  @@ -109,7 +109,7 @@
*
* @author Craig R. McClanahan
* @author Amy Roh
  - * @version $Revision: 1.26 $ $Date: 2002/02/19 02:15:27 $
  + * @version $Revision: 1.27 $ $Date: 2002/02/19 22:16:00 $
*/
   
   public class MBeanUtils {
  @@ -159,14 +159,6 @@
   private static MBeanServer mserver = createServer();
   
   
  -/**
  - * The sequence number for Valve
  - */
  -private static int contextValveSequence = 0;
  -private static int hostValveSequence = 0;
  -private static int engineValveSequence = 0;
  -
  -
   // - Static Methods
   
   
  @@ -1172,21 +1164,15 @@
   
   if (container instanceof Engine) {
   Service service = ((Engine)container).getService();
  -Integer sequenceInt = new Integer(engineValveSequence);
  -String sequenceStr = sequenceInt.toString();
   name = new ObjectName(domain + ":type=Valve,sequence=" +
  -sequenceStr + ",service=" +
  -service.getName());
  -engineValveSequence++;
  +  valve.hashCode() + ",service=" +
  +  service.getName());
   } else if (container instanceof Host) {
   Service service = ((Engine)container.getParent()).getService();
  -Integer sequenceInt = new Integer(hostValveSequence);
  -String sequenceStr = sequenceInt.toString();
   name = new ObjectName(domain + ":type=Valve,sequence=" +
  -sequenceStr + ",host=" +
  -container.getName() + ",service=" +
  -service.getName());
  -hostValveSequence++;
  +  valve.hashCode() + ",host=" +
  +  container.getName() + ",service=" +
  +  service.getName());
   } else if (container instanceof Context) {
   String path = ((Context)container).getPath();
   if (path.length() < 1) {
  @@ -1194,14 +1180,11 @@
   }
   Host host = (Host) container.getParent();
   Service service = ((Engine) host.getParent()).getService();
  -Integer sequenceInt = new Integer(contextValveSequence);
  -String sequenceStr = sequenceInt.toString();
   name = new ObjectName(domain + ":type=Valve,sequence=" +
  -sequenceStr + ",path=" +
  -path + ",host=" +
  -host.getName() + ",service=" +
  -service.getName());
  -contextValveSequence++;
  +  valve.hashCode() + ",path=" +
  +  path + ",host=" +
  +  host.getName() + ",service=" +
  +  service.getName());
   }
   
   re

DO NOT REPLY [Bug 6558] - null ptr in RequestDumperValve.toString if debug in catalina/XmlMapper

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6558

null ptr in RequestDumperValve.toString if debug in catalina/XmlMapper

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 22:12 ---
Fixed. Merci Alain :)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves RequestDumperValve.java

2002-02-19 Thread remm

remm02/02/19 14:11:26

  Modified:catalina/src/share/org/apache/catalina/valves
RequestDumperValve.java
  Log:
  - Fix bug 6558. I'm not sure the digester would need this fix, but it definitely
doesn't hurt.
  
  Revision  ChangesPath
  1.5   +6 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java
  
  Index: RequestDumperValve.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RequestDumperValve.java   22 Jul 2001 20:25:15 -  1.4
  +++ RequestDumperValve.java   19 Feb 2002 22:11:26 -  1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v
 1.4 2001/07/22 20:25:15 pier Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/07/22 20:25:15 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v
 1.5 2002/02/19 22:11:26 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/02/19 22:11:26 $
*
* 
*
  @@ -97,7 +97,7 @@
* of the logging you wish to perform.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/07/22 20:25:15 $
  + * @version $Revision: 1.5 $ $Date: 2002/02/19 22:11:26 $
*/
   
   public class RequestDumperValve
  @@ -251,7 +251,8 @@
   public String toString() {
   
   StringBuffer sb = new StringBuffer("RequestDumperValve[");
  -sb.append(container.getName());
  +if (container != null)
  +sb.append(container.getName());
   sb.append("]");
   return (sb.toString());
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves RequestDumperValve.java

2002-02-19 Thread remm

remm02/02/19 14:10:47

  Modified:catalina/src/share/org/apache/catalina/valves Tag:
tomcat_40_branch RequestDumperValve.java
  Log:
  - Fix bug 6558.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.4.2.1   +6 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java
  
  Index: RequestDumperValve.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- RequestDumperValve.java   22 Jul 2001 20:25:15 -  1.4
  +++ RequestDumperValve.java   19 Feb 2002 22:10:47 -  1.4.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v
 1.4 2001/07/22 20:25:15 pier Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/07/22 20:25:15 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v
 1.4.2.1 2002/02/19 22:10:47 remm Exp $
  + * $Revision: 1.4.2.1 $
  + * $Date: 2002/02/19 22:10:47 $
*
* 
*
  @@ -97,7 +97,7 @@
* of the logging you wish to perform.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/07/22 20:25:15 $
  + * @version $Revision: 1.4.2.1 $ $Date: 2002/02/19 22:10:47 $
*/
   
   public class RequestDumperValve
  @@ -251,7 +251,8 @@
   public String toString() {
   
   StringBuffer sb = new StringBuffer("RequestDumperValve[");
  -sb.append(container.getName());
  +if (container != null)
  +sb.append(container.getName());
   sb.append("]");
   return (sb.toString());
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6561] - Log rollover at midnight doesn't work

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6561

Log rollover at midnight doesn't work

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 22:06 ---
Yes, the feature is indeed broken in 4.0.1.

*** This bug has been marked as a duplicate of 4327 ***

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6561] New: - Log rollover at midnight doesn't work

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6561

Log rollover at midnight doesn't work

   Summary: Log rollover at midnight doesn't work
   Product: Tomcat 4
   Version: 4.0.1 Final
  Platform: PC
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The rollover at midnight feature of the file access log
(localhost_access_log..txt) 
of Tomcat 4.0.1 (standalone) seems broken.
The logfile created at Tomcat startup is retained 
for all days to follow. Only restarting Tomcat starts a new logfile. 
The other logfiles 
(localhost_log..log and catallina..log) DO
roll over.


This is the 
relevant (I think) section from server.xml:

  


In the docs I 
couldn't find a setting to turn the rollover feature on or
off.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread Patrick Luby

Costin,

[EMAIL PROTECTED] wrote:
>
> That would be after all connectors have opened the ports, but before _any_
> user code gets executed ( including the context init which trigers loading
> of on-startup servlets ).

In Tomcat 4.x, the last port opened is in StandardServer.await() - this is the
shutdown port. The bad news is that all of the connectors are started before
this call. Hence, I suspect that there is, currently, a small window for user
code to get executed before the setuid would be called in StandardServer.await().

Looks like the Tomcat 4.x code in Catalina.start() will need to be reworked.
However, after a quick review of the code, I don't think it is that much work.
All of the connectors bind to their ports in their initialize() method and no
user code, AFAIK, is executed in this method. After all connectors are
intialized(), only then are the connectors started. So, I am thinking that all I
need to do is move the shutdown port binding out of StandardServer.await() and
into StandardServer.initialize(). Since StandardServer.initialize() invokes
initialize() on all of the connectors, I can put the setuid code at the end of
the StandardServer.initialize() method.

Of course, this is how I think it will work so I definitely need to try it out.
Maybe later this week I will have some time to try this out and make sure that
it actually works.

Thanks,

Patrick

-- 
_
Patrick Luby  Email: [EMAIL PROTECTED]
Sun Microsystems  Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread costinm

On Tue, 19 Feb 2002, Patrick Luby wrote:

> focus my efforts on finding a good place in Tomcat 4.x to setuid to a non-root
> user like Apache does instead of pursuing this probably platform specific use of 
>setuid.

That would be after all connectors have opened the ports, but before _any_ 
user code gets executed ( including the context init which trigers loading 
of on-startup servlets ).



Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6557] - isapi_redirector can not handle post request from netscape 4.7x

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6557

isapi_redirector can not handle post request from netscape 4.7x

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Priority|Other   |High



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 20:35 ---
i changed the priority to high because iis nt service can not be stopped after 
such a 'post'

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6560] New: - naming-factory.jar from Tomcat 4.0.2 RPM not complete

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6560

naming-factory.jar from Tomcat 4.0.2 RPM not complete

   Summary: naming-factory.jar from Tomcat 4.0.2 RPM not complete
   Product: Tomcat 4
   Version: 4.0.2 Final
  Platform: All
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Installable Packages
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The naming-factory.jar file included with the Tomcat 4.0.2 RPM does not include
all the classes that the naming-factory.jar file in the Tomcat 4.0.2 LE JDK 1.4
tar.gz distribution.

The following files are missing:

org/apache/naming/factory/MailSessionFactory.class
org/apache/naming/factory/MailSessionFactory$1.class
org/apache/naming/factory/ResourceEnvFactory.class
org/apache/naming/factory/ResourceFactory.class
org/apache/naming/factory/SendMailFactory.class
org/apache/naming/factory/SendMailFactory$1.class
org/apache/naming/factory/TyrexDataSourceFactory.class
org/apache/naming/factory/TyrexTransactionFactory.class


I receive an error when ResourceFactory tries to instantiate
TyrexDataSourceFactory (when trying to enlist a JDBC driver in server.xml)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6557] - isapi_redirector can not handle post request from netscape 4.7x

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6557

isapi_redirector can not handle post request from netscape 4.7x





--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 20:18 ---
well, it was a netscape 4.7 issue. but the apache addon module of tomcat can 
handle such case. i think the isapi_redirect should do so, right?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[PATCH] log output can get messed up with org.apache.catalina.logger.FileLogger

2002-02-19 Thread Kevin Seguin

if a lot of log messages are being written to a file by a lot of threads using 
org.apache.catalina.logger.FileLogger, the output can get messed up so that you get 
things like this:

[timestamp-1] [timestamp-2] [message-1]
[message-2]

instead of this:

[timestamp-1] [message-1]
[timestamp-2] [message-2]

i ran into this while trying to debug bug 5735, which requires a decent load (i.e. 
lots of threads).

attached is a patch with one possible solution  - i could commit this, but i generally 
don't commit on tomcat4, so i'd like some +1's before committing :)

-kevin.


Index: catalina/src/share/org/apache/catalina/logger/FileLogger.java
===
RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/logger/FileLogger.java,v

retrieving revision 1.3.2.1
diff -u -b -r1.3.2.1 FileLogger.java
--- catalina/src/share/org/apache/catalina/logger/FileLogger.java   25 Oct 2001 
20:07:44 -  1.3.2.1
+++ catalina/src/share/org/apache/catalina/logger/FileLogger.java   19 Feb 2002 
+19:44:33 -
@@ -289,13 +289,14 @@
 
 // Log this message, timestamped if necessary
 if (writer != null) {
+synchronized (writer) {
 if (timestamp) {
 writer.print(tsString);
 writer.print(" ");
 }
 writer.println(msg);
 }
-
+}
 }
 
 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


cvs commit: jakarta-tomcat RELEASE-PLAN-3.3.1.txt

2002-02-19 Thread larryi

larryi  02/02/19 11:17:56

  Modified:.RELEASE-PLAN-3.3.1.txt
  Log:
  Update release plan
  
  Revision  ChangesPath
  1.6   +17 -2 jakarta-tomcat/RELEASE-PLAN-3.3.1.txt
  
  Index: RELEASE-PLAN-3.3.1.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat/RELEASE-PLAN-3.3.1.txt,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RELEASE-PLAN-3.3.1.txt8 Feb 2002 13:12:42 -   1.5
  +++ RELEASE-PLAN-3.3.1.txt19 Feb 2002 19:17:56 -  1.6
  @@ -80,7 +80,7 @@
   
   Tomcat 3.3.1 Release Candidate 1 Release:
   
  - Code Freeze/Tag Date:   Feb 2, 2002
  + Code Freeze/Tag Date:   Feb 23, 2002
Release Manager:Larry Isaacs
   
   Only safe fixes or documentation updates allowed prior to
  @@ -104,11 +104,23 @@
   
   4364  build-solaris for Apache connector does not compile with -DE
 (do what we can to review and update the connector make files)
  +
  +6214  Problems on ClientAuth
  +  (fix documentation to indicate PoolTcpConnector's attribute
  +   is clientauth, not clientAuth)
  +
  +6448  NullPointerException when docBase is missing
  +  (implement better error handling)
  +
  +6518  class name generated from jsp filename mangles some valid
  +  identifier characters
  +  (derive patch from the one supplied and Tomcat 4.x
  +   implementation)
   
   
   Tomcat 3.3.1 Final Release:
   
  - Code Freeze/Tag Date:   Feb 9, 2002
  + Code Freeze/Tag Date:   March 2, 2002
Release Manager:Larry Isaacs
   
   The current jakarta-tomcat HEAD will be built and released
  @@ -131,6 +143,9 @@
   5560  WONTFIX NEWRemoval of unnecessary white space in output
   5746  INVALID REOPND Settting an error page for the status code 500 doesn't
display the page.
  +6088  WONTFIX NEWToo many custom tags?
  +6369  LATER   NEWjk_nt_service.exe does not set exit code
  + (fix in jakarta-tomcat-connectors)
   
   
   The following bugs will be left with their current resolution:
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread Patrick Luby

Costin,

[EMAIL PROTECTED] wrote:
> 
> On Tue, 19 Feb 2002, Patrick Luby wrote:
> 
> My point was that after you drop the root priviledges, there's no way
> to get them back.
> 
> I just double checked the manual, at least on linux.

Hmmm. I picked this up from the Solaris man pages. It is probably best for me to
focus my efforts on finding a good place in Tomcat 4.x to setuid to a non-root
user like Apache does instead of pursuing this probably platform specific use of 
setuid.

-- 
_
Patrick Luby  Email: [EMAIL PROTECTED]
Sun Microsystems  Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread costinm

On Tue, 19 Feb 2002, Patrick Luby wrote:

> > Changing the uid to root is certainly impossible AFAIK ( at least on
> > unix, on NT everything is possible, but I hope not this one ).
> > 
> Well, of course the process would have to be started as root and the setuid to a
> non-root user happens at the start of the process. Then, the JNI calls allow you
> to invoke setuid to switch back to the "saved uid" which is root (since that is
> the uid of the parent process). The only issue that think that may be
> problematic is multi-threading since all threads get switched back to root 
>momemtarily.

My point was that after you drop the root priviledges, there's no way 
to get them back. 

I just double checked the manual, at least on linux.

Apache and all other unix daemons are started as root, they aquire the 
port, then drop priviledges. 
If calling setuid() again would get back to root, what would be the point? 
The hacker exploiting a stack overflow could easily call setuid. 


> My only worry here is how much resistance there would be for native executables
> to launch Tomcat and/or other tools. Of course, one could also launch Java
> directly so maybe this will make this idea more palatable.

JK and inprocess already require jni.

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[IGNORE]Running a build from CVS

2002-02-19 Thread Filip Hanik

RTFM



Hi I'm trying to run a build from CVS, but all the jars are not included in
the CVS tree.
Where should I put the jars in order for me to run a successful build of the
latest tree.

thanks
Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Running a build from CVS

2002-02-19 Thread Filip Hanik

Hi I'm trying to run a build from CVS, but all the jars are not included in
the CVS tree.
Where should I put the jars in order for me to run a successful build of the
latest tree.

thanks
Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread Patrick Luby

Henri,

There should be no requirement for Tomcat to start as root. However, some may
want to run Tomcat on a port < 1024. In such cases, you need to start as root
but most site admins want the process to setuid to a non-root user for security 
reasons.

Patrick

GOMEZ Henri wrote:
> 
> >Well, of course the process would have to be started as root
> >and the setuid to a
> >non-root user happens at the start of the process. Then, the
> >JNI calls allow you
> >to invoke setuid to switch back to the "saved uid" which is
> >root (since that is
> >the uid of the parent process). The only issue that think that may be
> >problematic is multi-threading since all threads get switched
> >back to root momemtarily.
> 
> Did there is a reason to have Tomcat 3.3/4.0 started as root ?
> 
> Since they listen on port > 1024, there is really no need for
> them to be run as root.
> 
> But for site admins task, having a signal handling in Tomcat is
> a real need to handle task like log rotate for example.
> 
> +1000 to have such interface in TC 3.3/4.0
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

-- 
_
Patrick Luby  Email: [EMAIL PROTECTED]
Sun Microsystems  Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Daemon] New commons component

2002-02-19 Thread GOMEZ Henri

>Well, of course the process would have to be started as root 
>and the setuid to a
>non-root user happens at the start of the process. Then, the 
>JNI calls allow you
>to invoke setuid to switch back to the "saved uid" which is 
>root (since that is
>the uid of the parent process). The only issue that think that may be
>problematic is multi-threading since all threads get switched 
>back to root momemtarily.

Did there is a reason to have Tomcat 3.3/4.0 started as root ?

Since they listen on port > 1024, there is really no need for
them to be run as root.

But for site admins task, having a signal handling in Tomcat is
a real need to handle task like log rotate for example.

+1000 to have such interface in TC 3.3/4.0

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread Patrick Luby

Costin,

[EMAIL PROTECTED] wrote:

> If you have the time, writing this code as part of j-t-c/jk/native2/jni
> would be great :-) There are many things still missing there, like in-process
> support for 4.x and build procedure for other platforms ( we have
> ant-based support for libtool, win, netware - not sure if Mac supports
> libtool ).
> 
Mac OS X has libtool, it is just the location of the JNI libraries at link time
and the need to create a shared library with a .jnilib extension (instead of a
.dylib extension like regular shared libraries :-( ). These should be fairly minor.

> It's better to write the native code using APR, it avoids all the ifdefs
> and system specific code, and it's tested already in apache.
>
I agree, I remember all of the special #ifdefs for the location of all of the
headers for Mac OS X.

> 
> Costin
> 

-- 
_
Patrick Luby  Email: [EMAIL PROTECTED]
Sun Microsystems  Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread Patrick Luby

Costin,

[EMAIL PROTECTED] wrote:
> 
> How easy would it be if that was possible ? For both hackers and
> developers :-)

If we keep this as a "public static void" method, these could be used by any
codebase (as long as they pulled in the .jar and shared library files).

> 
> Changing the uid to root is certainly impossible AFAIK ( at least on
> unix, on NT everything is possible, but I hope not this one ).
> 
Well, of course the process would have to be started as root and the setuid to a
non-root user happens at the start of the process. Then, the JNI calls allow you
to invoke setuid to switch back to the "saved uid" which is root (since that is
the uid of the parent process). The only issue that think that may be
problematic is multi-threading since all threads get switched back to root momemtarily.

The reason I am proposing this tricky approach is that, at least in Tomcat 4.x,
the ServerSocket binding is not all in one place in the code or, AFAIK, right at
the beginning of main(). Hence, it looks like it will be impractical to do all
of the socket binding and then setuid to the non-root user without moving a lot
of code around. I will continue to look at this, however, because of the
threading issue .

> The other part is possible and I think it's a very good solution.

My only worry here is how much resistance there would be for native executables
to launch Tomcat and/or other tools. Of course, one could also launch Java
directly so maybe this will make this idea more palatable.

> 
> Costin
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

-- 
_
Patrick Luby  Email: [EMAIL PROTECTED]
Sun Microsystems  Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Trubles installing mod_jk

2002-02-19 Thread afterz


Hi, I am having some troubles installing mod_jk...

I don`t know what happens, because when I call a servlet,
 or even a 
static page into the directory context, the browser says
 that is 
opening page but gets down with time out.

I think that can be a problem with my mod_jk.so, I`ve got
 it with a 
friend... I would build it but I can`t execute "apxs",
 probably the 
way that the administrator installed it. And I`ve just
 found apache 
directory into /usr/lib/apache, where it is placed
 mod_jk.so.

Another thing, I don`t get any messages of error into the
 logs. Just 
write this in error_log:

Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_jk mod_ssl/2.8.1
 OpenSSL/0.9.6 DAV/1.0.2 PHP/4.0.4pl1 mod_perl/1.24_01
 configured
-- resuming normal operations
[Tue Feb 19 14:01:52 2002] [notice] suEXEC mechanism
 enabled (wrapper: /usr/sbin
/suexec)

Seems ok...
Any ideas???
Thanks.

--
--Ricardo Costa

Don't E-Mail, ZipMail! http://www.zipmail.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6558] New: - null ptr in RequestDumperValve.toString if debug in catalina/XmlMapper

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6558

null ptr in RequestDumperValve.toString if debug in catalina/XmlMapper

   Summary: null ptr in RequestDumperValve.toString if debug in
catalina/XmlMapper
   Product: Tomcat 4
   Version: 4.0.2 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED],[EMAIL PROTECTED]


there is a null pointer in RequestDumperValve.toString 
when I've set the debug mode so that XmlMapper
shows it's behavior

the error seems to came from the fact that the container
is not yet set, and that ObjectCreate action call
toString on this young valve.

in my opinion this explins
bug 2635 in Apache SOAP
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2635


the solution could be to test the fact that the conainer is null
in the toString :

 /**
 * Return a String rendering of this object.
 */
public String toString() {

StringBuffer sb = new StringBuffer("RequestDumperValve[");
if(container!=null) {sb.append(container.getName());}
sb.append("]");
return (sb.toString());

}


[ERROR,EmbeddedCatalinaServiceSX] Stopped
java.lang.NullPointerException
at org.apache.catalina.valves.RequestDumperValve.toString
(RequestDumperValve.java:254)
at java.lang.String.valueOf(String.java:1947)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at org.apache.catalina.util.xml.ObjectCreate.start(XmlMapper.java:619)
at org.apache.catalina.util.xml.XmlMapper.matchStart(XmlMapper.java:412)
at org.apache.catalina.util.xml.XmlMapper.startElement
(XmlMapper.java:91)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6557] New: - isapi_redirector can not handle post request from netscape 4.7x

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6557

isapi_redirector can not handle post request from netscape 4.7x

   Summary: isapi_redirector can not handle post request from
netscape 4.7x
   Product: Tomcat 3
   Version: 3.3 Release Candidate 2
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Major
  Priority: Other
 Component: Connectors
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


when i post a requst by calling NPN_PostURLNotify(), ns plug-in api. 
iis_redirect could not forward the request to tomcat
the problem i addressed was ns4.7x sends the request in seperate steps, eg.
  1. send the http request header
  2. send an 0x0d
  3. send an 0x0a
  4. send the request body
but iis_redirect only forward the first pieces, and tomcat will not get any 
request body data

looking for a fix for this issue

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread costinm

On Tue, 19 Feb 2002, Patrick Luby wrote:

> I was thinking that since all ServerSocket binding is that we could implement
> this as a static native method so that both Tomcat 3.x and 4.x could load the
> shared library and invoke the calls as close as possible to the actual point
> that a ServerSocket object binds to the socket. In Tomcat 4.x, I believe that
> this point is in the createSocket() method of each ServerSocketFactory class.
> 
> If you don't have time, let me know and I can try this later this week.


If you have the time, writing this code as part of j-t-c/jk/native2/jni 
would be great :-) There are many things still missing there, like in-process 
support for 4.x and build procedure for other platforms ( we have
ant-based support for libtool, win, netware - not sure if Mac supports 
libtool ).

It's better to write the native code using APR, it avoids all the ifdefs
and system specific code, and it's tested already in apache. 


Costin  





> BTW, I have access to Linux, Solaris, and Mac OS X machines (the latter from my
> last job porting StarOffice to Mac OS X). So let me know where I can help out as
> I am intimately familiar with the unique process of getting JNI code to link on
> Mac OS X.
> 
> > 
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread costinm

On Tue, 19 Feb 2002, jean-frederic clere wrote:

> Costin has started something like that in
> jakarta-tomcat-connectors/jk/native/jni/jk_jni_aprImpl.c the way is the good
> one: Use APR to save porting problems.

Yes, jk2 will make use of apr.

One 'piece' of jk is a JNI library that will be used from java to
access APR functions - userid is trivial, also shmem, signals, etc.
The main benefit of Apr is that it already have all the 
OS specific things factored out.

It would be very nice if we would keep all JNI code in jk:
- more people are working on it
- the build system is there ( not perfect, but it'll improve )
- people need to build jk anyway.

We can split it in 2 ( APR-java and jk ), but for now I think
it would be much easier to keep things in sync until they 
mature.


Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread costinm

On Tue, 19 Feb 2002, Patrick Luby wrote:

> Pier,
> 
> Hmmm. I could only find the setuid() calls in the parent process that launches
> Tomcat. I couln't find any code JNI code (or a shared library) that Tomcat could
> use to temporarily switch the user back to root immediately before binding a
> ServerSocket object and then switching the user back immediately after. Maybe

How easy would it be if that was possible ? For both hackers and 
developers :-)

Changing the uid to root is certainly impossible AFAIK ( at least on 
unix, on NT everything is possible, but I hope not this one ). 

The other part is possible and I think it's a very good solution.

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5415] - manual rpm requires a webserver, but tomcat doesn't count?

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=5415

manual rpm requires a webserver, but tomcat doesn't count?

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:58 ---
No more required in TC 4.0.2 or TC 3.3 recent RPMs

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6486] - Documentation error for RPM install

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6486

Documentation error for RPM install

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:51 ---
The correct way is to use tomcat4 and jasper4 now in
TC 4.0.2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.0.3-B1.txt

2002-02-19 Thread remm

remm02/02/19 09:47:05

  Modified:.Tag: tomcat_40_branch RELEASE-NOTES-4.0.3-B1.txt
  Log:
  - Update release notes.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.7   +2 -5  jakarta-tomcat-4.0/Attic/RELEASE-NOTES-4.0.3-B1.txt
  
  Index: RELEASE-NOTES-4.0.3-B1.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/Attic/RELEASE-NOTES-4.0.3-B1.txt,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- RELEASE-NOTES-4.0.3-B1.txt18 Feb 2002 05:23:50 -  1.1.2.6
  +++ RELEASE-NOTES-4.0.3-B1.txt19 Feb 2002 17:47:05 -  1.1.2.7
  @@ -3,7 +3,7 @@
   Release Notes
   =
   
  -$Id: RELEASE-NOTES-4.0.3-B1.txt,v 1.1.2.6 2002/02/18 05:23:50 remm Exp $
  +$Id: RELEASE-NOTES-4.0.3-B1.txt,v 1.1.2.7 2002/02/19 17:47:05 remm Exp $
   
   
   
  @@ -42,6 +42,7 @@
   Catalina New Features:
   -
   
  +Authenticator:  Make authenticator non-final so that they can be subclassed.
   
   
   ---
  @@ -212,10 +213,6 @@
   to parse web.xml files and the server.xml configuration file.  If you wish,
   you may replace the "xerces.jar" file in "common/lib" with another XML parser,
   as long as it is compatible with the JAXP/1.1 APIs.
  -
  -If you wish to *not* make any XML parser visible to all web applications,
  -this can be accomplished by copying the "xerces.jar" file from "common/lib"
  -to both "server/lib" and "jasper", and removing it from "common/lib".
   
   
   ---
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6548] - Docs refer to a "jasper" directory but it doesn't exist.

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6548

Docs refer to a "jasper" directory but it doesn't exist.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:46 ---
Fixed. Thanks.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread Patrick Luby

Jean-Frederic,

jean-frederic clere wrote:
> That Pier's code (in jakarta-commons-sandbox/daemon/src/native/unix/native).
> Where is the chmod()?
> The idea of making setuid() and setgid() from the JVM is also possible - I will
> try it -

I was thinking that since all ServerSocket binding is that we could implement
this as a static native method so that both Tomcat 3.x and 4.x could load the
shared library and invoke the calls as close as possible to the actual point
that a ServerSocket object binds to the socket. In Tomcat 4.x, I believe that
this point is in the createSocket() method of each ServerSocketFactory class.

If you don't have time, let me know and I can try this later this week.

BTW, I have access to Linux, Solaris, and Mac OS X machines (the latter from my
last job porting StarOffice to Mac OS X). So let me know where I can help out as
I am intimately familiar with the unique process of getting JNI code to link on
Mac OS X.

> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

-- 
_
Patrick Luby  Email: [EMAIL PROTECTED]
Sun Microsystems  Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread jean-frederic clere

Patrick Luby wrote:
> 
> Pier,
> 
> Hmmm. I could only find the setuid() calls in the parent process that launches
> Tomcat. I couln't find any code JNI code (or a shared library) that Tomcat could
> use to temporarily switch the user back to root immediately before binding a
> ServerSocket object and then switching the user back immediately after. Maybe
> that code already exists somewhere else? If so, let me know where it is and I
> will definitely use it.

Costin has started something like that in
jakarta-tomcat-connectors/jk/native/jni/jk_jni_aprImpl.c the way is the good
one: Use APR to save porting problems.

> 
> BTW, I like the native startup executable that you wrote. I made a proposal to
> this list last week about replacing our many shell scripts (which are causing
> alot of nasty problems on Windows) with a launcher that uses properties files to
> launch Tomcat or the other related tools. I had originally thought about having
> a Java read the properties which would then launch Tomcat. However, you native
> code, especialy with its support for signals and chrooting may be a better
> option. Sure, I would need the native code to read some properties files to get
> classpath and other configurable items, but then I could directly invoke Java to
> run the Tomcat classes.
> 
> Thanks,
> 
> Patrick
> 
> Pier Fumagalli wrote:
> >
> > "Patrick Luby" <[EMAIL PROTECTED]> wrote:
> >
> > > Remy,
> > >
> > > This is great news!
> > >
> > > I scanned through the Unix code and noticed that it uses the chmod'ing
> > > executables with setuid bits instead of performing a JNI call to the setuid()
> > > and seteuid() C functions before and after binding of a ServerSocket (i.e. the
> > > place you should need root access if you are binding to ports 1 through 1024).
> > > This type of approach eliminates the need for a controller and slave process.
> >
> > Then it's not my code... My code was written using setuid() and seteuid()...
> > Actually, the copy I have here also supports CHROOTING of the whole JVM
> > process, and real/effective group switching (as we say in Italy, "'na botte
> > de fero").
> >
> > Pier
> >
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
> 
> --
> _
> Patrick Luby  Email: [EMAIL PROTECTED]
> Sun Microsystems  Phone: 408-276-7471
> 901 San Antonio Road, USCA14-303
> Palo Alto, CA 94303-4900
> _
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6552] - comments parsed in jsp pages

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6552

comments parsed in jsp pages

[EMAIL PROTECTED] changed:

   What|Removed |Added

  Component|Catalina|Jasper

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6374] - class not find for:org/w3c/dom/range/Range

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6374

class not find for:org/w3c/dom/range/Range

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:42 ---
*** Bug 6556 has been marked as a duplicate of this bug. ***

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6556] - Webapp fails on javax.xml.transform.Result class not found

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6556

Webapp fails on javax.xml.transform.Result class not found

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Major
 Status|NEW |RESOLVED
  Component|Webapps |Catalina
 OS/Version|Other   |All
   Priority|Other   |High
   Platform|Other   |All
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:42 ---
The second part of the bug is normal behavior (you must have an XML parser in
common/lib for Jasper). Your version of Xerces in your webapp will fully
override the shared one, except if you're suing it through JAXP (in which case
there's nothing I can do).

The first part has already been fixed in both branches (you can check wither by
recompiling the 'tomcat_40_branch' or using a nightly build).

*** This bug has been marked as a duplicate of 6374 ***

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5513] - $CLASSPATH in /usr/bin/dtomcat4 from the RPM package

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=5513

$CLASSPATH in /usr/bin/dtomcat4 from the RPM package

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID
Summary|$CLASSPATH in   |$CLASSPATH in
   |/usr/bin/dtomcat4 from the  |/usr/bin/dtomcat4 from the
   |RPM package |RPM package



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:41 ---
Same problem will occurs in TC 4.0.2 RPM but
it's the behavior wanted by developpers .

The correct way to handle CLASSPATH is to put 
or symlink jars in common/lib

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4801] - Many documents included with webapps 4.0.1 RPM are zero length

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=4801

Many documents included with webapps 4.0.1 RPM are zero length

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:36 ---
Fixed in RPM 4.0.2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5112] - tomcat4 rpm missing doc files

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=5112

tomcat4 rpm missing doc files

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:36 ---
Fixed in RPM 4.0.2

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5113] - tomcat4-manual-4.0.1-1 rpm missing files

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=5113

tomcat4-manual-4.0.1-1 rpm missing files

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:35 ---
Fixed in RPM 4.0.2 ;)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tomcat: Distributed Session Management revisited

2002-02-19 Thread Aaron Smuts

In JCS (Java Caching System) in Turbine Stratum there is a rough distributed
session layer.  JCS might also be useful for storing session data even if it
is not distributed.  

http://jakarta.apache.org/turbine/stratum/JavaCachingSystem.html

JavaGroups may be good for a JCS distribution plugin as well.  I'll take a
look. . . .

Aaron 

> -Original Message-
> From: Filip Hanik [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 15, 2002 9:12 PM
> To: Tomcat Developers List
> Subject: Re: Tomcat: Distributed Session Management revisited
> 
> hi, let me introduce myself.
> My name is Filip Hanik and I just rejoined this mailing list since my time
> has freed up a little bit lately.
> I was looking through the source code and the archives and was wondering
> what the status Tomcat has on session replication.
> 
> When looking through the source code I saw "package
> org.apache.catalina.cluster;"
> 
> anyway, let me get to the point.
> I'm one of the developers on an open source project called JavaGroups
> (www.javagroups.com).
> JavaGroups is a reliable group communication protocol which is perfectly
> suitable as a messaging protocol between your cluster nodes.
> 
> Built into JavaGroups you already have
> * Reliable multicasting
> * Group membership changes (ie you will be notified when nodes in the
> cluster crashes or startup)
> * Highly configurable protocol stack
> * Works out of the box
> 
> This means, that if you already have a cluster implementation, this
> already
> developed implementation can leverage javagroups as a communication
> protocol.
> 
> Since I'm not a developer on Tomcat (Catalina) I can of course not dictate
> the decisions that are being made around this subject, but if there is a
> possibility for me to help out in the clustering implementation I would be
> more than happy to do so.
> 
> have a great weekend.
> Filip
> 
> ~
> Namaste - I bow to the divine in you
> ~
> Filip Hanik
> Software Architect
> [EMAIL PROTECTED]
> www.filip.net
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



Re: [Daemon] New commons component

2002-02-19 Thread jean-frederic clere

Remy Maucherat wrote:
> 
> > "Patrick Luby" <[EMAIL PROTECTED]> wrote:
> >
> > > Remy,
> > >
> > > This is great news!
> > >
> > > I scanned through the Unix code and noticed that it uses the chmod'ing
> > > executables with setuid bits instead of performing a JNI call to the
> setuid()
> > > and seteuid() C functions before and after binding of a ServerSocket
> (i.e. the
> > > place you should need root access if you are binding to ports 1 through
> 1024).
> > > This type of approach eliminates the need for a controller and slave
> process.
> >
> > Then it's not my code... My code was written using setuid() and
> seteuid()...
> > Actually, the copy I have here also supports CHROOTING of the whole JVM
> > process, and real/effective group switching (as we say in Italy, "'na
> botte
> > de fero").
> 
> There weren't 10 different copies of that code. Just one in j-t-s ;-)
> Obviously, I couldn't have written it myself.

That Pier's code (in jakarta-commons-sandbox/daemon/src/native/unix/native).
Where is the chmod()?
The idea of making setuid() and setgid() from the JVM is also possible - I will
try it -

> 
> Anyway, improvements are always welcome :)
> 
> Remy
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6556] - Webapp fails on javax.xml.transform.Result class not found

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6556

Webapp fails on javax.xml.transform.Result class not found





--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:33 ---
Also I am using Saxon so after moving jaxp.jar to server/lib I had to modify my 
jre/lib/jaxp.properties to use saxon as the transformer factory. After doing 
that Saxon also wasn't found in the web app/lib directory and I had to move it 
to common/lib as well. The error thrown when my app was trying to find saxon 
was:

*
2002-02-19 08:47:29 StandardWrapperValve[ReportIndex]: Servlet.service() for 
servlet ReportIndex threw exception
javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.ajp.tomcat4.Ajp13Processor.process
(Ajp13Processor.java:429)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495)
at java.lang.Thread.run(Thread.java:484)
- Root Cause -
javax.xml.transform.TransformerFactoryConfigurationError: 
java.lang.ClassNotFoundException: com.icl.saxon.TransformerFactoryImpl
at javax.xml.transform.TransformerFactory.newInstance
(TransformerFactory.java:121)
at com.knightsofthenet.dom.SheetManager.setupTransFormer
(SheetManager.java:77)
at com.knightsofthenet.dom.SheetManager.access$0(SheetManager.java)
at com.knightsofthenet.dom.SheetManager$SheetDetail.getStyleSheet
(SheetManager.java:294)
at com.knightsofthenet.dom.SheetManager$SheetDetail.getSheet
(SheetManager.java:279)
at com.knightsofthenet.dom.SheetManager.get(SheetManager.java:102)
at SimpleSQLReportIndexor.getStyleSheet(SimpleSQLReportIndexor.java:123)
at SimpleSQLReportIndexor.processResult(SimpleSQLReportIndexor.java:170)
at SimpleSQLReportIndexor.processQuery(SimpleSQLReportIndexor.java:86)
at SimpleSQLReportIndexor.handleRequest(SimpleSQLReportIndexor.java:61)
at SimpleSQLReportIndexor.doGet(SimpleSQLReportIndexor.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(

Re: [Daemon] New commons component

2002-02-19 Thread Remy Maucherat

> I saw there is provisions in commons-sandbox daemon for
> Interception of Signals.

> Did there is plan to add this feature to Tomcat 3.3.1/4.0.2
> as it will be a real bonus for site admins ?

Well, the BootstrapService class is implementing the service/daemon API, so
if you use it instead of Bootstrap as your entry point, I think it could
work eventually (lots of testing to be done, of course). I have already
patched my Tomcat copy to have it implement the new Daemon interface, but
that would add a dependency on commons-daemon (optional, since only two
optional classes from the startup package need it).

We can then remove the 'service' directory in the Tomcat 4 CVS.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6556] - Webapp fails on javax.xml.transform.Result class not found

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6556

Webapp fails on javax.xml.transform.Result class not found

[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|Webapp fails on |Webapp fails on
   |javax.xml.transform.Result  |javax.xml.transform.Result
   |class not found |class not found



--- Additional Comments From [EMAIL PROTECTED]  2002-02-19 17:31 ---
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6556] New: - Webapp fails on javax.xml.transform.Result class not found

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6556

Webapp fails on javax.xml.transform.Result class not found 

   Summary: Webapp fails on javax.xml.transform.Result class not
found
   Product: Tomcat 4
   Version: 4.0.2 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


One of my web apps fails on javax.xml.transform.Result class not found even 
though jaxp.jar is in the webapp's lib directory. 

The app works if I move jaxp.jar to the TC/common/lib directory.
The Exception thrown is:
**
2002-02-19 08:24:44 StandardWrapperValve[SimpleReports]: Allocate exception for 
servlet SimpleReports
javax.servlet.ServletException: Error instantiating servlet class 
SimpleSQLReport
at org.apache.catalina.core.StandardWrapper.loadServlet
(StandardWrapper.java:893)
at org.apache.catalina.core.StandardWrapper.allocate
(StandardWrapper.java:653)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.ajp.tomcat4.Ajp13Processor.process
(Ajp13Processor.java:429)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495)
at java.lang.Thread.run(Thread.java:484)
- Root Cause -
java.lang.NoClassDefFoundError: javax/xml/transform/Result
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at org.apache.catalina.core.StandardWrapper.loadServlet
(StandardWrapper.java:884)
at org.apache.catalina.core.StandardWrapper.allocate
(StandardWrapper.java:653)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at org.apache.catalina.core.StandardP

Re: [Daemon] New commons component

2002-02-19 Thread Patrick Luby

Pier,

Hmmm. I could only find the setuid() calls in the parent process that launches
Tomcat. I couln't find any code JNI code (or a shared library) that Tomcat could
use to temporarily switch the user back to root immediately before binding a
ServerSocket object and then switching the user back immediately after. Maybe
that code already exists somewhere else? If so, let me know where it is and I
will definitely use it.

BTW, I like the native startup executable that you wrote. I made a proposal to
this list last week about replacing our many shell scripts (which are causing
alot of nasty problems on Windows) with a launcher that uses properties files to
launch Tomcat or the other related tools. I had originally thought about having
a Java read the properties which would then launch Tomcat. However, you native
code, especialy with its support for signals and chrooting may be a better
option. Sure, I would need the native code to read some properties files to get
classpath and other configurable items, but then I could directly invoke Java to
run the Tomcat classes.

Thanks,

Patrick

Pier Fumagalli wrote:
> 
> "Patrick Luby" <[EMAIL PROTECTED]> wrote:
> 
> > Remy,
> >
> > This is great news!
> >
> > I scanned through the Unix code and noticed that it uses the chmod'ing
> > executables with setuid bits instead of performing a JNI call to the setuid()
> > and seteuid() C functions before and after binding of a ServerSocket (i.e. the
> > place you should need root access if you are binding to ports 1 through 1024).
> > This type of approach eliminates the need for a controller and slave process.
> 
> Then it's not my code... My code was written using setuid() and seteuid()...
> Actually, the copy I have here also supports CHROOTING of the whole JVM
> process, and real/effective group switching (as we say in Italy, "'na botte
> de fero").
> 
> Pier
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

-- 
_
Patrick Luby  Email: [EMAIL PROTECTED]
Sun Microsystems  Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
_

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: BUG? References to old WebappClassLoaders never released.

2002-02-19 Thread Remy Maucherat

> To summarize the problem:
>
> I had a memory leak when using Tomcats manager to reload my application.
> Analyzing the situation i found that Singeltons are never GC'd. Why?
Looking
> deeper there seems to be a problem with old WebappClassLoaders never
getting
> GC'd and the reason seems to be that there are references to the
> WebappClassLoaders that never get removed.

Yes, that's a good analysis.
I'll apply the patch.

Thanks,
Remy

> See here for more information:
>
> http://nyx.obidobi.net/~thomas/tomcat/index.html
>
> I have located the problem to:
>
> static Hashtables (clBindings, clNameBindings ) located in class
> org.apache.naming.ContextBindings.
>
> The classLoaders are added to these Hashtables by a call from
> lifecycleEvent in the class NamingContextListner.java
>
> =>
> NamingContextListner.java, 295
>
> if (container instanceof Context) {
> // Setting the context in read only mode
> ContextAccessController.setReadOnly(getName());
> try {
> ContextBindings.bindClassLoader
> (container, container,
>  ((Container)
> container).getLoader().getClassLoader());
> } catch (NamingException e) {
> log(sm.getString("naming.bindFailed", e));
> }
> }
>
> <
>
> I think that there should be a call to unbindClassLoader in the following
> code
>
> NamingContextListner.java, 325
>
> } else if (event.getType() == Lifecycle.STOP_EVENT) {
>
> if (!initialized)
> return;
>
> // Setting the context in read/write mode
> ContextAccessController.setWritable(getName(), container);
>
>  New line ===>   ContextBindings.unbindClassLoader( container,
container );
>
> ContextAccessController.unsetSecurityToken(getName(),
> container);
>
> namingContext = null;
> envCtx = null;
> compCtx = null;
> initialized = false;
>
> }
> }
>
> Thomas
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator BasicAuthenticator.java DigestAuthenticator.java FormAuthenticator.java SSLAuthenticator.java

2002-02-19 Thread craigmcc

craigmcc02/02/19 09:13:26

  Modified:catalina/src/share/org/apache/catalina/authenticator Tag:
tomcat_40_branch BasicAuthenticator.java
DigestAuthenticator.java FormAuthenticator.java
SSLAuthenticator.java
  Log:
  Port (from the HEAD branch) making the Authenticator implementations
  non-final so that they can be subclassed.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.10.2.1  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java
  
  Index: BasicAuthenticator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  --- BasicAuthenticator.java   1 Aug 2001 03:04:04 -   1.10
  +++ BasicAuthenticator.java   19 Feb 2002 17:13:26 -  1.10.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v
 1.10 2001/08/01 03:04:04 craigmcc Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/08/01 03:04:04 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java,v
 1.10.2.1 2002/02/19 17:13:26 craigmcc Exp $
  + * $Revision: 1.10.2.1 $
  + * $Date: 2002/02/19 17:13:26 $
*
* 
*
  @@ -84,10 +84,10 @@
* and Digest Access Authentication."
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.10 $ $Date: 2001/08/01 03:04:04 $
  + * @version $Revision: 1.10.2.1 $ $Date: 2002/02/19 17:13:26 $
*/
   
  -public final class BasicAuthenticator
  +public class BasicAuthenticator
   extends AuthenticatorBase {
   
   
  
  
  
  1.9.2.1   +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java
  
  Index: DigestAuthenticator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- DigestAuthenticator.java  1 Aug 2001 03:04:04 -   1.9
  +++ DigestAuthenticator.java  19 Feb 2002 17:13:26 -  1.9.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java,v
 1.9 2001/08/01 03:04:04 craigmcc Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/08/01 03:04:04 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java,v
 1.9.2.1 2002/02/19 17:13:26 craigmcc Exp $
  + * $Revision: 1.9.2.1 $
  + * $Date: 2002/02/19 17:13:26 $
*
* 
*
  @@ -88,10 +88,10 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.9 $ $Date: 2001/08/01 03:04:04 $
  + * @version $Revision: 1.9.2.1 $ $Date: 2002/02/19 17:13:26 $
*/
   
  -public final class DigestAuthenticator
  +public class DigestAuthenticator
   extends AuthenticatorBase {
   
   
  
  
  
  1.17.2.2  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java
  
  Index: FormAuthenticator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
  retrieving revision 1.17.2.1
  retrieving revision 1.17.2.2
  diff -u -r1.17.2.1 -r1.17.2.2
  --- FormAuthenticator.java11 Oct 2001 22:52:38 -  1.17.2.1
  +++ FormAuthenticator.java19 Feb 2002 17:13:26 -  1.17.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
 1.17.2.1 2001/10/11 22:52:38 craigmcc Exp $
  - * $Revision: 1.17.2.1 $
  - * $Date: 2001/10/11 22:52:38 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v
 1.17.2.2 2002/02/19 17:13:26 craigmcc Exp $
  + * $Revision: 1.17.2.2 $
  + * $Date: 2002/02/19 17:13:26 $
*
* 
*
  @@ -88,10 +88,10 @@
* Authentication, as described in the Servlet API Specification, Version 2.2.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.17.2.1 $ $Date: 2001/10/11 22:52:38 $
  + * @version $Revision: 1.17.2.2 $ $Date: 2002/02/19 17:13:26 $
*/
   
  -public final class FormAuthe

Re: JarURLConnection and 4.0.2 missing java.io.tmpdir ../temp

2002-02-19 Thread Remy Maucherat

> Hi guys, this appears to have already been corrected subsequent to the
> 402 final (ie, the nightly tomcat build) - however, I thought it might
> be very worthwhile for others to know.
>
> the System Property java.io.tmpdir is set on Catalina startup to
> "../temp", however, no empty temp dir is included in the 402
> distribution.
>
> the workaround of creating it is simple, but the consquences of not
> doing so can be very hard to trace.
>
> specifically, java.net.JarURLConnection attempts to create cached copies
> in java.io.tmpdir of jar files for remote jar URLs of the form
>
> jar:http://...
>
> whenever an attempt to get an InputStream is made.
>
> any webapplication code which does this will cause a java.io.IOException
> to be thrown - the last part of the stack trace is typically something
> like (depending on w32 vs unix)

Well, the easiest (and stranger) way to get this bug is to have a TLD in a
JAR file (the TLD would get ignored).

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread Remy Maucherat

> "Patrick Luby" <[EMAIL PROTECTED]> wrote:
>
> > Remy,
> >
> > This is great news!
> >
> > I scanned through the Unix code and noticed that it uses the chmod'ing
> > executables with setuid bits instead of performing a JNI call to the
setuid()
> > and seteuid() C functions before and after binding of a ServerSocket
(i.e. the
> > place you should need root access if you are binding to ports 1 through
1024).
> > This type of approach eliminates the need for a controller and slave
process.
>
> Then it's not my code... My code was written using setuid() and
seteuid()...
> Actually, the copy I have here also supports CHROOTING of the whole JVM
> process, and real/effective group switching (as we say in Italy, "'na
botte
> de fero").

There weren't 10 different copies of that code. Just one in j-t-s ;-)
Obviously, I couldn't have written it myself.

Anyway, improvements are always welcome :)

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6552] New: - comments parsed in jsp pages

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6552

comments parsed in jsp pages

   Summary: comments parsed in jsp pages
   Product: Tomcat 4
   Version: 4.0.2 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Inside <%! %> tags if you have // comments and inside has <%= %> tags which 
often happens when debugging codes or commenting old lines out, the jsp parser 
STILL parses that but incorrectly and would render the page into errors.

For example, I have the following test.jsp page.

Note the lines after
if (localSection != null) {

how it actually parsed the comments too and left out the rest of the important 
codes!


--beginning of file---

<%
/**
* index.jsp
*  Author: Harlow
*
*  Description:
* This is the kids template page.
*
*  Updates:
*12/7/2000 - Moon - Code Review
*4/10/2001 - Harlow - Added keyword to quick search
*/
%>


<%@page import="java.text.*"%>
<%@page import="java.util.Vector"%>
<%@page import="java.util.Enumeration"%>
<%@page import="com.ixl.booksense.stores.*"%>
<%@page import="com.ixl.geography.*"%>
<%@page import="com.ixl.booksense.context.*"%>
<%@page import="com.ixl.booksense.books.*"%>
<%@page import="com.ixl.booksense.nationalData.*"%>
<%@page import="com.ixl.booksense.siteModel.specialized.*"%>
<%@page import="com.ixl.booksense.siteModel.generic.*"%>
<%!

   /**
   getLeftNavSectionString
   returns proper formatting for left nav sections
   TODO:
   Optimize construction of the returnString... this function is called seven
   times for each page.

   */
   private String getLeftNavSectionString(String sectionName, 
StandardColorScheme scheme, Site site, String storeIndexPath, boolean isSecure) 
{
  String returnString = "";
  try {
  NoBodyLocalSection localSection = (NoBodyLocalSection)
site.getSection(sectionName);
  if (localSection != null) {
  //returnString = "?
s=" + sectionName + "\">";
  //returnString = returnString + localSection.getTitle() 
+ "";
  //returnString = returnString + "";

returnString = "";
  }
  } catch (Exception e) {
 returnString = "";
  }

  return returnString;
   }

%>





   <%= storeTitle %>






---end of file---

and it gets parsed into

-beginning of file---
package org.apache.jsp;

import java.text.*;
import java.util.Vector;
import java.util.Enumeration;
import com.ixl.booksense.stores.*;
import com.ixl.geography.*;
import com.ixl.booksense.context.*;
import com.ixl.booksense.books.*;
import com.ixl.booksense.nationalData.*;
import com.ixl.booksense.siteModel.specialized.*;
import com.ixl.booksense.siteModel.generic.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class test$jsp extends HttpJspBase {

// begin [file="/test.jsp";from=(25,3);to=(40,62)]


   /**
   getLeftNavSectionString
   returns proper formatting for left nav sections
   TODO:
   Optimize construction of the returnString... this function is called 
seven
   times for each page.

   */
   private String getLeftNavSectionString(String sectionName, 
StandardColorScheme scheme, Site site, String storeIndexPath, boolean isSecure) 
{
  String returnString = "";
  try {
  NoBodyLocalSection localSection = (NoBodyLocalSection)
site.getSection(sectionName);
  if (localSection != null) {
  //returnString = "\";\r\n\t\t  //returnString = 
returnString + localSection.getTitle() + \"\";\r\n\t\t  //
returnString = returnString + \"\";\r\n\r\n 
\t\t\treturnString = \"\";\r\n\t\t  }\r\n  } catch (Exception e) 
{\r\n returnString = \"\";\r\n  }\r\n\r\n  return 
returnString;\r\n   }\r\n\r\n%>\r\n\r\n");

// end
// begin [file="/test.jsp";from=(55,0);to=(55,95)]
com.ixl.booksense.beans.stores.StoreBean storeBean = null;
boolean _jspx_specialstoreBean  = false;
 synchronized (request) {
storeBean= (com.ixl.booksense.beans.stores.StoreBean)
pageContext.getAttribute
("stor

DO NOT REPLY [Bug 6550] New: - Old WebappClassLoaders can't be GC'd. Not all references removed.

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6550

Old WebappClassLoaders can't be GC'd. Not all references removed.

   Summary: Old WebappClassLoaders can't be GC'd. Not all references
removed.
   Product: Tomcat 4
   Version: 4.0.2 Final
  Platform: All
   URL: http://nyx.obidobi.net/~thomas/tomcat/index.html
OS/Version: All
Status: UNCONFIRMED
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I had a memory leak when using Tomcats manager to reload my application.
Analyzing the situation i found that Singeltons are never GC'd. Why? Looking
deeper there seems to be a problem with old WebappClassLoaders never getting
GC'd and the reason seems to be that there are references to the
WebappClassLoaders that never get removed.

See here for more information:



I have located the problem to:

static Hashtables (clBindings, clNameBindings ) located in class
org.apache.naming.ContextBindings.

The classLoaders are added to these Hashtables by a call from
lifecycleEvent in the class NamingContextListner.java
=
NamingContextListner.java, 295
if (container instanceof Context) {
// Setting the context in read only mode
ContextAccessController.setReadOnly(getName());
try {
ContextBindings.bindClassLoader
(container, container,
((Container)
container).getLoader().getClassLoader());
} catch (NamingException e) {
log(sm.getString("naming.bindFailed", e));
}
}

I think that there should be a call to unbindClassLoader somewhere in 
NamingContextListner.java, method lifecycleEvent
ContextBindings.unbindClassLoader( container, container );
Thomas

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Daemon] New commons component

2002-02-19 Thread Pier Fumagalli

"Patrick Luby" <[EMAIL PROTECTED]> wrote:

> Remy,
> 
> This is great news!
> 
> I scanned through the Unix code and noticed that it uses the chmod'ing
> executables with setuid bits instead of performing a JNI call to the setuid()
> and seteuid() C functions before and after binding of a ServerSocket (i.e. the
> place you should need root access if you are binding to ports 1 through 1024).
> This type of approach eliminates the need for a controller and slave process.

Then it's not my code... My code was written using setuid() and seteuid()...
Actually, the copy I have here also supports CHROOTING of the whole JVM
process, and real/effective group switching (as we say in Italy, "'na botte
de fero").

Pier


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 6548] New: - Docs refer to a "jasper" directory but it doesn't exist.

2002-02-19 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=6548

Docs refer to a "jasper" directory but it doesn't exist.

   Summary: Docs refer to a "jasper" directory but it doesn't exist.
   Product: Tomcat 4
   Version: 4.0.2 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Section below from readme.txt describes moving xerces.jar to server/lib and 
jasper but there is no jasper directory in the binary distribution:

"
--
Tomcat 4.0 and XML Parsers:
--

As described above, Tomcat 4.0 makes an XML parser (and many other standard
APIs) available to web applications.  This parser is also used internally
to parse web.xml files and the server.xml configuration file.  If you wish,
you may replace the "xerces.jar" file in "common/lib" with another XML parser,
as long as it is compatible with the JAXP/1.1 APIs.

If you wish to *not* make any XML parser visible to all web applications,
this can be accomplished by copying the "xerces.jar" file from "common/lib"
to both "server/lib" and "jasper", and removing it from "common/lib".
"

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Rename jK2 to mod_jk2 ?

2002-02-19 Thread GOMEZ Henri

Ok not a nop but a comment

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, February 19, 2002 5:01 PM
>To: Tomcat Developers List
>Subject: RE: Rename jK2 to mod_jk2 ?
>
>
>On Tue, 19 Feb 2002, GOMEZ Henri wrote:
>
>> So JkMount in Jk2 will point to NOP ?
>
>No, it'll be commented out ( as long as we use jk in parallel 
>with jk2 ).
>( to avoid name conflicts ).
>
>When jk2 is ready and we decide it's time to stop supporting jk1, we
>can add back JkMount for backward compatibility, as an equivalent 
>to adding mappings in the properties file ( which it is ).
>
>
>Costin
>
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>
>
>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JarURLConnection and 4.0.2 missing java.io.tmpdir ../temp

2002-02-19 Thread chris monster

Hi guys, this appears to have already been corrected subsequent to the
402 final (ie, the nightly tomcat build) - however, I thought it might
be very worthwhile for others to know.

the System Property java.io.tmpdir is set on Catalina startup to
"../temp", however, no empty temp dir is included in the 402
distribution.

the workaround of creating it is simple, but the consquences of not
doing so can be very hard to trace.

specifically, java.net.JarURLConnection attempts to create cached copies
in java.io.tmpdir of jar files for remote jar URLs of the form

jar:http://...

whenever an attempt to get an InputStream is made.

any webapplication code which does this will cause a java.io.IOException
to be thrown - the last part of the stack trace is typically something
like (depending on w32 vs unix)

java.io.IOException: The system cannot find the path specified
at java.io.Win32FileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1162)
at java.io.File.createTempFile(File.java:1247)
at java.io.File.createTempFile(File.java:1284)
at
sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:138)
at
sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:43)
at
sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:61)
at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:88)
at
sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:108)


Note also that URLConnection.setUseCaches(false) does not change this.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Rename jK2 to mod_jk2 ?

2002-02-19 Thread costinm

On Tue, 19 Feb 2002, GOMEZ Henri wrote:

> So JkMount in Jk2 will point to NOP ?

No, it'll be commented out ( as long as we use jk in parallel with jk2 ).
( to avoid name conflicts ).

When jk2 is ready and we decide it's time to stop supporting jk1, we
can add back JkMount for backward compatibility, as an equivalent 
to adding mappings in the properties file ( which it is ).


Costin



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Jk2 logging

2002-02-19 Thread costinm

On Tue, 19 Feb 2002, Remy Maucherat wrote:

> > If nobody oposes, I will check in a current build of commons-logging
> > ( with the option to override it for those who like downloading
> > each individual dependency ).
> 
> -0.5. The current property system looks ok to me, and Tomcat itself already
> depends on commons-logging (indirectly), so why do that ? If you want to do
> that because of API stability concerns with commons-logging, then I think
> you should postpone using it until it is a bit more stable.

It's a matter of taste mostly. I can live with the current property 
system, but I prefer the build to be as simple as possible - 
 'checkout the tree and type ant', without downloading other 
packages, installing them, editing properties, etc. 

That's a 'taste' shared by other jakarta projects. I used to believe
it is evil, and I argued a lot against it, but it certainly has
the benefit of beeing more friendly to new contributors, who don't 
spend all day working on jk. 

An alternative is to require the user to checkout both
jakarta-commons, and j-t-c ( and maybe j-t, j-t-4 ), like
we used to do in the old days ( with jakarta-tools ).
I just want an alternative to 'download and install and configure'.

Costin







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




BUG? References to old WebappClassLoaders never released.

2002-02-19 Thread Thomas Åhlen

To summarize the problem:

I had a memory leak when using Tomcats manager to reload my application.
Analyzing the situation i found that Singeltons are never GC'd. Why? Looking
deeper there seems to be a problem with old WebappClassLoaders never getting
GC'd and the reason seems to be that there are references to the
WebappClassLoaders that never get removed.

See here for more information:

http://nyx.obidobi.net/~thomas/tomcat/index.html

I have located the problem to:

static Hashtables (clBindings, clNameBindings ) located in class
org.apache.naming.ContextBindings.

The classLoaders are added to these Hashtables by a call from
lifecycleEvent in the class NamingContextListner.java

=>
NamingContextListner.java, 295

if (container instanceof Context) {
// Setting the context in read only mode
ContextAccessController.setReadOnly(getName());
try {
ContextBindings.bindClassLoader
(container, container,
 ((Container)
container).getLoader().getClassLoader());
} catch (NamingException e) {
log(sm.getString("naming.bindFailed", e));
}
}

<

I think that there should be a call to unbindClassLoader in the following
code

NamingContextListner.java, 325

} else if (event.getType() == Lifecycle.STOP_EVENT) {

if (!initialized)
return;

// Setting the context in read/write mode
ContextAccessController.setWritable(getName(), container);

 New line ===>   ContextBindings.unbindClassLoader( container, container );

ContextAccessController.unsetSecurityToken(getName(),
container);

namingContext = null;
envCtx = null;
compCtx = null;
initialized = false;

}
}

Thomas



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: altering the session cookie's path (Tomcat 4.0x): RESOLVED

2002-02-19 Thread jean-frederic clere

Jarecsni János wrote:
> 
> Hi,
> 
> after some time I've found that the session cookie is set in the AJP
> connector, namely in org.apache.ajp.tomcat4.AJP13Response (method
> sendHeaders()). Actually to my surprise
> o.a.c.connector.HttpResponseBase#sendHeaders() is called only when the first
> resource is asked for (that's what I saw), it's not called thereafter any
> more.
> 
> Now everything is working like charm. I have a few questions re this
> solution:
> 
> 1. since it's my modification of the tomcat code, naturally it will not be
> present in any forthcoming tomcat versions - so I'll have to "patch" each
> tomcat version before use (something I always tried to avoid)
> 
> 2. where and how can I initiate that this modification (or a similar one) be
> applied to the official tomcat source?

You should send a cvs diff . or diff -u of the file(s) you changed.

> 
> 3. although my solution is merely an ad hoc one, I can think of a more
> robust solution to the problem: this behavior of tomcat (what path it
> generates in the session cookie) should be governed by some configuration
> properties and not be hardwired in code (the current official code is not
> flexible enough, since it always sets the path to be equivalent with the
> application context if any).

;-)

> 
> Cheers,
> János
> 
> |-Original Message-
> |From: Jarecsni János [mailto:[EMAIL PROTECTED]]
> |Sent: Saturday, February 16, 2002 8:01 PM
> |To: Tomcat Developers List
> |Subject: altering the session cookie's path (Tomcat 4.0x)
> |
> |
> |Hi,
> |
> |I wanted to alter Tomcat's default behavior for setting the JSESSIONID
> |cookie. Tomcat normally sets the path of this cookie to be
> |equivalent of the
> |webcontext if any, otherwise it sets it to "/".
> 
> [...]
> 
> |
> |I've run the application but was shocked to see that Catalina
> |still sets the
> |path to the webcontext... I've checked the source code and found only this
> |class where the session cookie is manipulated:
> |o.a.c.connector.HttpResponseBase (lines 642 sqq).
> |
> |Now I'm a bit puzzled about this... Does some of you see where I made a
> |mistake?
> |
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: mod_webapp contexts and virtual hosts

2002-02-19 Thread Szymon Stasik

Hi,

Jarecsni János wrote:
> |
> |Since I need to have applications available in root, I was trying confs
> |like (I also have to use apache...):
> |
> |WebAppDeploy app_1 conn  /app_1
> |
> |with some rewriting but then it seems to be some session/cookie issue :(
> |
> 
> I've successfully set up a similar environment. I use Apache
> mod_rewrite+mod_proxy to do the job. I also had to modify the code in mod_jk
> since it sets the session cookie (JSESSIONID) with a path which is
> equivalent with the application context name. That's why sessions don't
> work.

IMHO the problem is that while using mod_{jk,webaap}, tomcat seems to 
set context basing 'mostly' on request URI, and setting cookie basing on 
  URI prepended with context. This is true at least for scenarios like:

# now there is problem with session cookie
DocumentBase /var/tomcat4/webapps/app1
RewriteRule  "^/(.*\.xml)"  /app1/$1 [PT]
WebAppDeploy app_1 conn  /app_1

# and now with the context:
DocumentBase /var/tomcat4/webapps/app1
RewriteRule  "^/(.*\.xml)"  /$1 [PT]
RewriteRule  "^/(.*)"  /
WebAppDeploy app_1 conn  /


In both cases RewriteEngine is needed also for serving static content 
with apache

> Since it's a very common set up I simply don't understand why it is
> neglected by tomcat-developers. I've sent numerous mails to tomcat-dev, but
> was ignored. Again: a transparent integration with Apache (with one vhost
> per tomcat webapp approach) is not possible because of tomcat's incorrect
> handling of the session cookie.

I think that thete should be some simple rules to do this and it should 
be well documented. Tomcat is really great piece of code and it has huge 
variety of possibilities however I miss the simplicity of jserv and 
apache configuration ;) Maybe someone more oriented can write sth about 
this case.


regards,

Szymon


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




hai

2002-02-19 Thread Harikrishna_B
Title: hai





Hello all,
   I had kept my servlet in this path in tomcat 4.0.
    d:/program files/apache tomcat 4.0/webapps/examples/web-inf/classes/
TreeServlet
Now where I have to keep the javascript files and the html files in tomcat 4.0 so that 
the servlet will access the html files and the js files.


Thanking you,
B.HARIKRISHNA


** 
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.

**




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: mod_webapp contexts and virtual hosts

2002-02-19 Thread Jarecsni János

Hey,

I've run into something similar, with mod_jk.
More below
--
Jarecsni, János
MORGAN HILL CONSULTING, Internet Applications Unit
mailto:[EMAIL PROTECTED]
http://morganhillconsulting.hu/ :: Phone+Fax: + 36 1 484 0392

|-Original Message-
|From: Szymon Stasik [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, February 19, 2002 11:15 AM
|To: tomcat-dev
|Subject: mod_webapp contexts and virtual hosts
|
|Since I need to have applications available in root, I was trying confs
|like (I also have to use apache...):
|
|WebAppDeploy app_1 conn  /app_1
|
|with some rewriting but then it seems to be some session/cookie issue :(
|

I've successfully set up a similar environment. I use Apache
mod_rewrite+mod_proxy to do the job. I also had to modify the code in mod_jk
since it sets the session cookie (JSESSIONID) with a path which is
equivalent with the application context name. That's why sessions don't
work.

Since it's a very common set up I simply don't understand why it is
neglected by tomcat-developers. I've sent numerous mails to tomcat-dev, but
was ignored. Again: a transparent integration with Apache (with one vhost
per tomcat webapp approach) is not possible because of tomcat's incorrect
handling of the session cookie.

If you're interested in my solution I'll provide you with more details.

Cheers,
János



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




mod_webapp contexts and virtual hosts

2002-02-19 Thread Szymon Stasik

Hi,


I have configuration like - server.xml:



  
  
   
   
foo2.bar2.com
foo3.bar3.com




   
  


and httpd:conf:


ServerName foo1.bar1.com
WebAppConnection conn1 warp  localhost:8008
WebAppDeploy app_1 conn  /



ServerName foo2.bar2.com
WebAppConnection conn2 warp  localhost:8008
WebAppDeploy app_2 conn  /



ServerName foo3.bar3.com
WebAppConnection conn3 warp  localhost:8008
WebAppDeploy app_3 conn  /



I have also working applications in webapps: app_1, app_2, app_3

now the problem is, that tomcat (4.0.2, with mod_webapp - latest cvs 
snapshot) creates three contexts for each app and also default context 
that is initialised identicaly to the first of the contexts. Now request 
for any webapp (eg http://foo([1-3]).bar$1.com/ :) is routed to the 
default context instead of apriopriate app context :/

Since I need to have applications available in root, I was trying confs 
like (I also have to use apache...):

WebAppDeploy app_1 conn  /app_1

with some rewriting but then it seems to be some session/cookie issue :(

I was also investigating tomcat and mod_webapp sources on the main 
problem but without any particular results. Using mod_webapp and many 
contexts seems to be wery weird.

any ideas?

regards,

Szymon


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




jk2 renaming

2002-02-19 Thread GOMEZ Henri

Work is still in progress for the renaming of
jk2 (native2) calls and vars to jk2_.

Should be achieved tomorrow or on Thursday :)


-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Content-length check

2002-02-19 Thread Philippe Van Der Gucht

[EMAIL PROTECTED] wrote:
> 
> if you are not looking for setting this limit dynamicly, this apache directive
> might solve your problem.
> 
> http://httpd.apache.org/docs/mod/core.html#limitrequestbody

Yes, I knew about this apache directive. :-)

You can imagine that I tested and guess what, the file still gets uploaded.


Philippe.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Content-length check

2002-02-19 Thread victor

if you are not looking for setting this limit dynamicly, this apache directive
might solve your problem.

http://httpd.apache.org/docs/mod/core.html#limitrequestbody



Philippe Van Der Gucht wrote:

> Hello,
>
> I bumped into a problem where I wanted to prevent a file upload from happening.
> The easy way was to insert some code in the connector
> (org.apache.ajp.RequestBase) that checks if the content-length is below a
> configured value.
> If it isn't then that's where my problem begins...
>
> Can I abort this http request?
>
> And if yes what would be a clean way to do this?
>
> I use Apache 1.3.22 + mod_jk 3.3 and tomcat 4.0.2 with the ajp 1.3 connector.
>
> Greetings, Philippe.
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Content-length check

2002-02-19 Thread Philippe Van Der Gucht

Hello,

I bumped into a problem where I wanted to prevent a file upload from happening.
The easy way was to insert some code in the connector
(org.apache.ajp.RequestBase) that checks if the content-length is below a
configured value.
If it isn't then that's where my problem begins...

Can I abort this http request?

And if yes what would be a clean way to do this?

I use Apache 1.3.22 + mod_jk 3.3 and tomcat 4.0.2 with the ajp 1.3 connector.


Greetings, Philippe.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >