FW: Sun J2EE RI, JSP, Include, ErrorPage -- cannot use an errorpage with dinamically included JSPs

2001-04-24 Thread Jarecsni János


Hi!

I have a very unnoying problem. In a J2EE application I use a "master JSP"
as a template for generating predefined screens (the idea is borrowed from
the demo application PetStore). This JSP includes several other JSPs (for
the top, left side, right side, central, bottom positions). What JSPs should
be included for a given view is defined for each screen in a configuration
object. Okay, this is quite simple so far, and what is more, it is working
fine.

The problem arises when one decides to add error handling. If you add the

<%@ page errorPage="errorpage.jsp" %>

directive to an included page, and throw an exception from that page, the
JSP container says that it cannot forward to the errorpage "as OutputStream
or Writer has already been obtained" (throws a
java.lang.IllegalStateException) This happens when you use the 
tag, the one which enables you to use an expression for defining its "page"
attribute. It is essential for us, since we want to say something like the
following in our template.jsp:

" flush="true">
// My Tomcat in J2EE 1.2.1 says "flush="true" is obligatory in JSP 1.0" so
I use it in this form

This line would dinamically include the JSP defined in the actual "screen"
for the topmost area in the template. So this would be fine, but it does not
work.

The whole thing works fine with the

<%@ include file="file.jsp" %>

tag. So this tag does what I really need: it glues all included JSPs
together, parses them, greating one big JSP (one servlet finally), which
uses a common errorpage, so when I throw an exception from one of the
included JSPs, the error page gets called. The only problem is that this tag
does not accept an expression, only a literal string, so you cannot say:

<%@ include file="<%= currentScreen.get("TOP") %>" %>


Rather annoying, isn't it?
I would appreciate any kind of urgent help.

Cheers,
Janos.


PS:
I forgot to mention before, that I tested Sun's PetStore Demo application in
this respect, and it _failed_ also... So JSP error handling does not work
(!) in Sun's demo application, either.




Re: cvscommit:jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resourcesmessages.properties

2001-04-24 Thread Jon Stevens

on 4/24/01 7:58 PM, "horwat" <[EMAIL PROTECTED]> wrote:

> My bad. Flog me.
> 
> Justy

Yea! :-)

-jon




cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet JspServlet.java

2001-04-24 Thread glenn

glenn   01/04/24 21:16:07

  Modified:jasper/src/share/org/apache/jasper/servlet JspServlet.java
  Log:
  Java SecurityManager implementation changes
  ---
  
  Changed the naming convention for JNDI DirContextURL to
  "jndi:/hostname/webappname/" and "jar:jndi:/hostname/webappname/...".
  This works better with java.io.FilePermission.
  
  Modified how permissions are granted to the codeBase for a
  web application so that different permissions can be granted.
  Permissions assigned to the root of a web application apply
  to JSP pages.  Different permissions can be assigned to the
  /WEB-INF/classes/ directory, the /WEB-INF/lib/ directory,
  or even to individual jar files in /WEB-INF/lib/.  This allows
  much finer control of permissions granted within a web
  application.
  
  Fixed Jasper so that it uses the correct codeBase for a
  web application, it had been using the work dir instead
  of the context dir for getting permissions from the
  policy file.
  
  Added more default read FilePermissions for classes
  loaded from within a web application so that getResources()
  works. Added:
  
  "jndi:/hostname/webappname/-"
  "jar:jndi:/hostname/webappname/WEB-INF/lib/-"
  "file:/realcontextpath/-"
  
  Revision  ChangesPath
  1.17  +27 -5 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java
  
  Index: JspServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JspServlet.java   2001/03/21 20:49:20 1.16
  +++ JspServlet.java   2001/04/25 04:16:06 1.17
  @@ -288,20 +288,42 @@
if( policy != null ) {
   try {  
// Get the permissions for the web app context
  - URL url = options.getScratchDir().toURL();
  +String contextDir = context.getRealPath("/");
  +if( contextDir == null )
  +contextDir = options.getScratchDir().toString();
  + URL url = new URL("file:" + contextDir);
codeSource = new CodeSource(url,null);
permissionCollection = policy.getPermissions(codeSource);
// Create a file read permission for web app context directory
  - String contextDir = url.getFile();
  - if( contextDir.endsWith(File.separator) )
  + if (contextDir.endsWith(File.separator))
contextDir = contextDir + "-";
else
contextDir = contextDir + File.separator + "-";
permissionCollection.add( new FilePermission(contextDir,"read") );
// Allow the JSP to access org.apache.jasper.runtime.HttpJspBase
permissionCollection.add( new RuntimePermission(
  - "accessClassInPackage.org.apache.jasper.runtime"
  - ) );
  + "accessClassInPackage.org.apache.jasper.runtime") );
  +if (parentClassLoader instanceof URLClassLoader) {
  +URL [] urls = parentClassLoader.getURLs();
  +String jarUrl = null;
  +String jndiUrl = null;
  +for (int i=0; i


cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources DirContextURLConnection.java

2001-04-24 Thread glenn

glenn   01/04/24 21:15:39

  Modified:catalina/src/share/org/apache/naming/resources
DirContextURLConnection.java
  Log:
  Java SecurityManager implementation changes
  ---
  
  Changed the naming convention for JNDI DirContextURL to
  "jndi:/hostname/webappname/" and "jar:jndi:/hostname/webappname/...".
  This works better with java.io.FilePermission.
  
  Modified how permissions are granted to the codeBase for a
  web application so that different permissions can be granted.
  Permissions assigned to the root of a web application apply
  to JSP pages.  Different permissions can be assigned to the
  /WEB-INF/classes/ directory, the /WEB-INF/lib/ directory,
  or even to individual jar files in /WEB-INF/lib/.  This allows
  much finer control of permissions granted within a web
  application.
  
  Fixed Jasper so that it uses the correct codeBase for a
  web application, it had been using the work dir instead
  of the context dir for getting permissions from the
  policy file.
  
  Added more default read FilePermissions for classes
  loaded from within a web application so that getResources()
  works. Added:
  
  "jndi:/hostname/webappname/-"
  "jar:jndi:/hostname/webappname/WEB-INF/lib/-"
  "file:/realcontextpath/-"
  
  Revision  ChangesPath
  1.7   +7 -6  
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java
  
  Index: DirContextURLConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DirContextURLConnection.java  2001/04/06 19:31:59 1.6
  +++ DirContextURLConnection.java  2001/04/25 04:15:38 1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.6 2001/04/06 19:31:59 remm Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/04/06 19:31:59 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/DirContextURLConnection.java,v
 1.7 2001/04/25 04:15:38 glenn Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/04/25 04:15:38 $
*
* 
*
  @@ -91,7 +91,7 @@
* content is directly returned.
* 
* @author mailto:[EMAIL PROTECTED]";>Remy Maucherat
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
*/
   public class DirContextURLConnection 
   extends URLConnection {
  @@ -179,11 +179,12 @@
   String hostName = proxyDirContext.getHostName();
   String contextName = proxyDirContext.getContextName();
   if (hostName != null) {
  -if (!url.getHost().equalsIgnoreCase(hostName))
  +if (!path.startsWith("/" + hostName + "/"))
   return;
  +path = path.substring(hostName.length()+ 1);
   }
   if (contextName != null) {
  -if (!path.startsWith(contextName)) {
  +if (!path.startsWith(contextName + "/")) {
   return;
   } else {
   path = path.substring(contextName.length());
  
  
  



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

2001-04-24 Thread glenn

glenn   01/04/24 21:15:04

  Modified:catalina/src/share/org/apache/catalina/loader
StandardLoader.java
  Log:
  Java SecurityManager implementation changes
  ---
  
  Changed the naming convention for JNDI DirContextURL to
  "jndi:/hostname/webappname/" and "jar:jndi:/hostname/webappname/...".
  This works better with java.io.FilePermission.
  
  Modified how permissions are granted to the codeBase for a
  web application so that different permissions can be granted.
  Permissions assigned to the root of a web application apply
  to JSP pages.  Different permissions can be assigned to the
  /WEB-INF/classes/ directory, the /WEB-INF/lib/ directory,
  or even to individual jar files in /WEB-INF/lib/.  This allows
  much finer control of permissions granted within a web
  application.
  
  Fixed Jasper so that it uses the correct codeBase for a
  web application, it had been using the work dir instead
  of the context dir for getting permissions from the
  policy file.
  
  Added more default read FilePermissions for classes
  loaded from within a web application so that getResources()
  works. Added:
  
  "jndi:/hostname/webappname/-"
  "jar:jndi:/hostname/webappname/WEB-INF/lib/-"
  "file:/realcontextpath/-"
  
  Revision  ChangesPath
  1.23  +14 -6 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java
  
  Index: StandardLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- StandardLoader.java   2001/04/07 23:08:45 1.22
  +++ StandardLoader.java   2001/04/25 04:15:03 1.23
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
 1.22 2001/04/07 23:08:45 craigmcc Exp $
  - * $Revision: 1.22 $
  - * $Date: 2001/04/07 23:08:45 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
 1.23 2001/04/25 04:15:03 glenn Exp $
  + * $Revision: 1.23 $
  + * $Date: 2001/04/25 04:15:03 $
*
* 
*
  @@ -116,7 +116,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.22 $ $Date: 2001/04/07 23:08:45 $
  + * @version $Revision: 1.23 $ $Date: 2001/04/25 04:15:03 $
*/
   
   public final class StandardLoader
  @@ -621,13 +621,21 @@
   ((Context) container).getServletContext();
try {
URL contextURL = servletContext.getResource("/");
  - if( contextURL != null )
  + if( contextURL != null ) {
((StandardClassLoader)classLoader).setPermissions
   (contextURL);
  +String jarUrl = "jar:" + contextURL.toString() + 
"WEB-INF/lib/";
  +((StandardClassLoader)classLoader).setPermissions
  +(jarUrl);  
  +}
   String contextRoot = servletContext.getRealPath("/");
  -if (contextRoot != null)
  +if (contextRoot != null) {
   ((StandardClassLoader)classLoader).setPermissions
   (contextRoot);
  +String rootUrl = "file:" + contextRoot;
  +((StandardClassLoader)classLoader).setPermissions
  +(rootUrl);
  + }
} catch (MalformedURLException e) {
}
}
  
  
  



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

2001-04-24 Thread glenn

glenn   01/04/24 21:14:47

  Modified:catalina/src/share/org/apache/catalina/loader
StandardClassLoader.java
  Log:
  Java SecurityManager implementation changes
  ---
  
  Changed the naming convention for JNDI DirContextURL to
  "jndi:/hostname/webappname/" and "jar:jndi:/hostname/webappname/...".
  This works better with java.io.FilePermission.
  
  Modified how permissions are granted to the codeBase for a
  web application so that different permissions can be granted.
  Permissions assigned to the root of a web application apply
  to JSP pages.  Different permissions can be assigned to the
  /WEB-INF/classes/ directory, the /WEB-INF/lib/ directory,
  or even to individual jar files in /WEB-INF/lib/.  This allows
  much finer control of permissions granted within a web
  application.
  
  Fixed Jasper so that it uses the correct codeBase for a
  web application, it had been using the work dir instead
  of the context dir for getting permissions from the
  policy file.
  
  Added more default read FilePermissions for classes
  loaded from within a web application so that getResources()
  works. Added:
  
  "jndi:/hostname/webappname/-"
  "jar:jndi:/hostname/webappname/WEB-INF/lib/-"
  "file:/realcontextpath/-"
  
  Revision  ChangesPath
  1.15  +44 -48
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- StandardClassLoader.java  2001/04/21 07:02:20 1.14
  +++ StandardClassLoader.java  2001/04/25 04:14:47 1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.14 2001/04/21 07:02:20 remm Exp $
  - * $Revision: 1.14 $
  - * $Date: 2001/04/21 07:02:20 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
 1.15 2001/04/25 04:14:47 glenn Exp $
  + * $Revision: 1.15 $
  + * $Date: 2001/04/25 04:14:47 $
*
* 
*
  @@ -110,7 +110,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.14 $ $Date: 2001/04/21 07:02:20 $
  + * @version $Revision: 1.15 $ $Date: 2001/04/25 04:14:47 $
*/
   
   public class StandardClassLoader
  @@ -296,18 +296,17 @@
   
   
   /**
  - * The context directory path read FilePermission if this loader
  - * is for a web application context, and this web application is running
  - * from an unpacked directory.
  + * A list of read FilePermission's required if this loader
  + * is for a web application context.
*/
  -private FilePermission rootPermission = null;
  +private ArrayList filePermissionList = new ArrayList();
   
   
   /**
  - * The context directory URL read FilePermission if this loader
  - * is for a web application context.
  + * The PermissionCollection for each CodeSource for a web
  + * application context.
*/
  -private FilePermission urlPermission = null;
  +private HashMap loaderPC = new HashMap();
   
   
   /**
  @@ -317,6 +316,11 @@
   
   
   /**
  + * Flag that the security policy has been refreshed from file.
  + */
  +private boolean policy_refresh = false;
  +
  +/**
* The parent class loader.
*/
   private ClassLoader parent = null;
  @@ -382,47 +386,26 @@
   
   
   /**
  - * If there is a Java SecurityManager, refresh the security
  - * policies from file and set the context security permisions
  - * for the specified context root directory path
  + * If there is a Java SecurityManager create a read FilePermission
  + * for the file directory path.
*
  - * @param path Context directory root directory path
  + * @param path file directory path
*/
   public void setPermissions(String path) {
if( securityManager != null ) {
  -// System.out.println("setPermissionsPath: " + path);
  - String contextDir = path;
  - if( contextDir.endsWith(File.separator) )
  - contextDir = contextDir + "-";
  - else
  - contextDir = contextDir + File.separator + "-";
  - // Refresh the security policies
  - Policy policy = Policy.getPolicy();
  - policy.refresh();
  -rootPermission = new FilePermission(contextDir,"read");
  +filePermissionList.add(new FilePermission(path + "-","read"));
}
   }
   
   
   /**
  - * If there is a Java SecurityManager, refresh the sec

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

2001-04-24 Thread glenn

glenn   01/04/24 21:14:27

  Modified:catalina/src/share/org/apache/catalina/core
ApplicationContext.java
  Log:
  Java SecurityManager implementation changes
  ---
  
  Changed the naming convention for JNDI DirContextURL to
  "jndi:/hostname/webappname/" and "jar:jndi:/hostname/webappname/...".
  This works better with java.io.FilePermission.
  
  Modified how permissions are granted to the codeBase for a
  web application so that different permissions can be granted.
  Permissions assigned to the root of a web application apply
  to JSP pages.  Different permissions can be assigned to the
  /WEB-INF/classes/ directory, the /WEB-INF/lib/ directory,
  or even to individual jar files in /WEB-INF/lib/.  This allows
  much finer control of permissions granted within a web
  application.
  
  Fixed Jasper so that it uses the correct codeBase for a
  web application, it had been using the work dir instead
  of the context dir for getting permissions from the
  policy file.
  
  Added more default read FilePermissions for classes
  loaded from within a web application so that getResources()
  works. Added:
  
  "jndi:/hostname/webappname/-"
  "jar:jndi:/hostname/webappname/WEB-INF/lib/-"
  "file:/realcontextpath/-"
  
  Revision  ChangesPath
  1.20  +6 -6  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
  
  Index: ApplicationContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ApplicationContext.java   2001/04/06 19:31:17 1.19
  +++ ApplicationContext.java   2001/04/25 04:14:26 1.20
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
 1.19 2001/04/06 19:31:17 remm Exp $
  - * $Revision: 1.19 $
  - * $Date: 2001/04/06 19:31:17 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
 1.20 2001/04/25 04:14:26 glenn Exp $
  + * $Revision: 1.20 $
  + * $Date: 2001/04/25 04:14:26 $
*
* 
*
  @@ -111,7 +111,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.19 $ $Date: 2001/04/06 19:31:17 $
  + * @version $Revision: 1.20 $ $Date: 2001/04/25 04:14:26 $
*/
   
   public final class ApplicationContext
  @@ -170,7 +170,7 @@
   }
   
   public Object run() throws Exception {
  -return new URL("jndi", host, 0, path,
  +return new URL("jndi", null, 0, "/" + host + path,
  new DirContextURLStreamHandler(resources));
   }
   
  @@ -536,7 +536,7 @@
throw pe.getException();
}
} else {
  -return new URL("jndi", hostName, 0, fullPath, 
  +return new URL("jndi", null, 0, "/" + hostName + fullPath, 
  new DirContextURLStreamHandler(resources));
}
   } catch (Exception e) {
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/conf catalina.policy

2001-04-24 Thread glenn

glenn   01/04/24 21:14:06

  Modified:catalina/src/conf catalina.policy
  Log:
  Java SecurityManager implementation changes
  ---
  
  Changed the naming convention for JNDI DirContextURL to
  "jndi:/hostname/webappname/" and "jar:jndi:/hostname/webappname/...".
  This works better with java.io.FilePermission.
  
  Modified how permissions are granted to the codeBase for a
  web application so that different permissions can be granted.
  Permissions assigned to the root of a web application apply
  to JSP pages.  Different permissions can be assigned to the
  /WEB-INF/classes/ directory, the /WEB-INF/lib/ directory,
  or even to individual jar files in /WEB-INF/lib/.  This allows
  much finer control of permissions granted within a web
  application.
  
  Fixed Jasper so that it uses the correct codeBase for a
  web application, it had been using the work dir instead
  of the context dir for getting permissions from the
  policy file.
  
  Added more default read FilePermissions for classes
  loaded from within a web application so that getResources()
  works. Added:
  
  "jndi:/hostname/webappname/-"
  "jar:jndi:/hostname/webappname/WEB-INF/lib/-"
  "file:/realcontextpath/-"
  
  Revision  ChangesPath
  1.10  +28 -11jakarta-tomcat-4.0/catalina/src/conf/catalina.policy
  
  Index: catalina.policy
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/catalina.policy,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- catalina.policy   2001/04/11 21:32:50 1.9
  +++ catalina.policy   2001/04/25 04:14:05 1.10
  @@ -8,7 +8,7 @@
   //
   // * Read access to the document root directory
   //
  -// $Id: catalina.policy,v 1.9 2001/04/11 21:32:50 glenn Exp $
  +// $Id: catalina.policy,v 1.10 2001/04/25 04:14:05 glenn Exp $
   // 
   
   
  @@ -113,13 +113,8 @@
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
   
  -// Required for reading resources using JNDI lookup
  -permission java.io.FilePermission "jndi:/-", "read";
  -permission java.io.FilePermission "jar:jndi:/WEB-INF/lib/-", "read";
   // Required for getting BeanInfo
   permission java.lang.RuntimePermission "accessClassInPackage.sun.beans.*";
  -// Requried for sending email
  -permission java.io.FilePermission "${java.home}${/}lib${/}ext${/}mail.jar", 
"read";
   
// Allow read of JAXP compliant XML parser debug
permission java.util.PropertyPermission "jaxp.debug", "read";
  @@ -128,12 +123,34 @@
   
   // You can assign additional permissions to particular web applications by
   // adding additional "grant" entries here, based on the code base for that
  -// application.  For instance, assume that the standard "examples" application
  +// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
  +//
  +// Different permissions can be granted to JSP pages, classes loaded from
  +// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
  +// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
  +//
  +// For instance, assume that the standard "examples" application
   // included a JDBC driver that needed to establish a network connection to the
  -// corresponding database.  You might create a "grant" entry like this:
  +// corresponding database and used the scrape taglib to get the weather from
  +// the NOAA web server.  You might create a "grant" entries like this:
   //
  -// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/-" {
  +// The permissions granted to the context root directory apply to JSP pages.
  +// grant codeBase "file:${catalina.home}/webapps/examples/-" {
   //  permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
  -// }
  -
  +//  permission java.net.SocketPermission "*.noaa.gov:80", "connect";
  +//
  +// };
  +//
  +// The permissions granted to the context WEB-INF/classes directory
  +// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
  +// };
  +//
  +// The permission granted to your JDBC driver
  +// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar" {
  +//  permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
  +// };
  +// The permission granted to the scrape taglib
  +// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar" {
  +//  permission java.net.SocketPermission "*.noaa.gov:80", "connect";
  +// };
   
  
  
  



Tomcat 4 stderr & stdout

2001-04-24 Thread Glenn Nielsen

>From their behaviour, it appears that Tomcat 3.x and Tomcat 4 handle
use of stderr and stdout differently.

Running under unix with either works great for me.

But under windows others I work with have had problems.
When running Tomcat 4 with -security and -djava.security.debug=all,
the security debug output gets dumped to the DOS shell.  Any attempt
to use the DOS redirect to file fails to capture the output.  This
makes it nearly impossible to debug Java SecurityManager security exceptions.

Anyone know the difference between Tomcat 3.x and Tomcat 4 in how they
handle stdout and stderr?  Or have any ideas of how to capture the
output from Tomcat 4 under windows?
 
Thanks,

Glenn

--
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder|
MOREnet System Programming   |  * if iz ina coment.  |
Missouri Research and Education Network  |  */   |
--



cvs commit: jakarta-tomcat-4.0/tester/web/WEB-INF web.xml

2001-04-24 Thread craigmcc

craigmcc01/04/24 20:12:03

  Modified:tester/src/bin tester.xml
   tester/web/WEB-INF web.xml
  Added:   tester/src/tester/org/apache/tester Resources06.java
  Log:
  [PFD2-3.5] Add unit test for ServletContext.getResourcePaths().
  
  Note that this currently fails when the argument is "/" to retrieve the
  top-level directory.  It returns things like "//index.html" instead of
  "/index.html".
  
  Revision  ChangesPath
  1.34  +17 -0 jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- tester.xml2001/04/20 04:37:13 1.33
  +++ tester.xml2001/04/25 03:12:02 1.34
  @@ -537,6 +537,23 @@

request="${context.path}/Resources05?mode=class&path=/org/apache/tester/Unpacked05.txt&stringify=true"
 outContent="Resources05 PASSED"/>
   
  +
  +
  +
  +
  +
  +
  +
  +
 
   
   
  
  
  
  1.1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Resources06.java
  
  Index: Resources06.java
  ===
  /* = *
   *   *
   * The Apache Software License,  Version 1.1 *
   *   *
   * Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.   *
   *   All rights reserved.*
   *   *
   * = *
   *   *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *   *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *notice, this list of conditions and the following disclaimer.  *
   *   *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *notice,  this list of conditions  and the following  disclaimer in the *
   *documentation and/or other materials provided with the distribution.   *
   *   *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *must include the following acknowlegement: *
   *   *
   *   "This product includes  software developed  by the Apache  Software *
   *Foundation ."  *
   *   *
   *Alternately, this acknowlegement may appear in the software itself, if *
   *and wherever such third-party acknowlegements normally appear. *
   *   *
   * 4. The names  "The  Jakarta  Project",  "Tomcat",  and  "Apache  Software *
   *Foundation"  must not be used  to endorse or promote  products derived *
   *from this  software without  prior  written  permission.  For  written *
   *permission, please contact <[EMAIL PROTECTED]>.*
   *   *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *"Apache" appear in their names without prior written permission of the *
   *Apache Software Foundation.*
   *   *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (I

Re: cvs commit:jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resourcesmessages.properties

2001-04-24 Thread horwat

My bad. Flog me. It's a bad habit.

Justy

- Original Message -

> on 4/24/01 5:36 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> >
file://*
> > @@ -131,7 +138,7 @@
> >   * Add a namespace entry for every taglib in the  tag.
> >   */
> >   void addRootNamespaces(String prefix, String uri) {
> > - rootAttrs.addAttribute("", "localname", "xmlns:" + prefix,
"CDATA",
> uri);
> > + rootAttrs.addAttribute("", "xmlns", "xmlns:" + prefix, "CDATA",
uri);
> >   }
> >
>
> I thought that Tomcat wasn't using tabs in the files any longer...
>
> -jon
>
> --
> If you come from a Perl or PHP background, JSP is a way to take
> your pain to new levels. --Anonymous
> 
>




cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler TagBeginGenerator.java

2001-04-24 Thread horwat

horwat  01/04/24 19:52:55

  Modified:jasper/src/share/org/apache/jasper/runtime
JspRuntimeLibrary.java
   jasper/src/share/org/apache/jasper/compiler
TagBeginGenerator.java
  Log:
  Implementation of the following JSP 1.2 PFD2 changes:
  
  JSP.E.1.3 Assigning String literals to Object attribute
- can assign string literals to an attribute or property of type Object
  
  Revision  ChangesPath
  1.6   +5 -3  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
  
  Index: JspRuntimeLibrary.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspRuntimeLibrary.java2001/02/04 01:07:12 1.5
  +++ JspRuntimeLibrary.java2001/04/25 02:52:54 1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
 1.5 2001/02/04 01:07:12 glenn Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/02/04 01:07:12 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
 1.6 2001/04/25 02:52:54 horwat Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/04/25 02:52:54 $
*
* 
* 
  @@ -167,6 +167,8 @@
   return new Long(s);
   } else if ( t.equals(Double.class) || t.equals(Double.TYPE) ) {
   return new Double(s);
  +} else if ( t.equals(Object.class) ) {
  +return new Object[] {s};
   } else if ( t.equals(String.class) ) {
   return s;
   } else if ( t.equals(java.io.File.class) ) {
  
  
  
  1.11  +2 -0  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagBeginGenerator.java
  
  Index: TagBeginGenerator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/TagBeginGenerator.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TagBeginGenerator.java2001/04/20 00:00:59 1.10
  +++ TagBeginGenerator.java2001/04/25 02:52:54 1.11
  @@ -298,6 +298,8 @@
   return Long.valueOf(s).toString() + "l";
   } else if (c == Long.class) {
   return "new Long(" + Long.valueOf(s).toString() + "l)";
  +} else if (c == Object.class) {
  +return "new String(" + s + ")";
} else {
return "(" + c.getName() + 
")JspRuntimeLibrary.getValueFromPropertyEditorManager(" +
  
  
  



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

2001-04-24 Thread craigmcc

craigmcc01/04/24 19:20:49

  Modified:catalina/src/share/org/apache/catalina/core
LocalStrings.properties StandardWrapper.java
  Log:
  [PFD2-2.3.4] "Before the servlet container calls the destroy method, it must
  allow any threads that are currently running in the service method of the
  servlet to complete execution, or exceed a server defined time limit."
  
  Added a check on whether our (single) instance has been allocated, and wait
  for it to be deallocated before calling destroy().
  
  Revision  ChangesPath
  1.31  +2 -0  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/LocalStrings.properties,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- LocalStrings.properties   2001/04/15 10:45:28 1.30
  +++ LocalStrings.properties   2001/04/25 02:20:48 1.31
  @@ -282,6 +282,8 @@
   
   standardWrapper.unloadException=Servlet {0} threw unload() exception
   
  +standardWrapper.unloading=Cannot allocate servlet {0} because it is being unloaded
  +
   http.100=The client may continue ({0}).
   
   http.101=The server is switching protocols according to the "Upgrade" header ({0}).
  
  
  
  1.19  +36 -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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- StandardWrapper.java  2001/04/07 22:33:01 1.18
  +++ StandardWrapper.java  2001/04/25 02:20:48 1.19
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.18 2001/04/07 22:33:01 remm Exp $
  - * $Revision: 1.18 $
  - * $Date: 2001/04/07 22:33:01 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
 1.19 2001/04/25 02:20:48 craigmcc Exp $
  + * $Revision: 1.19 $
  + * $Date: 2001/04/25 02:20:48 $
*
* 
*
  @@ -104,7 +104,7 @@
* make them efficient are counter-productive.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.18 $ $Date: 2001/04/07 22:33:01 $
  + * @version $Revision: 1.19 $ $Date: 2001/04/25 02:20:48 $
*/
   
   public final class StandardWrapper
  @@ -221,6 +221,12 @@
   private boolean singleThreadModel = false;
   
   
  +/**
  + * Are we unloading our servlet instance at the moment?
  + */
  +private boolean unloading = false;
  +
  +
   // - Properties
   
   
  @@ -577,6 +583,11 @@
if (debug >= 1)
log("Allocating an instance");
   
  +// If we are currently unloading this servlet, throw an exception
  +if (unloading)
  +throw new ServletException
  +  (sm.getString("standardWrapper.unloading", getName()));
  +
// Load and initialize our instance if necessary
if (instance == null) {
try {
  @@ -930,6 +941,25 @@
// Nothing to do if we have never loaded the instance
if (instance == null)
return;
  +unloading = true;
  +
  +// Loaf a while if the current instance is allocated
  +if (allocated) {
  +boolean first = true;
  +while (allocated) {
  +if (first) {
  +if (debug >= 1)
  +log("Waiting for instance to be deallocated");
  +first = false;
  +}
  +try {
  +Thread.sleep(1000);
  +} catch (InterruptedException e) {
  +;
  +}
  +}
  +}
  +  
   
// Call the servlet destroy() method
try {
  @@ -943,6 +973,7 @@
  (InstanceEvent.AFTER_DESTROY_EVENT, instance);
instance = null;
fireContainerEvent("unload", this);
  +unloading = false;
throw new ServletException
(sm.getString("standardWrapper.destroyException", getName()),
 t);
  @@ -951,6 +982,7 @@
// Deregister the destroyed instance
instance = null;
   jasperLoader = null;
  +unloading = false;
fireContainerEvent("unload", this);
   
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources web_23.dtd

2001-04-24 Thread craigmcc

craigmcc01/04/24 18:59:09

  Modified:catalina/src/conf web_23.dtd
   jasper/src/share/org/apache/jasper/resources web_23.dtd
  Log:
  [PFD2] Update to the Proposed Final Draft 2 version of the web application
  deployment descriptor (changes in comments only).
  
  Revision  ChangesPath
  1.5   +266 -92   jakarta-tomcat-4.0/catalina/src/conf/web_23.dtd
  
  Index: web_23.dtd
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/web_23.dtd,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- web_23.dtd2001/04/05 19:30:39 1.4
  +++ web_23.dtd2001/04/25 01:59:06 1.5
  @@ -1,3 +1,5 @@
  +
  +
   
   

   
   
   
   
  @@ -26,42 +32,75 @@
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
  @@ -83,7 +122,8 @@
   
   
   
   
   
  @@ -101,7 +141,9 @@
   
   
   
   
   
  @@ -118,7 +160,7 @@
   
   
   
   
  @@ -146,12 +188,17 @@
   
   
   
   
  @@ -182,6 +229,8 @@
   The session-timeout element defines the default session timeout
   interval for all sessions created in this web application. The
   specified timeout must be expressed in a whole number of minutes.
  +If the timeout is 0 or less, the container ensures the default 
  +behaviour of sessions is never to time out.
   -->
   
   
  @@ -265,38 +314,69 @@
   
   
   
   
  -
  -
   
   
   
  -
   
   
   
  -
   
   
   
   
   
   
  @@ -309,26 +389,38 @@
   
   
   
   
   
   
   
   
   
  +
  +
   
   
  @@ -338,8 +430,6 @@
   constraints with one or more web resource collections
   -->
   
  -
  -
   
   
  @@ -391,8 +481,16 @@
   
   
   
   
  @@ -429,7 +527,9 @@
   
   
   
   
  @@ -437,14 +537,17 @@
   
   
   
   
   
   
   
  @@ -493,54 +601,96 @@
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
  -
  +
   
   
   
   
   
  -
   
   
   
   
   
   
   
   
   
   
  @@ -578,15 +752,13 @@
   an enterprise bean's local home. The declaration consists of:
   
- an optional description
  - - the EJB reference name used in the code of the web component
  + - the EJB reference name used in the code of THE_COMPONENT
  that's referencing the enterprise bean
- the expected type of the referenced enterprise bean
- the expected local home and local interfaces of the referenced
  enterprise bean
- optional ejb-link information, used to specify the referenced
  enterprise bean
  -
  -Used by 
   -->
   
   
  
  
  
  1.5   +266 -92   
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/web_23.dtd
  
  Index: web_23.dtd
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources/web_23.dtd,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- web_23.dtd2001/04/05 19:30:40 1.4
  +++ web_23.dtd2001/04/25 01:59:08 1.5
  @@ -1,3 +1,5 @@
  +
  +
   
   

   
   
   
   
  @@ -26,42 +32,75 @@
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
  @@ -83,7 +122,8 @@
   
   
   
   
   
  @@ -101,7 +141,9 @@
   
   
   
   
   
  @@ -118,7 +160,7 @@
   
   
   
   
  @@ -146,12 +188,17 @@
   
   
   
   
  @@ -182,6 +229,8 @@
   The session-timeout element defines the default session timeout
   interval for all sessions created in this web application. The
   specified timeout must be expressed in a whole number of minutes.
  +If the timeout is 0 or less, the container ensures the default 
  +behaviour of sessions is never to time out.
   -->
   
   
  @@ -265,38 +314,69 @@
   
   
   
   
  -
  -
   
   
   
  -
   
   
   
  -
   
   
   
   
   
   
  @@ -309,26 +389,38 @@
   
   
   
   
   
   
   
   
   
  +
  +
   
   
  @@ -338,8 +430,6 @@
   constraints with one or more web resource collections
   -->
   
  -
  -
   
   
  @@ -391,8 +481,16 @@
   
   
   
   
  @@ -429,7 +527,9 @@
   
   
   
   
  @@ -437,14 +537,17 @@
   
   
   
   
   
   
   
  @@ -493,54 +601,96 @@
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
  -
  +
   
   
   
   
   
  -
   
   
   
   
   
   
   
   
   
   
  @@ -578,15 +752,13 @@
   an enterprise bean's local home. The declaration consists of:
   
- an optional description
  - - the EJB reference name used in the code of the web component
  + - the EJB reference name used in the code of THE_COMPONENT
  that's referencing the enterprise bean
- the expected type of the referenced enterprise bean
- the expected local home and local interfaces of the referenced
  enterprise bean
- optional ejb-link information, used to specify the referenced
  enterprise bean
  -
  -Used by 
   -->
   
   
  
  
  



cvs commit: jakarta-tomcat-4.0/tester/web Xerces00.jsp

2001-04-24 Thread craigmcc

craigmcc01/04/24 18:50:04

  Modified:tester/web Xerces00.jsp
  Log:
  [PFD2] Modify to reflect change from  to .
  
  Revision  ChangesPath
  1.2   +1 -1  jakarta-tomcat-4.0/tester/web/Xerces00.jsp
  
  Index: Xerces00.jsp
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/Xerces00.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Xerces00.jsp  2001/03/17 19:48:21 1.1
  +++ Xerces00.jsp  2001/04/25 01:50:04 1.2
  @@ -6,6 +6,6 @@
   http://java.sun.com/products/jsp/dtd/jsp_1_2.dtd";
   >
  +/>
   
   
  
  
  



Re: cvs commit:jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resourcesmessages.properties

2001-04-24 Thread Jon Stevens

on 4/24/01 5:36 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

>  //*
> @@ -131,7 +138,7 @@
>   * Add a namespace entry for every taglib in the  tag.
>   */
>   void addRootNamespaces(String prefix, String uri) {
> - rootAttrs.addAttribute("", "localname", "xmlns:" + prefix, "CDATA",
uri);
> + rootAttrs.addAttribute("", "xmlns", "xmlns:" + prefix, "CDATA", uri);
>   }
>  

I thought that Tomcat wasn't using tabs in the files any longer...

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous





cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/resources messages.properties

2001-04-24 Thread horwat

horwat  01/04/24 17:36:40

  Modified:jasper/src/share/org/apache/jasper/compiler
XmlOutputter.java JspParseEventListener.java
ParserXJspSaxHandler.java
   jasper/src/share/org/apache/jasper/resources
messages.properties
  Log:
  Implementation of the following JSP 1.2 PFD2 changes:
  
  JSP.E.1.2 Version Information Corrections
- new URI for jsp namespace is "http://java.sun.com/JSP/TagLibraryDescriptor";
  
  JSP.E.1.6 XML Syntax Corrections
  
- changed jsp:cdata to jsp:text
- added version attribute to jsp:root
- removed DOCTYPE
  
  Revision  ChangesPath
  1.10  +14 -8 
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java
  
  Index: XmlOutputter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XmlOutputter.java 2001/04/13 21:54:40 1.9
  +++ XmlOutputter.java 2001/04/25 00:36:39 1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
 1.9 2001/04/13 21:54:40 horwat Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/04/13 21:54:40 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
 1.10 2001/04/25 00:36:39 horwat Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/04/25 00:36:39 $
*
* 
*
  @@ -98,12 +98,19 @@
*/
   private int jspRootLevel = 0;
   
  +public static final String JSP_NAMESPACE = 
"http://java.sun.com/JSP/TagLibraryDescriptor";;
  +public static final String JSP_VERSION = "1.2";
  +
  +
   //*
   // Constructor
   
   XmlOutputter() {
sb = new StringBuffer();
rootAttrs = new AttributesImpl();
  +
  +rootAttrs.addAttribute("", "xmlns:jsp", "xmlns:jsp", "CDATA", 
JSP_NAMESPACE);
  +rootAttrs.addAttribute("", "version", "version", "CDATA", JSP_VERSION);
   }
   
   //*
  @@ -131,7 +138,7 @@
* Add a namespace entry for every taglib in the  tag.
*/
void addRootNamespaces(String prefix, String uri) {
  -  rootAttrs.addAttribute("", "localname", "xmlns:" + prefix, "CDATA", uri);
  +  rootAttrs.addAttribute("", "xmlns", "xmlns:" + prefix, "CDATA", uri);
}
   
   
  @@ -226,18 +233,17 @@
   //*
   // Outputting the XML stream
   
  -private static final String PROLOG =
  - "http://java.sun.com/products/jsp/dtd/jspcore_1_2.dtd\";>\n";
  -
   PageData getPageData() {
StringBuffer buff = new StringBuffer();
  +AttributesImpl attrs = new AttributesImpl();
   
  -buff.append(PROLOG);
  +
   append("jsp:root", rootAttrs, buff);
buff.append(sb.toString());
   buff.append("");
InputStream is = 
new ByteArrayInputStream(buff.toString().getBytes());
  +//System.out.println("XmlOutputter: \n" + buff);
PageData pageData = new PageDataImpl(is);
   return pageData;
   }
  
  
  
  1.26  +4 -4  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- JspParseEventListener.java2001/04/13 21:51:33 1.25
  +++ JspParseEventListener.java2001/04/25 00:36:39 1.26
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.25 2001/04/13 21:51:33 horwat Exp $
  - * $Revision: 1.25 $
  - * $Date: 2001/04/13 21:51:33 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
 1.26 2001/04/25 00:36:39 horwat Exp $
  + * $Revision: 1.26 $
  + * $Date: 2001/04/25 00:36:39 $
*
* 
*
  @@ -1103,7 +1103,7 @@
   {
if (data != null) {
handleCharData(start, stop, data);
  -xo.append("jsp:cdata", null, data);
  +xo.append("jsp:text", null, data);
}
   }
   
  
  
  
  1.9   +1 -1  
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/ParserXJspSaxHandler.java
  
 

Re: Q: Future of Filter?

2001-04-24 Thread Craig R. McClanahan



On Tue, 24 Apr 2001, Bob Jamison wrote:

> Hey, all, I have a minor question about TC4, if anyone knows,
> cool, if not, oh, well.;-)
> 
> (Actually, I am probably just overlooking something obvious)
> 
> In the public drafts of 2.3 and in the Tomcat examples, I have
> seen various specifications of Filter.  Is the spec going to
> move toward Tomcat (since it is the testbed impl) or will Tomcat's
> impl change?
> 
> For example, currently in the examples, it is defined as having 3 methods:
> 
> public void init(FilterConfig config);
> public void doFilter(ServletRequest req,ServletResponse resp,FilterChain 
> chain);
> public void destroy();
> 
> 
> While in the final draft it is:
> 
> public void FilterConfig getFilterConfig();
> public void setFilterConfig(FilterConfig config);
> public void doFilter(ServletRequest req,ServletResponse resp,FilterChain 
> chain);
> 
> 
> They are identical in function, except for destroy().
> I can see some benefit in keeping destroy(),  since the Filter might
> have allocated a lot of resources, (such as an XSLT transformer), but the
> other differences  seem to be merely preference.
> 
> Just wondering, as I am still becoming acquainted with the new stuff in 2.3.
> 
> 
> 
> Bob
> 
> 

In "Proposed Final Draft 2" (coming soon) you will see that init() and
destroy() are the final answer.  This change was approved by the JSR-053
expert group after the "Proposed Final Draft" version was published, and
Tomcat was changed at that time.

There will be a few more minor changes in Tomcat 4.0 (not API related) to
reflect other clarifications that will be in PFD2.

Craig McClanahan





J2EE in ATG

2001-04-24 Thread chang su

Hi,

I need to decide within the next few days whether to
use J2EE standards with ATG or use the ATG proprietary
technologies.

Does anyone have enough experience with JSPs and
Servlets within ATG to recommend their use?

Has anyone tried to use EJBs in ATG and would you
recommend using EJBs in ATG?

Is there anybody out there that has used J2EE in ATG
in a production environment?

Thanks,

Chang 

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



An issue with specifying IP address

2001-04-24 Thread Ajit Bhingarkar

Hi,

This issue may have been addressed earlier, but I could 
find any reference in tomcat user documentation or
deployment guidelines.

We are using tomcat (3.2.1) in stand alone mode to run the
configuration webn gui for our product. When a remote
client connects to the configuration server (tomcat)
using machine name of the server, user session gets
created successfully but instead if one types in the 
IP address of the server machine, somehow session 
is not initialized correctly.

Has anyone reported similar issue ?

Any feedback/work around on this would be greatly appreciated.

Thanks,
Ajit



Tomcat 3.2.2b2 : bug reading web.xml (jsp are forgotten !)

2001-04-24 Thread Samuel ARNOD-PRIN

Hello,

I've discovered a very strange bug...

I've got a few servlets.
Each of these must serve on type of extension

One of them must server a few extensions (xml, html, jsp, xsp, ...)

I've looked in tomcat source code to discover from where the bug comes.

In my web.xml, I've got theses lines :

... servlet s1 ... *.jsp 
then
s1  *.html
s1  *.xml
s1  *.xsp
s1  *.soon..

s2 ... *.login
s3 ... *.logout
s4  *.sgif


What did happen ?? Then my jsp files were served by the default
JspServlet ..
and why then ??

I put a flag into the method :

Container matchExtension( Request req )
from the class org.apache.tomcat.request.SimpleMapper1

my flag was to print the extM org.apache.tomcat.util.SimpleHashtable to
see what there was in..
well when .jsp is added, it shows jsp as key and my servlet s1 as
value...

but after html
I've got twice jsp keys !!!
and the most terrible at the last (sgif), my 2 jsp keys' values are :
JspServlet !!!

how strange !!!
a hashtable even simple should never had the same keys twice !!
and then the value of these keys are changed !!!
unfortunately I did not know who changed the hashtable values !!

I put a flag into SimpleHashtable.put but nothing happened there !!

Well, I hope you understood my english.. if you need I can send you my
web.xml file



Re: Tomcat 3.2.2 patches

2001-04-24 Thread cmanolache

On Tue, 24 Apr 2001, Marc Saegesser wrote:

> Costin, Henri,
> 
> You both asked about some simple patches for Tomcat 3.2.2.  There will be
> another (hopefully the last) beta release for 3.2.2, so go ahead and commit
> those changes.

Thanks.


> I'm working a bug in Jasper that will certainly require some soak time to
> make sure nothing else gets broken.  JspServlet.java is an excellent example
> of how *NOT* to write multithreaded Java code.  In fact I'm tempted to start
> using it as an interview pre-test.  Anyone who can't find at least 3 (I
> think there are at least 5) synchronization problems doesn't even get
> brought in for an interview.

Yes, that's why we need a major refactoring of jasper... 

Costin






Re: Future of Filter?

2001-04-24 Thread Amy Roh

Servlet spec 2.3 has changed to support init(FilterConfig config) and
destroy() methods instead of getFilterConfig() and
setFilterConfig(FilterConfig config) after discussion to change filter cycle
to be similar to the servlet life cycle in the expert group.  The recent
changes will be reflected in the new Proposed Final Draft 2 (which will be
available to public very soon).  So TC4 is up to date with the recent spec.
:-)

Amy

- Original Message -
From: "Bob Jamison" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 24, 2001 9:10 AM
Subject: Q: Future of Filter?


> Hey, all, I have a minor question about TC4, if anyone knows,
> cool, if not, oh, well.;-)
>
> (Actually, I am probably just overlooking something obvious)
>
> In the public drafts of 2.3 and in the Tomcat examples, I have
> seen various specifications of Filter.  Is the spec going to
> move toward Tomcat (since it is the testbed impl) or will Tomcat's
> impl change?
>
> For example, currently in the examples, it is defined as having 3 methods:
>
> public void init(FilterConfig config);
> public void doFilter(ServletRequest req,ServletResponse resp,FilterChain
> chain);
> public void destroy();
>
>
> While in the final draft it is:
>
> public void FilterConfig getFilterConfig();
> public void setFilterConfig(FilterConfig config);
> public void doFilter(ServletRequest req,ServletResponse resp,FilterChain
> chain);
>
>
> They are identical in function, except for destroy().
> I can see some benefit in keeping destroy(),  since the Filter might
> have allocated a lot of resources, (such as an XSLT transformer), but the
> other differences  seem to be merely preference.
>
> Just wondering, as I am still becoming acquainted with the new stuff in
2.3.
>
>
>
> Bob
>




Re: Future of Filter?

2001-04-24 Thread Amy Roh

Servlet spec 2.3 has changed to support init(FilterConfig config) and
destroy() methods instead of getFilterConfig() and
setFilterConfig(FilterConfig config) after discussion to change filter cycle
to be similar to the servlet life cycle in the expert group.  The recent
changes will be reflected in the new Proposed Final Draft 2 (which will be
available to public very soon).  So TC4 is up to date with the recent spec.
:-)

Amy

- Original Message -
From: "Bob Jamison" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 24, 2001 9:10 AM
Subject: Q: Future of Filter?


> Hey, all, I have a minor question about TC4, if anyone knows,
> cool, if not, oh, well.;-)
>
> (Actually, I am probably just overlooking something obvious)
>
> In the public drafts of 2.3 and in the Tomcat examples, I have
> seen various specifications of Filter.  Is the spec going to
> move toward Tomcat (since it is the testbed impl) or will Tomcat's
> impl change?
>
> For example, currently in the examples, it is defined as having 3 methods:
>
> public void init(FilterConfig config);
> public void doFilter(ServletRequest req,ServletResponse resp,FilterChain
> chain);
> public void destroy();
>
>
> While in the final draft it is:
>
> public void FilterConfig getFilterConfig();
> public void setFilterConfig(FilterConfig config);
> public void doFilter(ServletRequest req,ServletResponse resp,FilterChain
> chain);
>
>
> They are identical in function, except for destroy().
> I can see some benefit in keeping destroy(),  since the Filter might
> have allocated a lot of resources, (such as an XSLT transformer), but the
> other differences  seem to be merely preference.
>
> Just wondering, as I am still becoming acquainted with the new stuff in
2.3.
>
>
>
> Bob
>




RE: what is the deal with tomcat 4 and web server connectors??

2001-04-24 Thread GOMEZ Henri

>I think those pieces are very valuable - and instead of 
>implementing the
>AJP13 ( and future 14 ) it would be much better to extract the full
>implementation and make it independent of tomcat3.3

+1

>That would allow to also build a tomcat3.2 adapter ( since 
>most people are
>using 3.2 right now - and changing a production site is a slow process
>).

It will give also to TC 3.2 users a more stable mod_jk and ajp12/ajp13.
Some fixes couldn't be include in mod_jk code for TC 3.2 and would be
here since 3.2.x serie will be updated only for easy bugs fixes, those
without any refactor. 

For example, mod_jk in 3.3 fixe the problem when you restart Tomcat
and use ajp13. In mod_jk for 3.2, you'll need to restart Apache, no
more needed in 3.3.

And that's a mad situation since connectors code which is mainly
native code, could be common to Tomcat Servlet Engines (3.2/3.3).

> Tomcat4 is supposed to be more flexible than 3.x :-) - so 
>creating an
>adapter should be easy ( well, I don't understand most of the 
>4.0 design,
>but I was able to build a prototype adapter - and get ajp13 
>support into
>4.0. Unfortunately my head exploded due to class loading 
>problems - but it
>can be done ).
>
>So what I would do ( or I'll do :-) is start with a new package, taking
> MessageBytes, MimeHeaders, subset of Request/Response, add an adapter
>interface ( tc3.1 used to have one - but it had a bad design - 
>I can say
>that since I did it ) using a notification model ( for example a
>AdapterListener that will allow the adapter to plug to upper layers )

+1

>Then create interceptors/valves for 3.2, 3.3, 4.0 ( maybe:-) 
>and plug it in.

Yep, get the merge the great ideas of all Tomcat projects 3.2/3.3/4.0

>Of course, this is just an idea - there are many details to 
>discuss ( and other, better ideas - I'm sure of that :-). 

Discussion is open, and it's a good point

>On Tue, 24 Apr 2001, Dan Milstein wrote:
>
>> One thing which I think would be useful (which I wanted to 
>do myself, but
>> don't think I'll have time to do), would be to write an 
>ajp13 connector for
>> TC 4.  This would allow TC 4 users to use mod_jk as their 
>plugin (which
>> supports iPlanet and IIS).  If you are interested in doing 
>some development,
>> I think that would be an excellent contribution.
>> 
>> Steps:
>> 
>>  - Take a look through the Ajp13 doc in the 3.3 branch 
>(src/doc/AJPv13.html)
>> -- this explains how the protocol works.  
>> 
>>  - Review the ajp13 connector code in 3.3
>> (share/org/apache/tomcat/modules/server/Ajp13.java and
>> Ajp13Interceptor.java).
>> 
>>  - Adapt that code to the TC 4 codebase (basing on HttpConnector, or
>> WarpConnector, possibly).
>> 
>> Wins: connect to multiple servers (including netscape and iis), load
>> balancing, debugged C code.
>> 
>> Losses: painful to configure
>> 
>> Although I don't have time to write this code myself, I can 
>contribute some
>> help (I understand the 3.3 ajp13 code pretty thoroughly).
>> 
>> -Dan
>> 
>> > Kevin Seguin wrote:
>> > 
>> > i want to move from tomcat 3.x to tomcat 4.  i absolutely 
>must be able to
>> > use tomcat 4 with netscape/iplanet and microsoft (iis) web 
>servers.  as
>> > near as i can tell, the only connector that will be 
>available in the
>> > foreseeable future is for apache 1.3.  is this true?
>> > 
>> > i have come across very little (almost no) information 
>regarding this new
>> > webapp lib (which appears to be undergoing some significant change
>> > recently) and the warp thing...  does *anybody* have 
>anything to share??
>> > i'm willing to help out with connector development, or 
>even write my own
>> > connectors...  if i could only figure out where to start...
>> 
>> 
>



RE: [PATCH] mod_jk timestamp and process id logging

2001-04-24 Thread GOMEZ Henri

Nothing is simple when you want to have 
C code for multiples OS :)

That's why APR was developped ...

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



>-Original Message-
>From: Pogo Com [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 24, 2001 7:13 PM
>To: GOMEZ Henri; [EMAIL PROTECTED]
>Subject: RE: [PATCH] mod_jk timestamp and process id logging
>
>
>This is starting to sound complicated.  I'd say go with the 
>getpid(), since it
>covers a major case and is pretty portable and simple.
>
>Bill
>
>
>--- GOMEZ Henri <[EMAIL PROTECTED]> wrote:
>> Depend the OS:
>> 
>> AS/400 =>
>> 
>> int GetThreadId()
>> {
>>  pthread_t   lSelf = pthread_self();
>>  pthread_id_np_t lTid;
>> 
>>  pthread_getunique_np(&lSelf, &lTid);
>>  return (lTid.intId.lo);
>> }
>> 
>> Linux =>
>> 
>> int GetThreadId()
>> {
>>  return (pthread_self());
>> }
>> 
>> What about others platforms like AIX/HPUX/Windows
>
>
>__
>Do You Yahoo!?
>Yahoo! Auctions - buy the things you want at great prices
>http://auctions.yahoo.com/
>



RE: Tomcat 3.2.2 patches

2001-04-24 Thread GOMEZ Henri

I'll commit later the latest mod_jk patches but only
those which could be under the 3.2.2 mod_jk.

(I couldn't add the fix for tomcat restart case for example) 

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



>-Original Message-
>From: Marc Saegesser [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 24, 2001 11:40 PM
>To: [EMAIL PROTECTED]
>Subject: Tomcat 3.2.2 patches
>
>
>Costin, Henri,
>
>You both asked about some simple patches for Tomcat 3.2.2.  
>There will be
>another (hopefully the last) beta release for 3.2.2, so go 
>ahead and commit
>those changes.
>
>I'm working a bug in Jasper that will certainly require some 
>soak time to
>make sure nothing else gets broken.  JspServlet.java is an 
>excellent example
>of how *NOT* to write multithreaded Java code.  In fact I'm 
>tempted to start
>using it as an interview pre-test.  Anyone who can't find at least 3 (I
>think there are at least 5) synchronization problems doesn't even get
>brought in for an interview.
>



Tomcat 3.2.2 patches

2001-04-24 Thread Marc Saegesser

Costin, Henri,

You both asked about some simple patches for Tomcat 3.2.2.  There will be
another (hopefully the last) beta release for 3.2.2, so go ahead and commit
those changes.

I'm working a bug in Jasper that will certainly require some soak time to
make sure nothing else gets broken.  JspServlet.java is an excellent example
of how *NOT* to write multithreaded Java code.  In fact I'm tempted to start
using it as an interview pre-test.  Anyone who can't find at least 3 (I
think there are at least 5) synchronization problems doesn't even get
brought in for an interview.




RE: [Patch] Tomcat 3.2.2

2001-04-24 Thread GOMEZ Henri

Commited to 3.3 branch.

What about 3.2 branch Marc ?

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



>-Original Message-
>From: William A. Rowe, Jr. [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 24, 2001 6:47 AM
>To: [EMAIL PROTECTED]
>Subject: [Patch] Tomcat 3.2.2
>
>
>Gentlefolk,
>
>  on the Apache side we ran into a headache on Win2K.  Windows 
>services introduced
>a SHUTDOWN event with a new signal.  Unfortuantely, they did 
>_not_ continue to
>support the STOP event from NT.  This patch teaches the 
>jk_nt_service to solicit
>and respect the SHUTDOWN event as well as the old STOP event.
>
>Your,
>
>Bill
>
>Index: src/native/mod_jk/nt_service/jk_nt_service.c
>===
>RCS file: 
>/home/cvspublic/jakarta-tomcat/src/native/mod_jk/nt_service/jk_
>nt_service.c,v
>retrieving revision 1.2
>diff -u -r1.2 jk_nt_service.c
>--- src/native/mod_jk/nt_service/jk_nt_service.c 2000/11/19 
>04:15:13 1.2
>+++ src/native/mod_jk/nt_service/jk_nt_service.c 2001/04/24 04:33:25
>@@ -248,6 +248,7 @@
> /*
>  * Stop the service.
>  */
>+case SERVICE_CONTROL_SHUTDOWN:
> case SERVICE_CONTROL_STOP:
> ssStatus.dwCurrentState = SERVICE_STOP_PENDING;
> stop_jk_service();
>@@ -281,7 +282,8 @@
> if(dwCurrentState == SERVICE_START_PENDING) {
> ssStatus.dwControlsAccepted = 0;
> } else {
>-ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
>+ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP 
>+| SERVICE_ACCEPT_SHUTDOWN;
> }
> 
> ssStatus.dwCurrentState = dwCurrentState;
>
>



RE: ServerSocket not being closed properly.

2001-04-24 Thread GOMEZ Henri

>I think you have a lucky VM/OS - close() on the accepting 
>socket doesn't
>stop the accept() thread ( at least not on Linux/JDK1.3 ). 

That's right on Linux Redhat 6.2 and glibc 2.1.x and IBM JDK 1.3.

But it seems to work fine on Redhat 7.0 which use a glibc 2.2.

But the fundamental step for the Linux community is kernel 2.4
found for example in Redhat 7.1, and I consider that Redhat 7.0
is just an interim release.






RE: ServerSocket not being closed properly.

2001-04-24 Thread Brad Cox

At 12:49 PM -0700 04/24/2001, [EMAIL PROTECTED] wrote:
>Yes, but I can hardly find time for one. I would love to work on both -
>but so far I coulnd't find  people to help on the /admin, and I'll
>not start it alone.
>( well, Larry and few others helped a lot - but he seems to have even less
>free time than I have ).
>
>  > >Fact is - we do improve - and that's what matters ( for me ). I don't
>>  >think anyone claims the first versions of apache were easy to install ( or
>>  >even the latest ).
>>
>>  Indeed! And thanks for listening!
>
>Well, thanks for the feedback - and even more thanks if that leads to some
>code contributions.

That's what I had in mind for the gui. Gotta stay focused on my app 
for now but this should be done real soon now. ;)


-- 
---
Brad Cox, Ph.D.; [EMAIL PROTECTED]
Phone: 703 361 4751 Cell: 703 919-9623
http://virtualschool.edu



cvs commit: jakarta-tomcat-4.0/connectors/lib Makefile.in

2001-04-24 Thread pier

pier01/04/24 13:22:15

  Modified:connectors/lib Makefile.in
  Log:
  Damn makefiles with TABS
  
  Revision  ChangesPath
  1.3   +6 -6  jakarta-tomcat-4.0/connectors/lib/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/lib/Makefile.in,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.in   2001/04/24 20:20:33 1.2
  +++ Makefile.in   2001/04/24 20:22:14 1.3
  @@ -56,7 +56,7 @@
   # = #
   
   # @author  Pier Fumagalli 
  -# @version $Id: Makefile.in,v 1.2 2001/04/24 20:20:33 pier Exp $
  +# @version $Id: Makefile.in,v 1.3 2001/04/24 20:22:14 pier Exp $
   
   include ../Makedefs
   
  @@ -67,10 +67,10 @@
   all: $(LIB)
   
   $(LIB): $(OBJS)
  -@echo - Linking library $(LIB)
  -@$(AR) -cr $(LIB) $(OBJS)
  -@$(RANLIB) $(LIB)
  + @echo - Linking library $(LIB)
  + @$(AR) -cr $(LIB) $(OBJS)
  + @$(RANLIB) $(LIB)
   
   clean:
  -@echo Removing object files $(OBJS) $(LIB)
  -@rm -f $(OBJS) $(LIB)
  + @echo Removing object files $(OBJS) $(LIB)
  + @rm -f $(OBJS) $(LIB)
  
  
  



cvs commit: jakarta-tomcat-4.0/connectors/lib Makefile.in wa_general.c wa_request.c

2001-04-24 Thread pier

pier01/04/24 13:20:33

  Modified:connectors/lib Makefile.in wa_general.c wa_request.c
  Log:
  Formatted source code
  
  Revision  ChangesPath
  1.2   +6 -6  jakarta-tomcat-4.0/connectors/lib/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/lib/Makefile.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.in   2001/04/17 13:14:50 1.1
  +++ Makefile.in   2001/04/24 20:20:33 1.2
  @@ -56,7 +56,7 @@
   # = #
   
   # @author  Pier Fumagalli 
  -# @version $Id: Makefile.in,v 1.1 2001/04/17 13:14:50 pier Exp $
  +# @version $Id: Makefile.in,v 1.2 2001/04/24 20:20:33 pier Exp $
   
   include ../Makedefs
   
  @@ -67,10 +67,10 @@
   all: $(LIB)
   
   $(LIB): $(OBJS)
  - @echo - Linking library $(LIB)
  - @$(AR) -cr $(LIB) $(OBJS)
  - @$(RANLIB) $(LIB)
  +@echo - Linking library $(LIB)
  +@$(AR) -cr $(LIB) $(OBJS)
  +@$(RANLIB) $(LIB)
   
   clean:
  - @echo Removing object files $(OBJS) $(LIB)
  - @rm -f $(OBJS) $(LIB)
  +@echo Removing object files $(OBJS) $(LIB)
  +@rm -f $(OBJS) $(LIB)
  
  
  
  1.2   +57 -57jakarta-tomcat-4.0/connectors/lib/wa_general.c
  
  Index: wa_general.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/lib/wa_general.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wa_general.c  2001/04/17 13:14:51 1.1
  +++ wa_general.c  2001/04/24 20:20:33 1.2
  @@ -55,7 +55,7 @@
*   *
* = */
   
  -/* @version $Id: wa_general.c,v 1.1 2001/04/17 13:14:51 pier Exp $ */
  +/* @version $Id: wa_general.c,v 1.2 2001/04/24 20:20:33 pier Exp $ */
   #include 
   
   /* The current APR memory pool. */
  @@ -63,48 +63,48 @@
   
   /* Initialize the WebApp Library. */
   const char *wa_init(void) {
  - if (pool==NULL) {
  - if (apr_initialize()!=APR_SUCCESS)
  - return("Cannot initialize APR");
  - if (apr_pool_create(&pool,NULL)!=APR_SUCCESS)
  - return("Cannot create WebApp Library memory pool");
  - if (pool==NULL)
  - return("Invalid WebApp Library memory pool created");
  - }
  - return(NULL);
  +if (pool==NULL) {
  +if (apr_initialize()!=APR_SUCCESS)
  +return("Cannot initialize APR");
  +if (apr_pool_create(&pool,NULL)!=APR_SUCCESS)
  +return("Cannot create WebApp Library memory pool");
  +if (pool==NULL)
  +return("Invalid WebApp Library memory pool created");
  +}
  +return(NULL);
   }
   
   /* Clean up the WebApp Library. */
   const char *wa_destroy(void) {
  - if (pool==NULL) return("WebApp Library not initialized");
  - apr_pool_destroy(pool);
  - pool=NULL;
  - apr_terminate();
  - return(NULL);
  +if (pool==NULL) return("WebApp Library not initialized");
  +apr_pool_destroy(pool);
  +pool=NULL;
  +apr_terminate();
  +return(NULL);
   }
   
   /* Allocate and setup a connection */
   const char *wa_connect(wa_connection **c, const char *p, const char *a) {
  - wa_connection *conn=NULL;
  - const char *msg=NULL;
  +wa_connection *conn=NULL;
  +const char *msg=NULL;
   
  - /* Check parameters */
  - if (c==NULL) return("Invalid storage location specified");
  +/* Check parameters */
  +if (c==NULL) return("Invalid storage location specified");
   
  - /* Allocate some memory */
  - conn=(wa_connection *)apr_palloc(pool,sizeof(wa_connection));
  - if (conn==NULL) return("Cannot allocate memory");
  - conn->pool=pool;
  - 
  - /* Retrieve the provider and set up the conection */
  - conn->conf=NULL;
  - // if ((conn->prov=wa_provider_get(p))==NULL)
  - //  return("Invalid provider name specified");
  - // if ((msg=conn->prov->configure(conn,a))!=NULL) return(msg);
  -
  - /* Done! :) */
  - *c=conn;
  - return(NULL);
  +/* Allocate some memory */
  +conn=(wa_connection *)apr_palloc(pool,sizeof(wa_connection));
  +if (conn==NULL) return("Cannot allocate memory");
  +conn->pool=pool;
  +
  +/* Retrieve the provider and set up the conection */
  +conn->conf=NULL;
  +// if ((conn->prov=wa_provider_get(p))==NULL)
  +//  return("Invalid provider name specified");
  +// if ((msg=conn->prov->configure(conn,a))!=NULL) return(msg);
  +
  +/* Done! :) */
  +*c=conn;
  +return(NULL);
   }
   
   /* Allocate, set up and deploy an application. */
  @@ -114,

cvs commit: jakarta-tomcat-4.0/connectors/scandoc template.pl

2001-04-24 Thread pier

pier01/04/24 13:19:58

  Modified:connectors/scandoc template.pl
  Log:
  Formatted template code
  
  Revision  ChangesPath
  1.4   +94 -94jakarta-tomcat-4.0/connectors/scandoc/template.pl
  
  Index: template.pl
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/scandoc/template.pl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- template.pl   2001/04/24 20:16:12 1.3
  +++ template.pl   2001/04/24 20:19:58 1.4
  @@ -130,7 +130,7 @@
 
   <<
   
  - # Generate a list of classes included in this package
  +# Generate a list of classes included in this package
   foreach $e ($p->classes()) {
   $_ = $e->url;
   s/\s/_/g;
  @@ -147,7 +147,7 @@
   <<
   }
   
  - # Generate a list of all global functions included in this package
  +# Generate a list of all global functions included in this package
   if ($p->globalfuncs()) {
   >>
 
  @@ -185,7 +185,7 @@
   <<
   }
   
  - # Generate a list of all global variables included in this package
  +# Generate a list of all global variables included in this package
   if ($p->globalvars()) {
   >>
 
  @@ -223,7 +223,7 @@
   <<
   }
   
  - # Copyright statement at the bottom
  +# Copyright statement at the bottom
   >>
   
   
  @@ -285,7 +285,7 @@
 
   <<
   
  - # Generate a TOC of all classes at the top of the page
  +# Generate a TOC of all classes at the top of the page
   foreach $e ($p->classes()) {
   $_ = $e->url;
   s/\s/_/g;
  @@ -321,7 +321,7 @@
   <<
   }
   
  - # Continue with the global functions TOC
  +# Continue with the global functions TOC
   if ($p->globalfuncs()) {
   >>
   
  @@ -351,7 +351,7 @@
   }
   }
   
  - # And then finish with the global variables TOC
  +# And then finish with the global variables TOC
   if ($p->globalvars()) {
   >>
   
  @@ -386,7 +386,7 @@
   
   <<
   
  - # Then generate the detail for each class in this package
  +# Then generate the detail for each class in this package
   foreach $e ($p->classes()) {
   $_ = $e->url;
   s/\s/_/g;
  @@ -442,13 +442,13 @@
   
   <<
   foreach $m ($e->memberfuncs()) {
  - $_ = join("-",$e->name,$m->name);
  - s/\s/_/g;
  - y/[A-Z]/[a-z]/;
  - >>
  - 
  - <<
  - &function($m);
  +$_ = join("-",$e->name,$m->name);
  +s/\s/_/g;
  +y/[A-Z]/[a-z]/;
  +>>
  +
  +<<
  +&function($m);
   }
   }
   
  @@ -466,18 +466,18 @@
   
   <<
   foreach $m ($e->membervars()) {
  - $_ = join("-",$e->name,$m->name);
  - s/\s/_/g;
  - y/[A-Z]/[a-z]/;
  - >>
  - 
  - <<
  - &variable($m);
  +$_ = join("-",$e->name,$m->name);
  +s/\s/_/g;
  +y/[A-Z]/[a-z]/;
  +>>
  +
  +<<
  +&variable($m);
   }
   }
   }
   
  - # Output detailed information for each global function
  +# Output detailed information for each global function
   if ($p->globalfuncs()) {
   >>
   
  @@ -494,14 +494,14 @@
   $_ = $e->name;
   s/\s/_/g;
   y/[A-Z]/[a-z]/;
  - >>
  - 
  - <<
  - &function($e);
  +>>
  +
  +<<
  +&function($e);
   }
   }
   
  - # Then write detailed information for each global variable
  +# Then write detailed information for each global variable
   if ($p->globalvars()) {
   >>
   
  @@ -518,9 +518,9 @@
   $_ = $e->name;
   s/\s/_/g;
   y/[A-Z]/[a-z]/;
  - >>
  - 
  - <<
  +>>
  +
  +<<
   &variable($e);
   }
   }
  @@ -541,9 +541,9 @@
   
   # Write out the detailed description of a function
   sub function {
  - local ($m) = @_;
  +local ($m) = @_;
   
  - # Output the function name and description
  +# Output the function name and description
   >>
   
 $(m.name)
  @@ -558,66 +558,66 @@
 

cvs commit: jakarta-tomcat-4.0/connectors/include wa_general.h

2001-04-24 Thread pier

pier01/04/24 13:18:00

  Modified:connectors/include wa_general.h
  Log:
  Renamed package name ("General" doesn't work with ScanDoc)
  
  Revision  ChangesPath
  1.3   +2 -7  jakarta-tomcat-4.0/connectors/include/wa_general.h
  
  Index: wa_general.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/include/wa_general.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- wa_general.h  2001/04/24 16:30:24 1.2
  +++ wa_general.h  2001/04/24 20:18:00 1.3
  @@ -56,17 +56,12 @@
* = */
   
   /**
  - * @package General
  + * @package Main
* @author  Pier Fumagalli 
  - * @version $Id: wa_general.h,v 1.2 2001/04/24 16:30:24 pier Exp $
  + * @version $Id: wa_general.h,v 1.3 2001/04/24 20:18:00 pier Exp $
*/
   #ifndef _WA_GENERAL_H_
   #define _WA_GENERAL_H_
  -
  -/**
  - * A freakin' int.
  - */
  -extern int errno;
   
   /**
* The WebApp Library connection structure.
  
  
  



cvs commit: jakarta-tomcat-4.0/connectors/scandoc template.pl

2001-04-24 Thread pier

pier01/04/24 13:16:12

  Modified:connectors/scandoc template.pl
  Log:
  Latest modification to ScanDOC template (boooring)
  
  Revision  ChangesPath
  1.3   +252 -59   jakarta-tomcat-4.0/connectors/scandoc/template.pl
  
  Index: template.pl
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/scandoc/template.pl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- template.pl   2001/04/24 16:28:39 1.2
  +++ template.pl   2001/04/24 20:16:12 1.3
  @@ -66,8 +66,6 @@
 
   <<
   
  -## For each package, generate an index entry.
  -
   foreach $p (packages()) {
   $_ = $p->url;
   s/\s/_/g;
  @@ -100,6 +98,7 @@
   ###
   # Generate the packages table of content for each package #
   ###
  +
   foreach $p (packages()) {
   $_ = $p->url;
   s/\s/_/g;
  @@ -130,6 +129,8 @@
   
 
   <<
  +
  + # Generate a list of classes included in this package
   foreach $e ($p->classes()) {
   $_ = $e->url;
   s/\s/_/g;
  @@ -146,6 +147,7 @@
   <<
   }
   
  + # Generate a list of all global functions included in this package
   if ($p->globalfuncs()) {
   >>
 
  @@ -183,6 +185,7 @@
   <<
   }
   
  + # Generate a list of all global variables included in this package
   if ($p->globalvars()) {
   >>
 
  @@ -220,6 +223,7 @@
   <<
   }
   
  + # Copyright statement at the bottom
   >>
   
   
  @@ -280,6 +284,8 @@
   
 
   <<
  +
  + # Generate a TOC of all classes at the top of the page
   foreach $e ($p->classes()) {
   $_ = $e->url;
   s/\s/_/g;
  @@ -290,7 +296,7 @@
 
   
 
  -$(e.fullname)
  +$(e.fullname)
 
   
   <<
  @@ -302,7 +308,7 @@
   >>
   
 
  -$(m.fullname)
  +$(m.fullname)
 
   
   <<
  @@ -315,6 +321,7 @@
   <<
   }
   
  + # Continue with the global functions TOC
   if ($p->globalfuncs()) {
   >>
   
  @@ -336,7 +343,7 @@
 
   
 
  -$(e.fullname)
  +$(e.fullname)
 
   
 
  @@ -344,6 +351,7 @@
   }
   }
   
  + # And then finish with the global variables TOC
   if ($p->globalvars()) {
   >>
   
  @@ -365,7 +373,7 @@
 
   
 
  -$(e.fullname)
  +$(e.fullname)
 
   
 
  @@ -378,9 +386,98 @@
   
   <<
   
  + # Then generate the detail for each class in this package
  +foreach $e ($p->classes()) {
  +$_ = $e->url;
  +s/\s/_/g;
  +y/[A-Z]/[a-z]/;
  +>>
  +
  +  
  +
  +  
  +
  +  Class "$(e.name)" Detail:
  +
  +  
  +
  +  
  +
  +  
  +$(e.name)
  +  
  +
  +  $(e.fullname) {
  +<<
  +
  +# Generate a code-like representation of the class
  +if ($e->members()) {
  +foreach $m ($e->members()) {
  +>>
  +  $(m.fullname);
  +<<
  +}
  +}
  +>>
  +  };
  +
  +
  +  
  +$(e.description)
  +  
  +
  +<<
   
  +# If we have functions, output them
  +if ($e->memberfuncs()) {
  +>>
  +
  +  
  +
  +  
  +Class "$(e.name)" Functions:
  +  
  +
  +  
  +
  +<<
  +foreach $m ($e->memberfuncs()) {
  + $_ = join("-",$e->name,$m->name);
  + s/\s/_/g;
  + y/[A-Z]/[a-z]/;
  + >>
  +

RE: ServerSocket not being closed properly.

2001-04-24 Thread cmanolache

On Tue, 24 Apr 2001, Brad Cox wrote:

> >In 3.3 we package all the tests as self-contained wars, and the admin has
> >a web-based runner - but it needs more polishing to make it really easy to
> >use.
> 
> That's roughly how I meant for a gui to work. A few text boxes for 
> options every novice must touch and run the tests automatically on 
> save. Novice-only stuff to make sure it runs out-of-box; eexperts 
> will dicker the config files directly.

I fully agree - the /admin provides few informations and services, but
it's user interface is very bad ( and not only from a graphical point of
view ), and incomplete.

I do add new pages and features - every time I have some time - but it
needs much more.

Probably someday I'll start a major refactoring for /admin - at least
separate the "server side" and the "ui", clean up the taglibs, etc.

For a non-web-based GUI it should be possible to control tomcat via URL
requests ( or direct calls ).


> >Regarding the configuration complexity - the main problem is the fact that
> >in few cases the module order is important ( this is true for Apache 1.3
> >also, and Apache2.0 improves a bit with the new "position" parameter).
> 
> This may be a big problem, but its not the main one for mortals. XML 
> validation only ensures that the configs are syntactically correct. 
> Without semantic validation (like your test suite could provide), 
> tomcat reports common errors, mispelling a context name, classpath 
> problems, etc, by throwing NullPointerExceptions and the like from 
> very low level code. Usually the stack trace provides no way of 

Agree - but remember this is open-source, with all it's benefits and 
problems. 

It would be nice to have better error messages - if someone would 
write the code ( or at least more docs ). 

Probably a good solution would be to stop using server.xml as a
user-modifiable config file, and work on a GUI that will expose only 
a controled set of options. 

( advanced users will still edit server.xml, but most users shouldn't
touch it ). 

One way or another - tomcat is a collection of modules, like apache. The
config file is not setting some tunnable parameters, but it's wiring up
the whole tomcat. It has a lot of power - but it's probably not the best
thing for users.


> >Most of the effort has been put into the lower-level architecure and
> >modularity - and not in individual modules. The idea is that in time we
> >can rewrite individual modules ( for example the mapper is a big target
> >for optimizations, etc ), and improve various spots.
> 
> That's about repairing/redesigning the bowels of the mine. I'm saying 
> tomcat  needs some work on the sales office. Its not either-or; both 
> need work.

Yes, but I can hardly find time for one. I would love to work on both -
but so far I coulnd't find  people to help on the /admin, and I'll
not start it alone.
( well, Larry and few others helped a lot - but he seems to have even less
free time than I have ).


> >Fact is - we do improve - and that's what matters ( for me ). I don't
> >think anyone claims the first versions of apache were easy to install ( or
> >even the latest ).
> 
> Indeed! And thanks for listening!

Well, thanks for the feedback - and even more thanks if that leads to some
code contributions.

Costin




RE: ServerSocket not being closed properly.

2001-04-24 Thread Brad Cox

At 9:50 AM -0700 04/24/2001, [EMAIL PROTECTED] wrote:
>here are few ideas that can be used for configuration validation, and
>the best ( IMHO ) is to run the sanity test after every change in the
>config file. ( maybe watchdog too ).
>
>In 3.3 we package all the tests as self-contained wars, and the admin has
>a web-based runner - but it needs more polishing to make it really easy to
>use.

That's roughly how I meant for a gui to work. A few text boxes for 
options every novice must touch and run the tests automatically on 
save. Novice-only stuff to make sure it runs out-of-box; eexperts 
will dicker the config files directly.

>Regarding the configuration complexity - the main problem is the fact that
>in few cases the module order is important ( this is true for Apache 1.3
>also, and Apache2.0 improves a bit with the new "position" parameter).

This may be a big problem, but its not the main one for mortals. XML 
validation only ensures that the configs are syntactically correct. 
Without semantic validation (like your test suite could provide), 
tomcat reports common errors, mispelling a context name, classpath 
problems, etc, by throwing NullPointerExceptions and the like from 
very low level code. Usually the stack trace provides no way of 
connecting the error with the config error that is causing it. I seem 
to get bitten by a half dozen or so variations on this theme every 
time I install a new release, which involves a week of frustrated 
guessing each time. The only solution I've found is to load the 
Tomcat sources into Visual Age and treating each release as a 
low-level debugging exercise.

>Most of the effort has been put into the lower-level architecure and
>modularity - and not in individual modules. The idea is that in time we
>can rewrite individual modules ( for example the mapper is a big target
>for optimizations, etc ), and improve various spots.

That's about repairing/redesigning the bowels of the mine. I'm saying 
tomcat  needs some work on the sales office. Its not either-or; both 
need work.

>Fact is - we do improve - and that's what matters ( for me ). I don't
>think anyone claims the first versions of apache were easy to install ( or
>even the latest ).

Indeed! And thanks for listening!
-- 
---
Brad Cox, Ph.D.; [EMAIL PROTECTED]
Phone: 703 361 4751 Cell: 703 919-9623
http://virtualschool.edu



an option for servletrunner

2001-04-24 Thread chang su

Hi,

I'm using JSDK2.0. I want to find an option for
servletrunner when running a servlet using
servletrunner. I'm trying to ignore JIT warning
message during running time. I need use Sun JAXP1,1
which is a XML parser and transformer in my coding. 
Some warning message always show up in the output
during running time:


A nonfatal internal JIT (4.00.010(x)) error
'Structured Exception(c005)' has occurred in:
'org/apache/crimson/parser/Parser2.maybeComment
(Z)Z': Interpreting method.
Please e-mail this message along with
reproduciable sample to [EMAIL PROTECTED]


Sun support told me that if I can use java
-Djava.compiler=NONEor JDK1.3 this
warnning message won't show up. 

However I'm using servlet JSDK2.0 and jdk1.2. Is there
an option I can use to avoid this warnning message?

Thanks,

Chang 




__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Re: cvs commit:jakarta-tomcat-4.0/service/src/share/org/apache/service/helpersNativeServiceHelper.java NativeServiceManager.java SimpleService.java

2001-04-24 Thread Jon Stevens

on 4/24/01 9:47 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> After meeting with the JSR-096 group, all this package is obsolete.
> The Tomcat 4.x implementation of the "Service/Invocation" package will be
> implemented following what has been ruled by the JSR-096 group and will
> serve as a testcase/utility implementation for the JSR itself (it's not
> going to be the "reference implementation" but will be probably the main
> working implementation of the specification).

Might it be a better idea to put the working implementation of the JSR-096
specification into the Commons instead in Tomcat?

-jon




load balancing questions

2001-04-24 Thread Kelly Kleinfelder





Hi! I've posted this to the tomcat-users group as 
well as sent a personal message to the author of all the load balancing 
documentation, but I haven't gotten a response from either source. Hopefully, 
someone on this list can help.
 
Here are my questions, followed by some detailed information about my 
setup.
 
Is there an lbfactor setting that will redirect all 
new sessions to another worker? 
Is there an upper limit to which the lbfactor can 
be set? 
 
With those questions in mind, here is more detail 
and background for my situation.
 
Here is our setup:
 
Apache 1.3.14
Tomcat 3.2.1
Solaris 7
 
We have 2 instances of tomcat running on our web 
server, tomcat1 and tomcat2. Currently, tomcat1 is used 
to serve our "live" applications and tomcat2 serves as a testing ground before 
the apps go live. Our apache server, through the httpd.conf file, 
includes our tomcat1 configuration file for the "live" apps.
 
Currently, when we move the apps from the testing 
ground to be the "live" apps, we have to wait until there are no users logged 
in, and then do the switch, in order to ensure that no user will be kicked out 
in the middle of his session. What we actually do to initiate the switchover is 
change the Include line in apache's httpd.conf file to load the configuration 
file for our testing tomcat, tomcat2, and restart apache. At that point, the 
testing grounds become the "live" app and the former "live" app tomcat, tomcat1, 
is used for our new testing ground.
 
We want to use the load balancing features of 
tomcat so that we can perform the switchover without disrupting any user 
sessions. We propose to set the lbfactor of the testing tomcat, tomcat2, to 99 
and the "live" server, tomcat1, to 1 when we're ready to switch. That way, any 
users who have current sessions will continue to visit the former "live" tomcat, 
tomcat1, and any new user sessions established will be handled by the 
former testing tomcat, tomcat2. 
 
We have tested this workers.properties 
configuration, and while it does send a greater number of new sessions to 
tomcat2, we still get some that go to tomcat1. Also, when we set the lbfactor 
for tomcat2 to be 0, it still kicks in and takes over when we stop tomcat1 (even 
though the documentation says that the lbfactor must be greater than 0). 

 
 
Kelly KleinfelderUNIX System 
AdministratorUnbound Medicine, Inc.


Re: what is the deal with tomcat 4 and web server connectors??

2001-04-24 Thread cmanolache

Dan,

It seems the most requested ( and important) feature for mod_jk is simpler
configuration - and I think we can do many simple things with a lot of
effect ( sending the config automatically is one - and quite easy ). 

Regarding the use of mod_jk for tomcat4 - I would sugest a different
aproach:

The connector is a mini ORB, optimized for HTTP-type requests. On the Java
side, tomcat3.3 does a lot of optimizations - most of them related with
object allocation and representation.

I think those pieces are very valuable - and instead of implementing the
AJP13 ( and future 14 ) it would be much better to extract the full
implementation and make it independent of tomcat3.3

That would allow to also build a tomcat3.2 adapter ( since most people are
using 3.2 right now - and changing a production site is a slow process
). Tomcat4 is supposed to be more flexible than 3.x :-) - so creating an
adapter should be easy ( well, I don't understand most of the 4.0 design,
but I was able to build a prototype adapter - and get ajp13 support into
4.0. Unfortunately my head exploded due to class loading problems - but it
can be done ).

So what I would do ( or I'll do :-) is start with a new package, taking
 MessageBytes, MimeHeaders, subset of Request/Response, add an adapter
interface ( tc3.1 used to have one - but it had a bad design - I can say
that since I did it ) using a notification model ( for example a
AdapterListener that will allow the adapter to plug to upper layers )

Then create interceptors/valves for 3.2, 3.3, 4.0 ( maybe:-) and plug it
in.

Of course, this is just an idea - there are many details to discuss ( and 
other, better ideas - I'm sure of that :-). 

Costin
  

On Tue, 24 Apr 2001, Dan Milstein wrote:

> One thing which I think would be useful (which I wanted to do myself, but
> don't think I'll have time to do), would be to write an ajp13 connector for
> TC 4.  This would allow TC 4 users to use mod_jk as their plugin (which
> supports iPlanet and IIS).  If you are interested in doing some development,
> I think that would be an excellent contribution.
> 
> Steps:
> 
>  - Take a look through the Ajp13 doc in the 3.3 branch (src/doc/AJPv13.html)
> -- this explains how the protocol works.  
> 
>  - Review the ajp13 connector code in 3.3
> (share/org/apache/tomcat/modules/server/Ajp13.java and
> Ajp13Interceptor.java).
> 
>  - Adapt that code to the TC 4 codebase (basing on HttpConnector, or
> WarpConnector, possibly).
> 
> Wins: connect to multiple servers (including netscape and iis), load
> balancing, debugged C code.
> 
> Losses: painful to configure
> 
> Although I don't have time to write this code myself, I can contribute some
> help (I understand the 3.3 ajp13 code pretty thoroughly).
> 
> -Dan
> 
> > Kevin Seguin wrote:
> > 
> > i want to move from tomcat 3.x to tomcat 4.  i absolutely must be able to
> > use tomcat 4 with netscape/iplanet and microsoft (iis) web servers.  as
> > near as i can tell, the only connector that will be available in the
> > foreseeable future is for apache 1.3.  is this true?
> > 
> > i have come across very little (almost no) information regarding this new
> > webapp lib (which appears to be undergoing some significant change
> > recently) and the warp thing...  does *anybody* have anything to share??
> > i'm willing to help out with connector development, or even write my own
> > connectors...  if i could only figure out where to start...
> 
> 




Re: Solaris Sparc Performance Problem

2001-04-24 Thread Arieh Markel

Here is what I would do to see the differences:

. on Solaris, run the application through truss

. on Linux, run the application through strace

This should yield information about where the time is being spent.

I am also wondering whether the Solaris machine is properly configured
with regards to things like nameserver lookups, proxy setups, etc.

Arieh

> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Delivered-To: mailing list [EMAIL PROTECTED]
> From: [EMAIL PROTECTED] (Douglas E. Hornig)
> Subject: Solaris Sparc Performance Problem
> To: [EMAIL PROTECTED]
> Content-Disposition: inline
> X-MIME-Autoconverted: from quoted-printable to 8bit by amon.Central.Sun.COM id 
LAA19808
> 
> I posed this problem to the good folks on the users list.  While they are a 
great bunch, and several offered some suggestions, I was unable to get any help 
from them so I'm trying the dev list now.
> 
> The problem in a nutshell is that requests I make to tomcat running on a 
Solaris Sparc from a Windows client take at least 0.15 to 0.20 seconds.  If I 
run tomcat on a Linux PC, or use a Linux PC as a client instead of Windows, the 
turnaround time is more like 0.01 seconds.
> 
> Here are the particulars:
> 
> * All machines are on the same 100Mbit ethernet.
> * Tomcat is running standalone.
> * I tried a couple of different Sparcs, a 420R and an Ultra 5, neither with 
any load.  No difference.
> * I wrote a simple Java program to use as the test client so there are no 
browsers involved.
> * I tried various different Java VM releases on the Sparcs, 1.2.1 and 1.3.0 
with no difference seen.
> * I tried a couple different PCs (NT4 and Win2000) and found the same results.
> * Other programmers here reported slowness using VisualBasic as the client 
instead of Java (that's how I got started investigating this).  Java Web Server 
2.0 also appeared to have the same problem as tomcat.  I have not personally 
been able to verify these assertions.
> * The results seem very repeatable.
> * I used a generic tomcat 3.2.1 for the server and hit the 
examples/servlet/HelloWorldExample URL for these tests.
> 
> This is a very serious problem for us.  The above mentioned VB client that 
we're developing can make dozens of calls to the server per screen, so those 0.2 
second delays add up.  I like Linux a lot myself but the bosses here feel more 
comfortable with more traditional business models, and besides shouldn't Java 
run best on a Sparc with Solaris?  I am perplexed as to what the problem is and 
would greatly appreciate any help or ideas I can get.
> 
> Thanks in advance,
> 
> Douglas Hornig
> Dartmouth-Hitchcock Medical Center
> Lebanon, NH

--
 Arieh Markel   Sun Microsystems Inc.
 Network Storage500 Eldorado Blvd. MS UBRM11-194
 e-mail: [EMAIL PROTECTED]   Broomfield, CO 80021
 Pray for snow  Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)




Re: what is the deal with tomcat 4 and web server connectors??

2001-04-24 Thread Dan Milstein

Kevin,

One thing which I think would be useful (which I wanted to do myself, but
don't think I'll have time to do), would be to write an ajp13 connector for
TC 4.  This would allow TC 4 users to use mod_jk as their plugin (which
supports iPlanet and IIS).  If you are interested in doing some development,
I think that would be an excellent contribution.

Steps:

 - Take a look through the Ajp13 doc in the 3.3 branch (src/doc/AJPv13.html)
-- this explains how the protocol works.  

 - Review the ajp13 connector code in 3.3
(share/org/apache/tomcat/modules/server/Ajp13.java and
Ajp13Interceptor.java).

 - Adapt that code to the TC 4 codebase (basing on HttpConnector, or
WarpConnector, possibly).

Wins: connect to multiple servers (including netscape and iis), load
balancing, debugged C code.

Losses: painful to configure

Although I don't have time to write this code myself, I can contribute some
help (I understand the 3.3 ajp13 code pretty thoroughly).

-Dan

> Kevin Seguin wrote:
> 
> i want to move from tomcat 3.x to tomcat 4.  i absolutely must be able to
> use tomcat 4 with netscape/iplanet and microsoft (iis) web servers.  as
> near as i can tell, the only connector that will be available in the
> foreseeable future is for apache 1.3.  is this true?
> 
> i have come across very little (almost no) information regarding this new
> webapp lib (which appears to be undergoing some significant change
> recently) and the warp thing...  does *anybody* have anything to share??
> i'm willing to help out with connector development, or even write my own
> connectors...  if i could only figure out where to start...

-- 

Dan Milstein // [EMAIL PROTECTED]



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

2001-04-24 Thread pier

pier01/04/24 10:20:17

  Added:   connectors README.txt
  Log:
  Initial README document draft.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-4.0/connectors/README.txt
  
  Index: README.txt
  ===
  README for WebApp Library and Related Modules
  -
  
  Prerequisites:
  --
  
  1) The Apache Portable Runtime library:
The APR library is an abstraction layer among several operating systems,
and it's used to simplify the porting operation of the WebApp Library and
its related modules to different environments.
  
This doesn't mean that WebApp modules will require the Apache Web Server
2.0 to run, but only that both WebApp and Apache 2.0 are built on the
same OS abstraction layer (if Apache 2.0 can run on your operating system
also WebApp can)

There is not yet a final release of APR, but you can download the lastest
development snapshot from 
  
  2) The Web Server of your choice:
Even if right now the only implemented web server plug-in is mod_webapp
for Apache 1.3, WebApp Library Modules can be written for any web server.
Currently, for Apache 1.3, you will need a fully installed version of
the web server with DSO (loadable modules) support and APXS, the Apache
modules compilation utility.
  
  
  



RE: [PATCH] mod_jk timestamp and process id logging

2001-04-24 Thread Pogo Com

This is starting to sound complicated.  I'd say go with the getpid(), since it
covers a major case and is pretty portable and simple.

Bill


--- GOMEZ Henri <[EMAIL PROTECTED]> wrote:
> Depend the OS:
> 
> AS/400 =>
> 
> int GetThreadId()
> {
>   pthread_t   lSelf = pthread_self();
>   pthread_id_np_t lTid;
> 
>   pthread_getunique_np(&lSelf, &lTid);
>   return (lTid.intId.lo);
> }
> 
> Linux =>
> 
> int GetThreadId()
> {
>   return (pthread_self());
> }
> 
> What about others platforms like AIX/HPUX/Windows


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Problem with JNI...

2001-04-24 Thread Daniel Diaz

Hello

I have now another strange problem. I have reinstalled my machine with a 
RedHat 7.0, here is the unmae -a output:

Linux lima.univ-paris1.fr 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686 
unknown

but my previous JNI application no longer works (even afetr a total 
recompilation). Trying to localize the problem I found that I could not even 
launch the JVM. This simple program does not run:

#include 
#include 
#include 

JNIEnv *env;
JavaVM *vm;
jclass cls;

int
main()
{
  JavaVMOption options[2];
  JavaVMInitArgs vm_args;

  options[0].optionString = "-Djava.class.path=."; /* user classes */

  vm_args.version = JNI_VERSION_1_2;
  vm_args.options = options;
  vm_args.nOptions = 1;
  vm_args.ignoreUnrecognized = 1;

  printf("READY TO LOAD THE JVM\n");
  if (JNI_CreateJavaVM(&vm, (void **)&env, (void *)&vm_args) < 0)
{
  fprintf(stderr, "cannot load the JVM\n");
  exit(1);
}

  printf("JVM LOADED\n");
  exit(0);
}


When I execute it I get:
[diaz@lima jgprolog-1.0]$ y
READY TO LOAD THE JVM
#
# HotSpot Virtual Machine Error, Unexpected Signal 11
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F4C494E55580E43505005BC
#
# Problematic Thread: prio=10 tid=0x80532b0 nid=0x3416 runnable
#
Abandon

here is the gdb session:
[diaz@lima jgprolog-1.0]$ gdb y
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) r
Starting program: /home/diaz/jgprolog-1.0/y
[New Thread 1024 (LWP 13340)]
READY TO LOAD THE JVM
[New Thread 2049 (LWP 13341)]
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 13340)]
0x401b575c in os::start_thread ()
   from /usr/java/jdk1.3/jre/lib/i386/client/libjvm.so
(gdb) where
#0  0x401b575c in os::start_thread ()
   from /usr/java/jdk1.3/jre/lib/i386/client/libjvm.so
#1  0x401e3767 in Threads::create_vm ()
   from /usr/java/jdk1.3/jre/lib/i386/client/libjvm.so
#2  0x4015c458 in JNI_CreateJavaVM ()
   from /usr/java/jdk1.3/jre/lib/i386/client/libjvm.so
#3  0x804a877 in main () at y.c:23
#4  0x40457b65 in __libc_start_main (main=0x804a82c , argc=1,
ubp_av=0xb8b4, init=0x804a3c8 <_init>, fini=0x804f914 <_fini>,
rtld_fini=0x4000df24 <_dl_fini>, stack_end=0xb8ac)
at ../sysdeps/generic/libc-start.c:111
(gdb)

Do you have any idea ?

-- 
===
 Daniel Diaz
University of Paris 1  INRIA Rocquencourt
75013 Paris FRANCE  78153 Le Chesnay FRANCE
web: http://pauillac.inria.fr/~diaz
email: [EMAIL PROTECTED]
===





Re: Problem with JNI...

2001-04-24 Thread Pier P. Fumagalli

Daniel Diaz at [EMAIL PROTECTED] wrote:

> Hello
> 
> I have now another strange problem. I have reinstalled my machine with a
> RedHat 7.0, here is the unmae -a output:
> 
> Linux lima.univ-paris1.fr 2.2.16-22 #1 Tue Aug 22 16:49:06 EDT 2000 i686
> unknown
> 
> but my previous JNI application no longer works (even afetr a total
> recompilation). Trying to localize the problem I found that I could not even
> launch the JVM. This simple program does not run:
> 
> [...]
> 
> Do you have any idea ?

Yes, someone is sending a signal 11 to the JVM and the main thread of the
process (the one calling CreateVM) has not been released from the VM whilst
it's receiving the signal... (This was discussed over at the JSR-096 meeting
last week)...

It's tricky but you invoke the "main" method within a new thread created
from within the JVM and have the main thread to return into a sleep() loop
outside the scope of any JNI method...

Pier




RE: ServerSocket not being closed properly.

2001-04-24 Thread cmanolache

On Tue, 24 Apr 2001, Brad Cox wrote:

> At 7:23 AM -0700 04/24/2001, [EMAIL PROTECTED] wrote:
> >Anyway - a cleaner solution ( IMHO ) is to just set "stoped" and do a
> >bogus connection. That's what I did in 3.3 - and seems to work fine.
> 
> That does sound better. I really hope this gets nailed ASAP. I 
> suspect the present configuration complexity, exacerbated by the lack 
> of configuration validation, could be fixed with a simple gui.

There are few ideas that can be used for configuration validation, and
the best ( IMHO ) is to run the sanity test after every change in the
config file. ( maybe watchdog too ).

In 3.3 we package all the tests as self-contained wars, and the admin has
a web-based runner - but it needs more polishing to make it really easy to
use.

I don't think anything else will work - XML validation doesn't help too
much ( since tomcat is a collection of modules - and the user can add any
custom module, the problem is to validate that the configured collection
of modules works fine )

We could also do small smog-tests at startup ( few internal requests,
etc), but that's not too good ( affects tomcat on each startup, and it's
not complete anyway ).


Regarding the configuration complexity - the main problem is the fact that
in few cases the module order is important ( this is true for Apache 1.3
also, and Apache2.0 improves a bit with the new "position" parameter).

Tomcat 3.3 takes a similar aproach with Apache2.0, by letting the module 
register itself in the right position in each chain - the
current architecture should provide all the needed elements. The only
problem is that each module must be modified to take advantage of the new
API, and this takes time ( and it's not a top priority - fixing the
existing bugs and releasing a stable 3.3.0 is more important IMHO ). 

BTW, 3.3 also has a (reasonably) well defined "state", that should allow
restart, adding/removing of configs, etc. Since the connectors are pluged
in as regular modules, the architecture allow them to reconfigure the
server ( either by config re-generation as in the current code, or by 
automaticly sending the config via ajp14 as proposed ). Again - the
modules must take advantage of that, and it takes time and work.

Most of the effort has been put into the lower-level architecure and
modularity - and not in individual modules. The idea is that in time we
can rewrite individual modules ( for example the mapper is a big target
for optimizations, etc ), and improve various spots.


> This might go far towards turning around the bad press Tomcat has 
> been getting of late, but this problem is fatal to gui wrappers.

Well, the "bad press" is right in many aspects - we do need an
installer and better admin gui. At least on Linux the RPM install does a
lot of magic ( and can do even more, there are few ideas to improve it ), 
but a windows installer will do a lot. 

Fact is - we do improve - and that's what matters ( for me ). I don't
think anyone claims the first versions of apache were easy to install ( or
even the latest ).  

Costin




Re: Servlet bug??

2001-04-24 Thread estutes

On 24 Apr, Larry Isaacs wrote:
> Hi,
> 
> Normally you should post questions like this to
> [EMAIL PROTECTED]
> 
> As for the problem, in your Servlet you can override init() or
> init(ServletConfig config).  If you override init(ServletConfig config),
> you must call "super.init(config)" in your method.  If you don't,
> I think you will encounter a symptom like what you are seeing.
> 
> Hope this helps,
> Larry

I think I am trying to report a bug.  I modified my init() code per
your suggestion. It now looks like this.

51public void init(ServletConfig config) throws ServletException {
52  super.init(config);
53  props = new Properties(System.getProperties());
54  for (Enumeration e = config.getInitParameterNames(); e.hasMoreElements();) {
55  String p = (String)e.nextElement();
56  props.setProperty(p, config.getInitParameter(p));
57  }
58  try {
59  InputStream is = 
config.getServletContext().getResourceAsStream("/WEB-INF/easMail.Properties");
60  props.load(is);
61  }
62  catch (Exception ex) {
63  throw  new ServletException( "easMail Initialization problem: " + 
ex.getMessage());
64  }

Here is the result:

A Servlet Exception Has Occurred

javax.servlet.ServletException: easMail Initialization problem: null
at easMail.EasMailServlet.init(EasMailServlet.java:63)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:802)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:583)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)






cvs commit: jakarta-tomcat-4.0/service/src/share/org/apache/service/helpers NativeServiceHelper.java NativeServiceManager.java SimpleService.java

2001-04-24 Thread pier

pier01/04/24 09:47:25

  Removed: service  README
   service/src Makedefs.orig Makefile
   service/src/native Makefile jsvc.h jsvc_help.c jsvc_parse.c
jsvc_service.c jsvc_unix.c
   service/src/native/windows menu-quit.bmp menu-restart.bmp
menu-start.bmp menu-stop.bmp tomcat.ico
tray-default.ico tray-running.ico tray-stopped.ico
   service/src/share Makefile
   service/src/share/org/apache/service Service.java
ServiceException.java ServiceManager.java
   service/src/share/org/apache/service/helpers
NativeServiceHelper.java NativeServiceManager.java
SimpleService.java
  Log:
  After meeting with the JSR-096 group, all this package is obsolete.
  The Tomcat 4.x implementation of the "Service/Invocation" package will be
  implemented following what has been ruled by the JSR-096 group and will
  serve as a testcase/utility implementation for the JSR itself (it's not
  going to be the "reference implementation" but will be probably the main
  working implementation of the specification).



cvs commit: jakarta-tomcat-4.0/connectors/lib wa_request.c

2001-04-24 Thread pier

pier01/04/24 09:31:35

  Modified:connectors Makefile.in
   connectors/lib wa_request.c
  Log:
  Modified scandoc output.
  Request for WA_REQUEST.
  
  Revision  ChangesPath
  1.3   +4 -5  jakarta-tomcat-4.0/connectors/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/Makefile.in,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.in   2001/04/17 14:54:45 1.2
  +++ Makefile.in   2001/04/24 16:31:34 1.3
  @@ -56,7 +56,7 @@
   # = #
   
   # @author  Pier Fumagalli 
  -# @version $Id: Makefile.in,v 1.2 2001/04/17 14:54:45 pier Exp $
  +# @version $Id: Makefile.in,v 1.3 2001/04/24 16:31:34 pier Exp $
   
   include Makedefs
   
  @@ -81,10 +81,9 @@
$(MAKE) -C $$DIR clean ; \
done
   
  -docs: include/*.h
  - @if ! test -d docs ; then mkdir docs ; fi
  - ./scandoc/scandoc.pl -i ./scandoc/template.pl -p ./docs/ include/*.h
  - @touch docs
  +apidocs: include/*.h
  + @if ! test -d docs/api ; then mkdir docs/api ; fi
  + @./scandoc/scandoc.pl -i ./scandoc/template.pl -p ./docs/api/ include/*.h
   
   allclean: clean
   
  
  
  
  1.2   +9 -1  jakarta-tomcat-4.0/connectors/lib/wa_request.c
  
  Index: wa_request.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/lib/wa_request.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wa_request.c  2001/04/17 13:14:51 1.1
  +++ wa_request.c  2001/04/24 16:31:35 1.2
  @@ -55,7 +55,7 @@
*   *
* = */
   
  -/* @version $Id: wa_request.c,v 1.1 2001/04/17 13:14:51 pier Exp $ */
  +/* @version $Id: wa_request.c,v 1.2 2001/04/24 16:31:35 pier Exp $ */
   #include 
   
   /* Attempt to match an URL against a web application. */
  @@ -69,5 +69,13 @@
   
   /* Invoke a request in a web application. */
   int wa_invoke(wa_request *r, wa_application *a) {
  + return(404);
  +}
  +
  +/* Display an informative status page. */
  +int wa_status(wa_request *r, wa_application **appl, wa_connection **conn,
  +   int anum, int cnum) {
  + int x;
  +
return(404);
   }
  
  
  



cvs commit: jakarta-tomcat-4.0/connectors/include wa_webserver.h wa.h wa_general.h wa_provider.h wa_request.h

2001-04-24 Thread pier

pier01/04/24 09:30:27

  Modified:connectors/include wa.h wa_general.h wa_provider.h
wa_request.h
  Added:   connectors/include wa_webserver.h
  Log:
  Updated Includes.
  
  Revision  ChangesPath
  1.2   +6 -4  jakarta-tomcat-4.0/connectors/include/wa.h
  
  Index: wa.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/include/wa.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wa.h  2001/04/17 13:13:48 1.1
  +++ wa.h  2001/04/24 16:30:24 1.2
  @@ -57,7 +57,7 @@
   
   /**
* @author  Pier Fumagalli 
  - * @version $Id: wa.h,v 1.1 2001/04/17 13:13:48 pier Exp $
  + * @version $Id: wa.h,v 1.2 2001/04/24 16:30:24 pier Exp $
*/
   #ifndef _WA_H_
   #define _WA_H_
  @@ -75,14 +75,16 @@
   
   /* WebApp Library type definitions. */
   typedef int boolean;
  -typedef struct wa_connection wa_connection;
   typedef struct wa_application wa_application;
  -typedef struct wa_deployer wa_deployer;
  +typedef struct wa_connection wa_connection;
  +typedef struct wa_provider wa_provider;
   typedef struct wa_request wa_request;
  -typedef void wa_provider;
  +typedef struct wa_webserver wa_webserver;
   
   /* WebApp Library includes */
   #include 
  +#include 
   #include 
  +#include 
   
   #endif /* ifndef _WA_H_ */
  
  
  
  1.2   +22 -3 jakarta-tomcat-4.0/connectors/include/wa_general.h
  
  Index: wa_general.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/include/wa_general.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wa_general.h  2001/04/17 13:13:49 1.1
  +++ wa_general.h  2001/04/24 16:30:24 1.2
  @@ -56,14 +56,19 @@
* = */
   
   /**
  - * @package WebApp General Package
  + * @package General
* @author  Pier Fumagalli 
  - * @version $Id: wa_general.h,v 1.1 2001/04/17 13:13:49 pier Exp $
  + * @version $Id: wa_general.h,v 1.2 2001/04/24 16:30:24 pier Exp $
*/
   #ifndef _WA_GENERAL_H_
   #define _WA_GENERAL_H_
   
   /**
  + * A freakin' int.
  + */
  +extern int errno;
  +
  +/**
* The WebApp Library connection structure.
* 
* This structure holds all required data required by a connection provider
  @@ -110,9 +115,10 @@
* function is called before this function has been invoked will result in
* impredictable results.
*
  + * @param w The Web Server structure used for callbacks.
* @return NULL on success or an error message on faliure.
*/
  -const char *wa_init(void);
  +const char *wa_init(wa_webserver *w);
   
   /**
* Clean up the WebApp Library.
  @@ -151,5 +157,18 @@
*/
   const char *wa_deploy(wa_application **a, wa_connection *c, const char *n,
 const char *p);
  +
  +/**
  + * Attempt to match an URL against a web application.
  + * 
  + * This function will return TRUE only if the root URL path of the
  + * application matches the beginning of the specified URL.
  + *
  + * @param u The request URL to be matched against the web application.
  + * @param a The application against which the URL must be matched.
  + * @return TRUE if the URL can be handled by the web application without
  + * raising a "404 Not Found" error, FALSE otherwise.
  + */
  +boolean wa_match(const char *u, wa_application *a);
   
   #endif /* ifndef _WA_GENERAL_H_ */
  
  
  
  1.2   +13 -5 jakarta-tomcat-4.0/connectors/include/wa_provider.h
  
  Index: wa_provider.h
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/include/wa_provider.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wa_provider.h 2001/04/17 13:13:49 1.1
  +++ wa_provider.h 2001/04/24 16:30:25 1.2
  @@ -56,12 +56,12 @@
* = */
   
   /**
  - * @package WebApp General Package
  + * @package Connection Provider
* @author  Pier Fumagalli 
  - * @version $Id: wa_provider.h,v 1.1 2001/04/17 13:13:49 pier Exp $
  + * @version $Id: wa_provider.h,v 1.2 2001/04/24 16:30:25 pier Exp $
*/
  -#ifndef _WA_GENERAL_H_
  -#define _WA_GENERAL_H_
  +#ifndef _WA_PROVIDER_H_
  +#define _WA_PROVIDER_H_
   
   /**
* The WebApp Library connection provider structure.
  @@ -138,4 +138,12 @@
   void (*handle) (wa_request *req);
   };
   
  -#endif /* ifndef _WA_GENERAL_H_ */
  +/**
  + * Retrieve a provider by its name.
  + *
  + * @param n The provider name.
  + * @return A pointer to a wa_provider structure or NULL.
  + */
  +wa_provider *wa_getprovider(const char *n);
  +
  +#endif /* ifndef _WA_PROVIDER_H_ */
  

cvs commit: jakarta-tomcat-4.0/connectors/scandoc template.pl

2001-04-24 Thread pier

pier01/04/24 09:28:40

  Modified:connectors/scandoc template.pl
  Log:
  Now API docs from C sources are similar to JavaDOCs.
  
  Revision  ChangesPath
  1.2   +413 -655  jakarta-tomcat-4.0/connectors/scandoc/template.pl
  
  Index: template.pl
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/connectors/scandoc/template.pl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- template.pl   2001/04/17 13:10:22 1.1
  +++ template.pl   2001/04/24 16:28:39 1.2
  @@ -1,701 +1,459 @@
   <<
   # Scandoc template file.
   #
  -# This is an example set of templates that is designed to create several 
  -# different kinds of index files. It generates a "master index" which intended 
  -# for use with a frames browser; A "package index" which is the root page of 
  -# the index, and then "package files" containing documentation for all of the 
  +# This is an example set of templates that is designed to create several
  +# different kinds of index files. It generates a "master index" which intended
  +# for use with a frames browser; A "package index" which is the root page of
  +# the index, and then "package files" containing documentation for all of the
   # classes within a single package.
   
  -##
  +###
  +## Defaults for look and feel
   
  -## For quick and superficial customization, 
  -## simply change these variables
  +if ($project == "") { $project = "WebApp Library"; }
  +if ($copyright == "") { $copyright = "2001, The Apache Software Foundation"; }
  +if ($body_bgcolor == "") { $body_bgcolor = '#ff'; }
  +if ($body_text== "") { $body_text= '#00'; }
  +if ($body_link== "") { $body_link= '#ff'; }
  +if ($body_vlink   == "") { $body_vlink   = '#ff'; }
  +if ($body_alink   == "") { $body_alink   = '#ff'; }
  +
  +###
  +# Generate the frameset index #
  +###
   
  -$project_name = 'Apache WebApp';
  -$copyright= '2000-2001 The Apache Software Foundation';
  -
  -##
  -
  -## Begin generating frame index file.
  -
   file "index.html";
  +@p = packages();
  +$_ = @p[0]->url;
  +s/\s/_/g;
  +y/[A-Z]/[a-z]/;
   >>
   
  - 
  -  
  -  $project_name
  - 
  - 
  -  
  -  
  - 
  -
  -<<
  -
  -##
  -
  -## Begin generating master index file (left-hand frame).
  -
  -file "master.html";
  ->>
  -
  - 
  -  
  -  $project_name - Master Index
  - 
  - 
  -  
  -   
  -$project_name
  -   
  -   
  -Master Index:
  -   
  -   
  - 
  -Packages list
  -   
  -   
  - 
  -To-Do list
  -   
  -<<
  -
  -## For each package, generate an index entry.
  -
  -foreach $p (packages()) {
  -  $_ = $p->url;
  -  s/\s/_/g;
  ->>
  -    
  -   
  -$(p.name)
  -   
  -   
  -Classes:
  -   
  -<<
  -
  -  foreach $e ($p->classes()) {
  -$_ = $e->url;
  -s/\s/_/g;
  ->>
  -   
  - 
  -$(e.fullname)
  -   
  -<<
  -  }
  -
  ->>
  -   
  -Global 
Variables:
  -   
  -<<
  -
  -  foreach $e ($p->globalvars()) {
  -$_ = $e->url;
  -s/\s/_/g;
  ->>
  -   
  - 
  -$(e.fullname)
  -   
  -<<
  -  }
  -
  ->>
  -   
  -Global 
Functions:
  -   
  -<<
  -
  -  foreach $e ($p->globalfuncs()) {
  -$_ = $e->url;
  -s/\s/_/g;
  ->>
  -   
  - 
  -$(e.fullname)
  -   
  -<<
  -  }
  -}
  -
  ->>
  -    
  -   
  -   
  -
  - 
  -  Copyright © $copyright. All Rights Reserved.
  -  Generated by ScanDoc 
$majorVersion.$minorVersion
  -  on $date
  - 
  -
  -   
  -  
  - 
  +  
  +
  +$project API Documentation
  +  
  +  
  +
  +  
  +  
  +
  +
  +  
   
   <<
   
  -##
  +###
  +# Generate the packages list  #
  +###
   
  -## Begin generating package index file
  -
   file "packages.html";
   >>
   
  - 
  -  
  -  $project_name - Packages List
  - 
  - 
  -  
  -   
  -$project_name - Packages List
  -   
  -   
  -Packages:
  -   
  +  
  +
  +$project - Packages List
  +  
  +  
  +
  +  $project packages:
  +
  +
  +  
  + 
  + 
  +  
   <<
   
   ## For each package, generate an index entry.
   
   foreach $p (packages()) {
  -  $_ =

Problems building Tomcat.

2001-04-24 Thread Erik Lotspeich

Hello,

I am new to Jakarta and Tomcat, and I am having trouble building Tomcat.
I'm sure that this comes up on the list alot, so I don't mean to beat a
dead horse here.

I've looked through and read all of the FAQs, looked through newsgroup
archives on DejaNews, printed out hundreds of pages of documentation
from the http://jakarta.apache.org/ website, and read all of the readme
files and install documents.  What I experience building Jakarta does not
correspond with the documentation.

I'm trying to build Jakarta 3.2.  I've successfully built a usable Ant.
However, when I try to build jakarta-servletapi with the build.sh script,
I get the following message.

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main

When I run ant with no arguments (assuming that it finds the build.xml
flie), it appears to build ok.  Is this normal?  What is the correct way
to build jakarta-servletapi?  The docs say to run build.sh.

When I try to build jakarta-tomcat from source, I get a similar error if I
try build.sh, and when I try to build it with ant alone, I get tons of
errors.  I noted that previous versions of Tomcat included a taglib and a
tools package.  Where do I obtain these for the 3.2 release?  They are not
located in the directory at jakarta.apache.org where I found servletapi
and tomcat.

Is there a comprehensive source of documentation or a procedure for how to
build this beast?

Any help would be greatly appreciated.

Thanks in advance,

Erik.






Q: Future of Filter?

2001-04-24 Thread Bob Jamison

Hey, all, I have a minor question about TC4, if anyone knows,
cool, if not, oh, well.;-)

(Actually, I am probably just overlooking something obvious)

In the public drafts of 2.3 and in the Tomcat examples, I have
seen various specifications of Filter.  Is the spec going to
move toward Tomcat (since it is the testbed impl) or will Tomcat's
impl change?

For example, currently in the examples, it is defined as having 3 methods:

public void init(FilterConfig config);
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain 
chain);
public void destroy();


While in the final draft it is:

public void FilterConfig getFilterConfig();
public void setFilterConfig(FilterConfig config);
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain 
chain);


They are identical in function, except for destroy().
I can see some benefit in keeping destroy(),  since the Filter might
have allocated a lot of resources, (such as an XSLT transformer), but the
other differences  seem to be merely preference.

Just wondering, as I am still becoming acquainted with the new stuff in 2.3.



Bob




Re: Fixing error pages on virtual hosts.

2001-04-24 Thread cmanolache

Hi Peer, 

Great fix - thank's. 

I will do the fix in 3.3, and if Marc makes another beta ( for jsp fixes
) it would be great if he takes this one in. 

Marc - I know the code pretty well, and this line should have been in. I
don't think it'll affect any other piece of code, getHandlerForPath is
supposed to return a handler for the given ctx, and does so by creating a
sub-request. The subrequest must be for the ctx - and the vhost is
required.

Costin



On Tue, 24 Apr 2001, Peer Heijnen wrote:

> Hi,
> 
> We've been using Tomcat 3.2.1 quite succesfully, but ran into trouble with
> error pages on virtual domains (causing an infinite loop in 3.2.1, and a 404
> in 3.2.2b3).
> 
> We fixed this problem by setting the hostname in
> ord.apache.tomcat.core.ContextManager#getHandlerForPath( Context ctx, String
> path ). By adding "req1.setServerName( ctx.getHost() );" after
> "initRequest( req1, res1 );".
> 
> We've not studied all sources thoroughly, and I'm not sure if this is a
> correct fix, but it works perfectly on versions 3.2.1 upto 3.2.2beta3 (error
> pages get displayed correctly now). The servername was 'null' at the fix
> point before.
> 
> Cheers,
> Peter S. Heijnen
> 




RE: ServerSocket not being closed properly.

2001-04-24 Thread Brad Cox

At 7:23 AM -0700 04/24/2001, [EMAIL PROTECTED] wrote:
>Anyway - a cleaner solution ( IMHO ) is to just set "stoped" and do a
>bogus connection. That's what I did in 3.3 - and seems to work fine.

That does sound better. I really hope this gets nailed ASAP. I 
suspect the present configuration complexity, exacerbated by the lack 
of configuration validation, could be fixed with a simple gui.

This might go far towards turning around the bad press Tomcat has 
been getting of late, but this problem is fatal to gui wrappers.
-- 
---
Brad Cox, Ph.D.; [EMAIL PROTECTED]
Phone: 703 361 4751 Cell: 703 919-9623
http://virtualschool.edu



cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/generators ErrorHandler.java

2001-04-24 Thread costin

costin  01/04/24 07:45:45

  Modified:src/share/org/apache/tomcat/modules/generators
ErrorHandler.java
  Log:
  Ops, stupid error trying to "improve" a patch.
  
  Revision  ChangesPath
  1.11  +2 -2  
jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java
  
  Index: ErrorHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ErrorHandler.java 2001/04/23 01:21:58 1.10
  +++ ErrorHandler.java 2001/04/24 14:45:41 1.11
  @@ -173,7 +173,7 @@
errorServlet=getHandlerForPath( cm, ctx, errorPath );
   
String cpath=ctx.getPath();
  - if( cpath="/")  cpath="";
  + if( "/".equals(cpath))  cpath="";

// Make sure Jsps will work - needed if the error page is a jsp
if ( null!=errorPath && errorPath.startsWith("/") ) {
  @@ -290,7 +290,7 @@
errorServlet=getHandlerForPath( cm, ctx, errorPath );
   
String cpath=ctx.getPath();
  - if( cpath="/")  cpath="";
  + if( "/".equals( cpath ))  cpath="";

// Make sure Jsps will work - needed if the error page is a jsp
if ( null!=errorPath && errorPath.startsWith("/") ) {
  
  
  



RE: [GUMP] Build Failure - Tomcat 3.x

2001-04-24 Thread Steve Downey

Index: ErrorHandler.java
===
RCS file:
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/modules/generator
s/ErrorHandler.java,v
retrieving revision 1.10
diff -u -r1.10 ErrorHandler.java
--- ErrorHandler.java   2001/04/23 01:21:58 1.10
+++ ErrorHandler.java   2001/04/24 14:40:58
@@ -173,7 +173,9 @@
errorServlet=getHandlerForPath( cm, ctx, errorPath );

String cpath=ctx.getPath();
-   if( cpath="/")  cpath="";
+if( cpath.equals("/") ) {
+cpath="";
+}

// Make sure Jsps will work - needed if the error page is a jsp
if ( null!=errorPath && errorPath.startsWith("/") ) {
@@ -290,7 +292,9 @@
errorServlet=getHandlerForPath( cm, ctx, errorPath );

String cpath=ctx.getPath();
-   if( cpath="/")  cpath="";
+if( cpath.equals("/") ) {
+cpath="";
+}

// Make sure Jsps will work - needed if the error page is a jsp
if ( null!=errorPath && errorPath.startsWith("/") ) {

-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 8:45 AM
To: [EMAIL PROTECTED]
Subject: [GUMP] Build Failure - Tomcat 3.x



This email is autogenerated from the output from:



Buildfile: build.xml

detect:

msg.jdk12:
 [echo] Detected JDK1.2

msg.jsse:
 [echo] Detected JSSE

init:

prepare:
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat
[mkdir] Created dir:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
[mkdir] Created dir:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/conf
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/src
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib
[mkdir] Created dir:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/apps
[mkdir] Created dir:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container
[mkdir] Created dir:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common
[mkdir] Created dir:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/logs
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/bin
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/doc
[mkdir] Created dir:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/webapps
[mkdir] Created dir:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/native
 [copy] Copying 10 files to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/bin
 [copy] Copying 19 files to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/conf
 [copy] Copying 42 files to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/doc
 [copy] Copying 89 files to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/native
 [copy] Copying 1 file to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat
 [copy] Copying 7 files to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/bin
 [copy] Could not find file
/home/rubys/jakarta/jakarta-ant/dist/lib/jaxp.jar to copy.
 [copy] Could not find file
/home/rubys/jakarta/jakarta-ant/dist/lib/parser.jar to copy.
 [copy] Copying 1 file to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container
 [copy] Copying 1 file to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container
 [copy] Copying 1 file to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container
 [copy] Copying 1 file to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/apps
 [copy] Copying 1 file to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common
 [copy] Copying 1 file to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common

tomcat_util:
[javac] Compiling 83 source files to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -deprecation for details.
  [jar] Building jar:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common/core_util.jar
  [jar] Building jar:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container/tomcat_util.ja
r

tomcat.jar:
[javac] Compiling 1 source file to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
  [jar] Building jar:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/tomcat.jar

stop-tomcat.jar:
[javac] Compiling 1 source file to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
 [copy] Copying 4 files to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes/org/apache/tomcat/re
sources
  [jar] Building jar:
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/stop-tomcat.jar

tomcat_core:
[javac] Compiling 10 source files to
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/clas

RE: ServerSocket not being closed properly.

2001-04-24 Thread cmanolache

On Tue, 24 Apr 2001, Brad Cox PhD wrote:

> At 7:19 PM -0700 04/23/2001, [EMAIL PROTECTED] wrote:
> >On Mon, 23 Apr 2001, Arun Katkere wrote:
> >In general you need to do something to unblock the accept thread, and 3.2
> >doesn't have this in.
> 
> Yes, I remember now. You're absolutely right. You need 
> serverSocket.setSoTimeout() to break the accept periodically. Here's 
> how I did it in my app.

Hi Brad,

Yes, I remember about setSoTimeout() - I never liked that solution. If you
set it to 5 min then stop() may take up to 5 minutes ( since it has to
wait for the accept() socket to timeout). Multiply by 3 sockets...
( well, on average is probably half ).

Anyway - a cleaner solution ( IMHO ) is to just set "stoped" and do a
bogus connection. That's what I did in 3.3 - and seems to work fine.

The module creating the socket can do that easily - and I think it's much
cleaner than periodically breaking accept() ( and gives fast response,
without having to wait for the timeout to stop ) 

Costin

> 
> Notice the comment: apparently I got this from an early version of Tomcat.
> 
>   public void run()
>   {
>if (serverSocket != null) // original is server
>{
> isListening = true;
> while(isListening)
> {
>  try
>  {
>   Socket clientSocket = serverSocket.accept();
>   SocketServer clone = (SocketServer)clone();
>   clone.serverSocket = null;
>   clone.clientSocket = clientSocket;
>   clone.thread = new Thread(clone, name+"Clone");
>   clone.thread.start();
>  }
>  catch (InterruptedIOException e)
>  {
>   /**
>* Ignore periodic SO_TIMEOUT interrupts
>* Without this the accept call never returns when the serversocket
>* is closed, and all subsequent runs fail with "port 8082 busy".
>* I found this in the  Tomcat http server code.
>*/
>  }
>  catch (Throwable e)
>  { e.printStackTrace(); isListening = false; }
> }
>}
>else run(clientSocket);
>   }
>   void startServer(int port) throws UserFault
>   {
>if (thread == null)
>{
> try
> {
>  serverSocket = new ServerSocket(port);
>  serverSocket.setSoTimeout(WAKEUP_INTERVAL);
> }
> catch (IOException e)
> {
>  throw UserFault.errEnablerPortBusy(port);
> }
> thread = new Thread(this, name+"Master");
> isListening = true;
> thread.start();
>}
>   }
> 




[IGNORE] Re: setURLStreamHandlerFactory--why?

2001-04-24 Thread Kyle F. Downey

Kyle F. Downey wrote:

> Remy,
> 
> Do you happen to know if the patch I submitted for the context 
> ClassLoader was ever inspected or merged in? I never saw a reply.
> 

Sorry, this was a personal reply not meant for the list. 

--kd





Re: setURLStreamHandlerFactory--why?

2001-04-24 Thread Kyle F. Downey

Remy,

Do you happen to know if the patch I submitted for the context 
ClassLoader was ever inspected or merged in? I never saw a reply.

--kd







RE: ServerSocket not being closed properly.

2001-04-24 Thread Brad Cox PhD

At 7:19 PM -0700 04/23/2001, [EMAIL PROTECTED] wrote:
>On Mon, 23 Apr 2001, Arun Katkere wrote:
>In general you need to do something to unblock the accept thread, and 3.2
>doesn't have this in.

Yes, I remember now. You're absolutely right. You need 
serverSocket.setSoTimeout() to break the accept periodically. Here's 
how I did it in my app.

Notice the comment: apparently I got this from an early version of Tomcat.

  public void run()
  {
   if (serverSocket != null) // original is server
   {
isListening = true;
while(isListening)
{
 try
 {
  Socket clientSocket = serverSocket.accept();
  SocketServer clone = (SocketServer)clone();
  clone.serverSocket = null;
  clone.clientSocket = clientSocket;
  clone.thread = new Thread(clone, name+"Clone");
  clone.thread.start();
 }
 catch (InterruptedIOException e)
 {
  /**
   * Ignore periodic SO_TIMEOUT interrupts
   * Without this the accept call never returns when the serversocket
   * is closed, and all subsequent runs fail with "port 8082 busy".
   * I found this in the  Tomcat http server code.
   */
 }
 catch (Throwable e)
 { e.printStackTrace(); isListening = false; }
}
   }
   else run(clientSocket);
  }
  void startServer(int port) throws UserFault
  {
   if (thread == null)
   {
try
{
 serverSocket = new ServerSocket(port);
 serverSocket.setSoTimeout(WAKEUP_INTERVAL);
}
catch (IOException e)
{
 throw UserFault.errEnablerPortBusy(port);
}
thread = new Thread(this, name+"Master");
isListening = true;
thread.start();
   }
  }
-- 
---
Brad Cox, Ph.D.; [EMAIL PROTECTED]
Phone: 703 361 4751 Cell: 703 919-9623
http://virtualschool.edu



[GUMP] Build Failure - Tomcat 3.x

2001-04-24 Thread Craig McClanahan


This email is autogenerated from the output from:



Buildfile: build.xml

detect:

msg.jdk12:
 [echo] Detected JDK1.2

msg.jsse:
 [echo] Detected JSSE

init:

prepare:
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/conf
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/src
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/apps
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/logs
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/bin
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/doc
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/webapps
[mkdir] Created dir: /home/rubys/jakarta/jakarta-tomcat/build/tomcat/native
 [copy] Copying 10 files to /home/rubys/jakarta/jakarta-tomcat/build/tomcat/bin
 [copy] Copying 19 files to /home/rubys/jakarta/jakarta-tomcat/build/tomcat/conf
 [copy] Copying 42 files to /home/rubys/jakarta/jakarta-tomcat/build/tomcat/doc
 [copy] Copying 89 files to /home/rubys/jakarta/jakarta-tomcat/build/tomcat/native
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat/build/tomcat
 [copy] Copying 7 files to /home/rubys/jakarta/jakarta-tomcat/build/tomcat/bin
 [copy] Could not find file /home/rubys/jakarta/jakarta-ant/dist/lib/jaxp.jar to 
copy.
 [copy] Could not find file /home/rubys/jakarta/jakarta-ant/dist/lib/parser.jar to 
copy.
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/apps
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common
 [copy] Copying 1 file to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common

tomcat_util:
[javac] Compiling 83 source files to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -deprecation for details.
  [jar] Building jar: 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common/core_util.jar
  [jar] Building jar: 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container/tomcat_util.jar

tomcat.jar:
[javac] Compiling 1 source file to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
  [jar] Building jar: 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/tomcat.jar

stop-tomcat.jar:
[javac] Compiling 1 source file to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
 [copy] Copying 4 files to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes/org/apache/tomcat/resources
  [jar] Building jar: 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/stop-tomcat.jar

tomcat_core:
[javac] Compiling 10 source files to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
  [jar] Building jar: 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common/tomcat_core.jar

jasper:
[javac] Compiling 82 source files to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
 [copy] Copying 8 files to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes/org/apache/jasper
  [jar] Building jar: 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/common/jasper-runtime.jar
  [jar] Building jar: 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/lib/container/jasper.jar

tomcat_modules:
[javac] Compiling 39 source files to 
/home/rubys/jakarta/jakarta-tomcat/build/tomcat/classes
[javac] 
/home/rubys/jakarta/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java:176:
 incompatible types
[javac] found   : java.lang.String
[javac] required: boolean
[javac] if( cpath="/")  cpath="";
[javac] ^
[javac] 
/home/rubys/jakarta/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/ErrorHandler.java:293:
 incompatible types
[javac] found   : java.lang.String
[javac] required: boolean
[javac] if( cpath="/")  cpath="";
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile wi

Tomcat on Windows 98

2001-04-24 Thread dave . prout

I've had a lot of problems running Tomcat on Windows 98 until I installed it
as a top-level directory. I couldn't get it to work as a directory under
Java or JBuilder4, although I did do this on Windows NT. Does anyone know
why ?



cvs commit: jakarta-tomcat/src/native/mod_jk/nt_service jk_nt_service.c

2001-04-24 Thread hgomez

hgomez  01/04/24 01:49:48

  Modified:src/native/mod_jk/nt_service jk_nt_service.c
  Log:
  Update to follow new Win2K services cmd
  Obtained from: William A Rowe <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.3   +3 -2  jakarta-tomcat/src/native/mod_jk/nt_service/jk_nt_service.c
  
  Index: jk_nt_service.c
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/nt_service/jk_nt_service.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_nt_service.c   2000/11/19 04:15:13 1.2
  +++ jk_nt_service.c   2001/04/24 08:49:46 1.3
  @@ -56,7 +56,7 @@
   /***
* Description: NT System service for Jakarta/Tomcat   *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.2 $   *
  + * Version: $Revision: 1.3 $   *
***/
   
   #include "jk_global.h"
  @@ -248,6 +248,7 @@
   /*
* Stop the service.
*/
  +case SERVICE_CONTROL_SHUTDOWN:
   case SERVICE_CONTROL_STOP:
   ssStatus.dwCurrentState = SERVICE_STOP_PENDING;
   stop_jk_service();
  @@ -281,7 +282,7 @@
   if(dwCurrentState == SERVICE_START_PENDING) {
   ssStatus.dwControlsAccepted = 0;
   } else {
  -ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
  +ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN;
   }
   
   ssStatus.dwCurrentState = dwCurrentState;
  
  
  



RE: [PATCH] mod_jk timestamp and process id logging

2001-04-24 Thread GOMEZ Henri

Depend the OS:

AS/400 =>

int GetThreadId()
{
pthread_t   lSelf = pthread_self();
pthread_id_np_t lTid;

pthread_getunique_np(&lSelf, &lTid);
return (lTid.intId.lo);
}

Linux =>

int GetThreadId()
{
return (pthread_self());
}

What about others platforms like AIX/HPUX/Windows


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



>-Original Message-
>From: Pogo Com [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 24, 2001 2:36 AM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: [PATCH] mod_jk timestamp and process id logging
>
>
>>We could add the getpid() but what about Apache 2.0
>>in MPM mode (threaded) ?
>
>The getpid() isn't going to be very helpful in that case, but 
>at least it
>doesn't hurt.
>
>Is there some other notion like a thread id that would be 
>applicable to the
>multithreaded Apache case?
>
>Bill
>
>
>__
>Do You Yahoo!?
>Yahoo! Auctions - buy the things you want at great prices
>http://auctions.yahoo.com/
>



Fixing error pages on virtual hosts.

2001-04-24 Thread Peer Heijnen

Hi,

We've been using Tomcat 3.2.1 quite succesfully, but ran into trouble with
error pages on virtual domains (causing an infinite loop in 3.2.1, and a 404
in 3.2.2b3).

We fixed this problem by setting the hostname in
ord.apache.tomcat.core.ContextManager#getHandlerForPath( Context ctx, String
path ). By adding "req1.setServerName( ctx.getHost() );" after
"initRequest( req1, res1 );".

We've not studied all sources thoroughly, and I'm not sure if this is a
correct fix, but it works perfectly on versions 3.2.1 upto 3.2.2beta3 (error
pages get displayed correctly now). The servername was 'null' at the fix
point before.

Cheers,
Peter S. Heijnen