Re: xsl by extension

2001-09-06 Thread Christopher Cain

Quoting [EMAIL PROTECTED]:

[snip]

> So I'll be as -1 on adding this feature
> ( or CGI support, for this matter :-)

Damn! There goes my very next proposal =)

- Christopher

/**
 * Pleurez, pleurez, mes yeux, et fondez vous en eau!
 * La moitié de ma vie a mis l'autre au tombeau.
 *---Corneille
 */



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets WebdavServlet.java

2001-09-06 Thread remm

remm01/09/06 22:48:30

  Modified:catalina/src/share/org/apache/catalina/servlets
WebdavServlet.java
  Log:
  - Return 405 (method not allowed) in response to a PROPPATCH request.
  - Bug reported by Vijaya Kumar .
  
  Revision  ChangesPath
  1.24  +5 -6  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
  
  Index: WebdavServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- WebdavServlet.java2001/07/25 01:07:25 1.23
  +++ WebdavServlet.java2001/09/07 05:48:30 1.24
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
 1.23 2001/07/25 01:07:25 remm Exp $
  - * $Revision: 1.23 $
  - * $Date: 2001/07/25 01:07:25 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v
 1.24 2001/09/07 05:48:30 remm Exp $
  + * $Revision: 1.24 $
  + * $Date: 2001/09/07 05:48:30 $
*
* 
*
  @@ -126,7 +126,7 @@
* are handled by the DefaultServlet.
*
* @author Remy Maucherat
  - * @version $Revision: 1.23 $ $Date: 2001/07/25 01:07:25 $
  + * @version $Revision: 1.24 $ $Date: 2001/09/07 05:48:30 $
*/
   
   public class WebdavServlet
  @@ -669,8 +669,7 @@
   return;
   }
   
  -
  -
  +resp.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
   
   }
   
  
  
  



PATCH: Multiple Tomcat 3.2 ISAPI redirectors on the one machine

2001-09-06 Thread Tim Whittington

Afternoon tomcat-dev (It's late afternoon down here in New Zealand)

We have multiple applications that use the IIS ASAPI redirector to talk to 
Tomcat instances. They all get installed separately and its a pain in the 
arse to find the worker and worker mount files and merge in your settings
during installation.
So I've patched the ISAPI redirector to get the redirector to load it's 
properties from an ini file, with one ini file per filter.

It works like this :
1) You install the ISAPI filter DLL in a virtual directory.
2) In the same directory you put a properties file of the same name
(except for the extension)
i.e. /jakarta/isapi_redirect.dll and
/jakarta/isapi_redirect.ini
3) The ini file is a property file with exactly the same properties
as used to be put in the registry
i.e.
worker_file=C:\tomcat\conf\workers.properties
worker_mount_file=C:\tomcat\conf\uriworkermap.properties
log_level=error
log_file=C:\tomcat\logs\isapi_redirector.log
extension_uri=/jakarta/isapi_redirect.dll
4) The filter loads this ini file and gets its settings from it.
5) If the filter can't find the ini file it uses the registry (old
behaviour) == 1 ASAPI per machine.
6) You can then install another filter, with another ini file, and
not have the two conflict.
diffs follow 

One gotcha, the DLL needs shlwapi.dll for the PathRenameExtension (Ships in
IE 4.0)
If this is a problem then someone can hack the ini_file_name string to
overwrite the file extension ...
Also a flag and DEBUG print to indicate whether the ini file is being used
could be useful 


cheers

tim

-- src/native/iis/asapi.dsp ---
56c56
< # ADD LINK32 wsock32.lib advapi32.lib /nologo /dll /machine:I386
/out:"isapi_release/isapi_redirect.dll"
---
> # ADD LINK32 wsock32.lib advapi32.lib shlwapi.lib /nologo /dll
/machine:I386 /out:"isapi_release/isapi_redirect.dll"
82c82
< # ADD LINK32 wsock32.lib advapi32.lib /nologo /dll /debug /machine:I386
/out:"isapi_debug/isapi_redirect.dll" /pdbtype:sept
---
> # ADD LINK32 wsock32.lib advapi32.lib shlwapi.lib /nologo /dll /debug
/machine:I386 /out:"isapi_debug/isapi_redirect.dll" /pdbtype:sept


-- src/native/iis/jk_isapi_plugin.c ---

61a62,66
> #include 
> #include 
> #include 
> #include 
> 
121a127
> static char ini_file_name[_MAX_PATH];
614a621,629
>   if( GetModuleFileName( hInst, ini_file_name, sizeof( ini_file_name )
) ) {
>   if( !PathRenameExtension( ini_file_name, ".ini" ) ) {
>   fReturn = FALSE;
>   }
>   } else {
>   fReturn = FALSE;
>   }
> 
> 
621a637
> 
628a645,651
> jk_log(logger, JK_LOG_DEBUG, "Using log file %s.\n", log_file);
> jk_log(logger, JK_LOG_DEBUG, "Using log level %d.\n", log_level);
> jk_log(logger, JK_LOG_DEBUG, "Using extension uri %s.\n",
extension_uri);
> jk_log(logger, JK_LOG_DEBUG, "Using worker file %s.\n",
worker_file);
> jk_log(logger, JK_LOG_DEBUG, "Using worker mount file %s.\n",
worker_mount_file);
> 
> 
668a692
>   char *tmp;
669a694,735
> 
>   jk_map_t *map;
>   if( map_alloc( &map ) ) {
>   if( !map_read_properties( map, ini_file_name ) ) {
>   ok = JK_FALSE;
>   }
>   } else {
>   ok = JK_FALSE;
>   }
>   if( ok ) {
>   tmp = map_get_string( map, JK_LOG_FILE_TAG, NULL );
>   if(tmp) {
>   strcpy(log_file, tmp);
>   } else {
>   ok = JK_FALSE;
>   }
>   tmp = map_get_string( map, JK_LOG_LEVEL_TAG, NULL );
>   if(tmp) {
>   log_level = jk_parse_log_level(tmp);
>   } else {
>   ok = JK_FALSE;
>   }
>   tmp = map_get_string( map, EXTENSION_URI_TAG, NULL );
>   if(tmp) {
>   strcpy(extension_uri, tmp);
>   } else {
>   ok = JK_FALSE;
>   }
>   tmp = map_get_string( map, JK_WORKER_FILE_TAG, NULL );
>   if(tmp) {
>   strcpy(worker_file, tmp);
>   } else {
>   ok = JK_FALSE;
>   }
>   tmp = map_get_string( map, JK_MOUNT_FILE_TAG, NULL );
>   if(tmp) {
>   strcpy(worker_mount_file, tmp);
>   } else {
>   ok = JK_FALSE;
>   }
>   
>   } else {
725c791
< 
---
>   }




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/session SessionIdGenerator.java

2001-09-06 Thread costin

costin  01/09/06 21:52:18

  Modified:src/share/org/apache/tomcat/modules/session
SessionIdGenerator.java
  Log:
  Usefull for debugging session creation.
  
  Revision  ChangesPath
  1.6   +1 -0  
jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SessionIdGenerator.java
  
  Index: SessionIdGenerator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SessionIdGenerator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SessionIdGenerator.java   2001/08/21 05:38:24 1.5
  +++ SessionIdGenerator.java   2001/09/07 04:52:18 1.6
  @@ -145,6 +145,7 @@
if( state==ServerSession.STATE_NEW ) {
String jsIdent=req.getJvmRoute();
String newId=createNewId( jsIdent );
  + if(debug>0) log("Generate new session id " + newId );
sess.getId().setString( newId );
}
return state;
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/loggers AccessLogInterceptor.java

2001-09-06 Thread costin

costin  01/09/06 21:51:45

  Modified:src/share/org/apache/tomcat/modules/loggers
AccessLogInterceptor.java
  Log:
  Some requests may have no C-L header.
  
  Revision  ChangesPath
  1.4   +2 -3  
jakarta-tomcat/src/share/org/apache/tomcat/modules/loggers/AccessLogInterceptor.java
  
  Index: AccessLogInterceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/loggers/AccessLogInterceptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AccessLogInterceptor.java 2001/08/26 01:53:26 1.3
  +++ AccessLogInterceptor.java 2001/09/07 04:51:45 1.4
  @@ -235,9 +235,8 @@
fw.write(request.protocol().toString().trim());
break;
case 'b':
  - String cl=response.getMimeHeaders().
  - getHeader("Content-Length").toString();
  - fw.write(cl);
  + fw.write(response.getMimeHeaders().
  +  getHeader("Content-Length"));
break;
case 's':
fw.write(Integer.
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime PageContextImpl.java

2001-09-06 Thread costin

costin  01/09/06 21:39:31

  Modified:src/share/org/apache/jasper/runtime PageContextImpl.java
  Log:
  Fix for 3307, thanks to [EMAIL PROTECTED] for filling the bug _and_ making sure
  it is fixed by reopening it with a quote from spec :-)
  
  Submitted by: [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.22  +2 -0  
jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- PageContextImpl.java  2001/09/01 00:41:21 1.21
  +++ PageContextImpl.java  2001/09/07 04:39:31 1.22
  @@ -271,6 +271,7 @@
break;
   
default:
  + throw new IllegalArgumentException( "Invalid scope " + scope );
}
   }
   
  @@ -298,6 +299,7 @@
break;
   
default:
  + throw new IllegalArgumentException( "Invalid scope " + scope );
}
   }
   
  
  
  



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

2001-09-06 Thread costin

costin  01/09/06 21:35:27

  Modified:src/facade22/org/apache/tomcat/facade
Servlet22Interceptor.java
   src/share/org/apache/jasper/compiler JasperMangler.java
  Log:
  Minors - one extra debug ( usefull ) in S22, workaround for a common config error in
  jasper mangler.
  
  Revision  ChangesPath
  1.17  +2 -0  
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/Servlet22Interceptor.java
  
  Index: Servlet22Interceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/Servlet22Interceptor.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Servlet22Interceptor.java 2001/08/12 02:00:23 1.16
  +++ Servlet22Interceptor.java 2001/09/07 04:35:27 1.17
  @@ -188,6 +188,8 @@
Object value = sess.getAttribute(key);
   
if( value instanceof  HttpSessionBindingListener) {
  + if( debug > 0 )
  + log("valueUnbound " + sess.getId() + " " + key );
((HttpSessionBindingListener) value).valueUnbound
(new HttpSessionBindingEvent(httpSess , key));
if( removed==null) removed=new Vector();
  
  
  
  1.7   +2 -2  
jakarta-tomcat/src/share/org/apache/jasper/compiler/JasperMangler.java
  
  Index: JasperMangler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JasperMangler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JasperMangler.java2001/08/03 02:39:23 1.6
  +++ JasperMangler.java2001/09/07 04:35:27 1.7
  @@ -241,12 +241,12 @@
if( lastComp > 0 )
baseClassN=jspFile.substring( lastComp+1 );
else
  - baseClassN=jspFile.substring( 1 );
  + baseClassN=jspFile.substring( 0 );
} else {
if( lastComp > 0 )
baseClassN=jspFile.substring( lastComp+1, extIdx );
else
  - baseClassN=jspFile.substring( 1, extIdx );
  + baseClassN=jspFile.substring( 0, extIdx );
}
   
if( JavaGeneratorTool.isKeyword( baseClassN ) )
  
  
  



Re: WG: worker.properties swallows my first worker (mod_jk)

2001-09-06 Thread cmanolache

Hi,

Just closed your bug report, please let me know if it solves your problem
:-)

Costin

On Thu, 6 Sep 2001, Hans Schmid wrote:

> Hi,
>
> just filed a bug on Larrys request
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3467
>
> Thanks for looking into this one.
>
> Cheers,
> Hans
>
>
> -Ursprüngliche Nachricht-
> Von: Larry Isaacs [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 6. September 2001 19:39
> An: '[EMAIL PROTECTED]'
> Betreff: RE: worker.properties swallows my first worker (mod_jk)
>
>
> Hi Hans,
>
> The answers to your questions are:
>
> 1.) Why gets this hardcoded worker on port 8007 created?
>
> Don't know, I will investigate.
>
> 2.) Is this a Bug I shall report?
>
>Yes, and please attache the workers.properties in question.
>
> Thanks.
>
> Larry
>
>
> > -Original Message-
> > From: Hans Schmid [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 06, 2001 12:57 PM
> > To: Tomcat-User
> > Subject: worker.properties swallows my first worker (mod_jk)
> >
> >
> > Hello,
> >
> > This is about mod_jk in Tomcat 3.3b1 on Solaris with Apache 1.3.19
> >
> > It seems to me that the first worker found in the worker.list
> > always gets
> > created as ajp12 on port 8007
> > regardless what i configure.
> >
> > The following worker.list entry
> > worker.list=worker.list=ajp12-01, ajp12-02, ajp13-01, ajp13-02
> >
> > produces 4 workers:
> > ajp12-01 on port 8007  ajp12
> > ajp12-02 on port 9017  ajp12
> > ajp13-01 on port 9009  ajp13
> > ajp13-02 on port 9019  ajp13
> >
> > instead of the expected:
> > ajp12-01 on port 9007  ajp12
> > ajp12-02 on port 9017  ajp12
> > ajp13-01 on port 9009  ajp13
> > ajp13-02 on port 9019  ajp13
> >
> > Please note the ajp12-01 worker points to port 8007 instead of 9007.
> >
> > When I put a space in front of the first worker I get my
> > expected 4 workers
> > pointing to the correct ports
> > plus a 5th worker ('' on port 8007)
> >
> >
> > The following entry in workers.properties
> > worker.list=worker.list= ajp12-01, ajp12-02, ajp13-01, ajp13-02
> >
> > produces 5 workers instead of 4
> > Please note the port 8007 for the first worker named
> > worker.list= of ajp12
> > I do not have a worker assigned to this port (greped through
> > all config
> > files).
> >
> >
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (207)]: Into
> > build_worker_map,
> > creating 5 workers
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
> > build_worker_map, creating
> > worker worker.list=
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]:
> > wc_create_worker, about to
> > create instance worker.list= of ajp12
> > [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
> > ajp12_worker_factory
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]:
> > wc_create_worker, about to
> > validate and init worker.list=
> > [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
> > jk_worker_t::validate
> > [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
> > jk_worker_t::validate for worker worker.list= contact is
> > localhost:8007
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]:
> > wc_create_worker, done
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]:
> > build_worker_map, removing
> > old worker.list= worker
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
> > build_worker_map, creating
> > worker ajp12-01
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]:
> > wc_create_worker, about to
> > create instance ajp12-01 of ajp12
> > [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
> > ajp12_worker_factory
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]:
> > wc_create_worker, about to
> > validate and init ajp12-01
> > [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
> > jk_worker_t::validate
> > [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
> > jk_worker_t::validate for worker ajp12-01 contact is localhost:9007
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]:
> > wc_create_worker, done
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]:
> > build_worker_map, removing
> > old ajp12-01 worker
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
> > build_worker_map, creating
> > worker ajp12-02
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]:
> > wc_create_worker, about to
> > create instance ajp12-02 of ajp12
> > [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
> > ajp12_worker_factory
> > [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]:
> > wc_create_worker, about to
> > validate and init ajp12-02
> > [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
> > jk_worker_t::validate
> > [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
> > jk_worker_t::validate for worker ajp12-02 contact is localhost:9017
> > [Thu Sep 06 18:26:17 

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/depend DependClassLoader.java

2001-09-06 Thread costin

costin  01/09/06 21:25:20

  Modified:.build.xml
   src/admin/WEB-INF/classes/tadm AntTag.java
   src/share/org/apache/tomcat/startup EmbededTomcat.java
Main.java
   src/share/org/apache/tomcat/util/compat Jdk11Compat.java
   src/share/org/apache/tomcat/util/depend
DependClassLoader.java
  Log:
  Excelent patch provided by [EMAIL PROTECTED], restoring JDK1.1 support ( 
except one
  issue in DCL ).
  
  I'm still looking into the cause of what James describes ( the loading problems), if 
you
  have some traces I would be very interested to look at.
  
  Submitted by: [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.151 +4 -1  jakarta-tomcat/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/build.xml,v
  retrieving revision 1.150
  retrieving revision 1.151
  diff -u -r1.150 -r1.151
  --- build.xml 2001/08/24 01:09:31 1.150
  +++ build.xml 2001/09/07 04:25:20 1.151
  @@ -298,7 +298,10 @@
 
 
 
  -  
  +  
  +  
 
   
   = c ));
   return null;
   }
   
  
  
  
  1.8   +10 -3 
jakarta-tomcat/src/share/org/apache/tomcat/util/depend/DependClassLoader.java
  
  Index: DependClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/depend/DependClassLoader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DependClassLoader.java2001/08/22 04:44:50 1.7
  +++ DependClassLoader.java2001/09/07 04:25:20 1.8
  @@ -164,9 +164,6 @@
   String classFileName = name.replace('.', '/' ) + ".class";
   
URL res=getResource( classFileName );
  - InputStream is=getResourceAsStream( classFileName );
  - if( res==null || is==null ) 
  - throw new ClassNotFoundException(name);
   
// If it's in parent2, load it ( we'll not track sub-dependencies ).
try {
  @@ -180,6 +177,16 @@
} catch (Exception e) {
c = null;
}
  +
  + if( res==null ) 
  + throw new ClassNotFoundException(name);
  +
  + // This should work - SimpleClassLoader should be able to get
  + // resources from jar files. 
  + InputStream is=getResourceAsStream( classFileName );
  + if( is==null ) 
  + throw new ClassNotFoundException(name);
  +
   
// It's in our parent. Our task is to track all class loads, the parent
// should load anything ( otherwise the deps are lost ), but just resolve
  
  
  



Re: xsl by extension

2001-09-06 Thread cmanolache

On Fri, 7 Sep 2001, Pier Fumagalli wrote:

> Of course none of this is portable across servlet containers, but we seem to
> easily forget about that :) Being Tomcat the Reference Implementation, as an
> ASF member, and Servlet JSR member, I'll never stop stressing out that IMNSO
> relying on container-specific features IS to any extent WRONG unless this
> can not in ANY WAY done otherwise.

Implementing container-specific features ( like support for XSP ) without
using container specific APIs is WRONG. Is like saying people shouldn't
write Apache modules, but use only CGIs.

I do agree that XSP is not standardized in any way - it's just a
(nice) feature provided by resin. So I'll be as -1 on adding this feature
( or CGI support, for this matter :-) to tomcat3.3, the reference
implementation.

However people embedding tomcat may add whatever modules they need, and
one of the goals of 3.3 was to make sure modules have the necesary power
to do that in an efficient way.

Costin




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

2001-09-06 Thread remm

remm01/09/06 21:13:42

  Modified:.RELEASE-PLAN-4.0.txt
  Log:
  - Updated bug status.
  - Reclassified some of the unconfirmed bugs as Catalina bugs
(3009 and 3336).
  
  Revision  ChangesPath
  1.9   +6 -10 jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt
  
  Index: RELEASE-PLAN-4.0.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RELEASE-PLAN-4.0.txt  2001/09/07 01:01:01 1.8
  +++ RELEASE-PLAN-4.0.txt  2001/09/07 04:13:42 1.9
  @@ -1,4 +1,4 @@
  -$Id: RELEASE-PLAN-4.0.txt,v 1.8 2001/09/07 01:01:01 craigmcc Exp $
  +$Id: RELEASE-PLAN-4.0.txt,v 1.9 2001/09/07 04:13:42 remm Exp $
   
 Release Plan for Apache Tomcat 4.0
 ==
  @@ -50,8 +50,13 @@
   (Not a spec issue, so likely to be downgraded to
   "enhancement request")
   
  +Catalina3009Manager cannot install web app
  +
   Catalina3292Class reloading fails (awaiting test case)
   
  +Catalina3336ArrayIndexOutOfBounds exception when starting and stopping
  +an app several times through Manager
  +
   Connectors  1788mod_webapp errors on Win2k
   
   Connectors  2997Webapp connector should recover when Tomcat is restarted
  @@ -72,22 +77,13 @@
   
   Jasper  3398Jasper does not support primitive types for tag variables
   
  -Webapps 3009Manager cannot install web app
  -
  -Webapps 3336ArrayIndexOutOfBounds exception when starting and stopping
  -an app several times through Manager
  -
  -Webapps 3383CompressionFilter problem in Catalina
   
  -
   Nice To Have Fixes Before Final Release:
   ---
   
   Catalina3114Spanish translations of LocalString.properties files
   
   Catalina3194Javadoc errors during build
  -
  -Catalina3434NT/2K Service installation on JDK 1.4 b2 fails 
   
   Jasper  3055 tag ignores the name attribute
   
  
  
  



cvs commit: jakarta-tomcat-4.0 tomcat.nsi

2001-09-06 Thread remm

remm01/09/06 20:50:03

  Modified:.tomcat.nsi
  Log:
  - Fixes problems with JDK 1.4 installing the NT service.
  - Also fix a bug where the service was incorrectly installed if the path to the JDK
contained a path.
  - The installer now uses the JRE for everything, but still needs to copy tools.jar
from the JDK.
  - Fixes bug 3445, reported by Dylan Schell .
  
  Revision  ChangesPath
  1.14  +6 -6  jakarta-tomcat-4.0/tomcat.nsi
  
  Index: tomcat.nsi
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/tomcat.nsi,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- tomcat.nsi2001/08/29 01:28:50 1.13
  +++ tomcat.nsi2001/09/07 03:50:03 1.14
  @@ -1,6 +1,6 @@
   
   ; Tomcat 4 script for Nullsoft Installer
  -; $Id: tomcat.nsi,v 1.13 2001/08/29 01:28:50 remm Exp $
  +; $Id: tomcat.nsi,v 1.14 2001/09/07 03:50:03 remm Exp $
   
   Name "jakarta-tomcat-4.0"
   Caption "Jakarta Tomcat 4.0"
  @@ -63,13 +63,13 @@
   
 SectionIn 3
   
  -  ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"
  -  ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$1" "JavaHome"
  +  ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
  +  ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$1" "RuntimeLib"
 
 SetOutPath $INSTDIR\bin
 File /oname=tomcat.exe bin\tomcat.exe
 
  -  ExecWait '"$INSTDIR\bin\tomcat.exe" -install "Jakarta Tomcat" 
$2\jre\bin\hotspot\jvm.dll -Djava.class.path="$INSTDIR\bin\bootstrap.jar" 
-Duser.dir="$INSTDIR" -start org.apache.catalina.startup.BootstrapService -params 
start -stop org.apache.catalina.startup.BootstrapService -params stop -out 
"$INSTDIR\logs\stdout.log" -err "$INSTDIR\logs\stderr.log"'
  +  ExecWait '"$INSTDIR\bin\tomcat.exe" -install "Jakarta Tomcat" "$2" 
-Djava.class.path="$INSTDIR\bin\bootstrap.jar" -Duser.dir="$INSTDIR" -start 
org.apache.catalina.startup.BootstrapService -params start -stop 
org.apache.catalina.startup.BootstrapService -params stop -out 
"$INSTDIR\logs\stdout.log" -err "$INSTDIR\logs\stderr.log"'
 
 ClearErrors
   
  @@ -98,8 +98,8 @@
   
 SectionIn 1 2 3
   
  -  ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion"
  -  ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$1" "JavaHome"
  +  ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
  +  ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$1" "JavaHome"
   
 SetOutPath "$SMPROGRAMS\Jakarta Tomcat 4.0"
   
  
  
  



Re: xsl by extension

2001-09-06 Thread Pier Fumagalli

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

> Another ( and better ) solution - extend JspInterceptor ( well, the code
> needs some cleanup - again I would recomend you do that in j34 workspace
> ).
> 
> Then you can add the dependencies and avoid any overhead - your XSP pages
> will run as fast as a servlet, without any extra dispatching or
> intermediary servlet.
> 
> BTW, I'm happy I'm not alone on xsl and jasper :-)
> 
> Let me know if I can help.

Of course none of this is portable across servlet containers, but we seem to
easily forget about that :) Being Tomcat the Reference Implementation, as an
ASF member, and Servlet JSR member, I'll never stop stressing out that IMNSO
relying on container-specific features IS to any extent WRONG unless this
can not in ANY WAY done otherwise.

One alternative I might be suggesting is Cocoon, which is fully portable
across platforms, and deals with XML data more or less in the way that Javi
needs to, but also that somehow is tricky, as you might get tied to the
Cocoon architecture.

Remember, never get down to compromises with your container unless you're
forced to, and absolutely ready to be tied to that particular container for
a very long time (I could understand sticking to Cocoon, since it runs in
any servlet container, I wouldn't be so sure for certain Servlet API
extensions, such as interceptors in TC3.x, or Valves -for what that matters-
in TC4.x)...

That's just my 0.02$, but wearing the hats I'm wearing, I believe I'm fairly
on the fair side here...

Pier




Re: xsl by extension

2001-09-06 Thread cmanolache

Another ( and better ) solution - extend JspInterceptor ( well, the code
needs some cleanup - again I would recomend you do that in j34 workspace
).

Then you can add the dependencies and avoid any overhead - your XSP pages
will run as fast as a servlet, without any extra dispatching or
intermediary servlet.

BTW, I'm happy I'm not alone on xsl and jasper :-)

Let me know if I can help.

Costin




Re: xsl by extension

2001-09-06 Thread cmanolache

> > Thanks, craig, but i'm working with version 3.3. ¿isn't any
> > alternative avalaible?
>
> Nope ... if you map your extension to your servlet, you cannot also map it
> to the JSP servlet.

Of course there are alternative :-)

The easiest - have your xsp generate 'plain' jsp files, and redirect.

Jasper doesn't support 'streams' anyway ( i.e. it can't process a stream,
only a file or resource ), so you'll need a file with the current jasper (
or some very sophisticated tricks ). I doubt filters could help in any
way ( at least with the current jasper ).


Changing jasper to better work with this model is one of my goals in
jasper34, it was a long discussion about using XSLT on jasper -
unfortunately most people around didn't liked it.

What I'm going to do is make sure j34 is modular enough and has the right
hooks to allow someone to hook it with xslt ( or anything else for that
matter !!!). I'm working ( very slow speed - as finishing 3.3 is the top
priority ) on changing jasper to use SAX events, have a clean API, etc.
You are more then welcomed to help - as this would be the right solution
for your problem ( IMHO ).

But generating the files is a decent solution as well.


Costin




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

2001-09-06 Thread remm

remm01/09/06 18:23:25

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java
  Log:
  - Should make the classloading fully thread safe (apparently synchronizing on
the defineClass is not enough).
  - The critical path of findResourceInternal or findClassInternal should not be
synchronized for performance reasons, because it is called very often (unlike
the call to defineClass which only happens once).
  - I assume Peter will tell me it still doesn't work (in which case I would appreciate
a test case) ;-)
  
  Revision  ChangesPath
  1.14  +23 -9 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- WebappClassLoader.java2001/08/28 18:12:37 1.13
  +++ WebappClassLoader.java2001/09/07 01:23:25 1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.13 2001/08/28 18:12:37 remm Exp $
  - * $Revision: 1.13 $
  - * $Date: 2001/08/28 18:12:37 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
 1.14 2001/09/07 01:23:25 remm Exp $
  + * $Revision: 1.14 $
  + * $Date: 2001/09/07 01:23:25 $
*
* 
*
  @@ -123,7 +123,7 @@
*
* @author Remy Maucherat
* @author Craig R. McClanahan
  - * @version $Revision: 1.13 $ $Date: 2001/08/28 18:12:37 $
  + * @version $Revision: 1.14 $ $Date: 2001/09/07 01:23:25 $
*/
   public class WebappClassLoader
   extends URLClassLoader
  @@ -1482,11 +1482,17 @@
   }
   
   synchronized(this) {
  -clazz = defineClass(name, entry.binaryContent, 0,
  -entry.binaryContent.length, codeSource);
  +// Since all threads use the same ResourceEntry instance, it is
  +// the one which will contain the class
  +if (entry.loadedClass == null) {
  +clazz = defineClass(name, entry.binaryContent, 0,
  +entry.binaryContent.length, codeSource);
  +entry.loadedClass = clazz;
  +} else {
  +clazz = entry.loadedClass;
  +}
   }
   
  -entry.loadedClass = clazz;
   
   return clazz;
   
  @@ -1635,8 +1641,16 @@
   entry.binaryContent = binaryContent;
   
   // Add the entry in the local resource repository
  -synchronized (resourceEntries) {
  -resourceEntries.put(name, entry);
  +synchronized (this) {
  +// Ensures that all the threads which may be in a race to load
  +// a particular class all end up with the same ResourceEntry
  +// instance
  +ResourceEntry entry2 = (ResourceEntry) resourceEntries.get(name);
  +if (entry2 == null) {
  +resourceEntries.put(name, entry);
  +} else {
  +entry = entry2;
  +}
   }
   
   return entry;
  
  
  



Re: cvs commit: jakarta-tomcat-connectors/webapp/apache-2.0 mod_webapp.c

2001-09-06 Thread Pier Fumagalli

"Justin Erenkrantz" <[EMAIL PROTECTED]> wrote:

> On Fri, Sep 07, 2001 at 01:52:50AM +0100, Pier Fumagalli wrote:
>> Since there is no official release of httpd-2.0, I am confident that nobody
>> will actually care unless they're testing something... And by "testing" good
>> practice says "get the HEAD of CVS and try it out yourself if it doesn't
>> work". Development happens on "head" and if someone forks off for a little
>> while to do some porting to some weird operating systems, at the end those
>> changes will have to be integrated with HEAD, so, there's no point in
>> sticking with backward compatibility AT THIS POINT.
> 
> +1 to what Pier said.  (Ryan may chip in here too...)

Yeah, I would like to hear what he thinks...

> If you are using anything other than HEAD for httpd-2.0, I don't
> care much about any bug reports you may have.  The odds are that it'd
> either be fixed or broken in a different manner.  =)

You would have not better explained my thoughts in a better way...

> -- justin

Who I respect so much after he committed that patch to get rid of MM un APR
land, and saved me at least 2 headaches :) :) :) :)

Pier




Re: cvs commit: jakarta-tomcat-connectors/webapp/apache-2.0 mod_w ebapp.c

2001-09-06 Thread Justin Erenkrantz

On Fri, Sep 07, 2001 at 01:52:50AM +0100, Pier Fumagalli wrote:
> Since there is no official release of httpd-2.0, I am confident that nobody
> will actually care unless they're testing something... And by "testing" good
> practice says "get the HEAD of CVS and try it out yourself if it doesn't
> work". Development happens on "head" and if someone forks off for a little
> while to do some porting to some weird operating systems, at the end those
> changes will have to be integrated with HEAD, so, there's no point in
> sticking with backward compatibility AT THIS POINT.

+1 to what Pier said.  (Ryan may chip in here too...)

If you are using anything other than HEAD for httpd-2.0, I don't 
care much about any bug reports you may have.  The odds are that it'd
either be fixed or broken in a different manner.  =)  -- justin




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

2001-09-06 Thread craigmcc

craigmcc01/09/06 18:01:01

  Modified:.RELEASE-PLAN-4.0.txt
   jasper/src/share/org/apache/jasper/compiler
XmlOutputter.java
  Log:
  Fix bugs in the generation of the XML view of a JSP page that caused
  duplicate  elements (or attributes) under some circumstances.
  
  PR:  Bugzilla #3174 and 3351
  Submitted by: Mark [EMAIL PROTECTED]
  Reviewed by:  Kin-Man Chung <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.8   +1 -9  jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt
  
  Index: RELEASE-PLAN-4.0.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RELEASE-PLAN-4.0.txt  2001/09/07 00:18:49 1.7
  +++ RELEASE-PLAN-4.0.txt  2001/09/07 01:01:01 1.8
  @@ -1,4 +1,4 @@
  -$Id: RELEASE-PLAN-4.0.txt,v 1.7 2001/09/07 00:18:49 craigmcc Exp $
  +$Id: RELEASE-PLAN-4.0.txt,v 1.8 2001/09/07 01:01:01 craigmcc Exp $
   
 Release Plan for Apache Tomcat 4.0
 ==
  @@ -66,17 +66,9 @@
   
   Jasper  3127 not supported
   
  -Jasper  3174XML view of JSP document is incorrect
  -
   Jasper  3235JSPC command line compiler does not support taglibs
   
   Jasper  3350Using XML syntax causes content rearrangement
  -
  -Jasper  3351JSP documents in XML syntax produce invalid XML
  -
  -Jasper  3366Character tag attributes
  -
  -Jasper  3381Tag attributes of type short not working
   
   Jasper  3398Jasper does not support primitive types for tag variables
   
  
  
  
  1.16  +10 -13
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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- XmlOutputter.java 2001/07/25 01:49:10 1.15
  +++ XmlOutputter.java 2001/09/07 01:01:01 1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
 1.15 2001/07/25 01:49:10 craigmcc Exp $
  - * $Revision: 1.15 $
  - * $Date: 2001/07/25 01:49:10 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
 1.16 2001/09/07 01:01:01 craigmcc Exp $
  + * $Revision: 1.16 $
  + * $Date: 2001/09/07 01:01:01 $
*
* 
*
  @@ -94,7 +94,7 @@
   
   /*
* Tells the nesting level of  tags encountered
  - * in the translation unit.
  + * in the translation unit.  This is currently unused.
*/
   private int jspRootLevel = 0;
   
  @@ -121,15 +121,16 @@
* A translation unit (JSP source file and any files included via 
* the include directive) may encounter multiple 
* tags. This method cumulates all attributes for the
  - *  tag.
  + *  tag.  It also ignores any xmlns:jsp and version
  + * attributes, in favor of the one generated by the compiler.
*/
   void addRootAttrs(Attributes attrs) {
jspRootLevel++;
   int attrsLength = attrs.getLength();
   for (int i = 0; i < attrsLength; i++) {
String qName = attrs.getQName(i);
  - if (attrs.getQName(i).startsWith("xmlns:jsp") 
  - && jspRootLevel > 1) continue; 
  +if ((qName.startsWith("xmlns:jsp") ||
  + qName.equals("version"))) continue;
   rootAttrs.addAttribute(attrs.getURI(i), attrs.getLocalName(i),
   attrs.getQName(i), attrs.getType(i), attrs.getValue(i));
   }
  @@ -144,14 +145,11 @@
   
   
   /*
  - * Only put the  tag when we're dealing
  - * with the top level 'container' page.
  + * Don't append the root end tag here because the
  + * getPageData method will append it later.
*/
   void rootEnd() {
jspRootLevel--;
  - if (jspRootLevel == 0) {
  - append("jsp:root");
  - }
   }
   
   /**
  @@ -262,7 +260,6 @@
   PageData getPageData() {
StringBuffer buff = new StringBuffer();
   AttributesImpl attrs = new AttributesImpl();
  -
   
   append("jsp:root", rootAttrs, buff, false);
buff.append(sb.toString());
  
  
  



Re: cvs commit: jakarta-tomcat-connectors/webapp/apache-2.0 mod_webapp.c

2001-09-06 Thread Pier Fumagalli

"GOMEZ Henri" <[EMAIL PROTECTED]> wrote:
> 
> I didn't agree with that Pier, we must try to keep compatibility
> with previous release of Apache 2.0, since there IS STILL NO
> official release.
> 
> Many users are still using Apache 2.0.24-alpha (including myself),
> or even 2.0.18-beta (including IBM iSeries team porting Apache 2.0).

Since there is no official release of httpd-2.0, I am confident that nobody
will actually care unless they're testing something... And by "testing" good
practice says "get the HEAD of CVS and try it out yourself if it doesn't
work". Development happens on "head" and if someone forks off for a little
while to do some porting to some weird operating systems, at the end those
changes will have to be integrated with HEAD, so, there's no point in
sticking with backward compatibility AT THIS POINT.

I could stick with the "last official tarball" since that's an easy piece of
thing to download. So, if the latest version is 2.0.18 alpha (don't even
know since I use HEAD), I could agree to have some ifdefs in the code to
cope with the differences between "latest tarball" and "head".

All this, of course, UNTIL an official final version comes out, that's when
I'll start caring about backward compatibility.

That's my idea, but I would love to hear the other contributors to the
WebApp module to tell me what they think, Ryan, J.F., Colin, Thom...

> Let avoid questions in user-list asking about which version of
> Apache 2.0 to be used, or why we couldn't compile the module
> against a running (even if obsolete) Apache 2.0

Like, you've answered a lot of questions on tomcat-user about the WebApp
module :) :) :) That's a task I'm handling, and I believe I've been pretty
good at. There's no unanswered question on the WebApp module on the users
list. (In comparison to...)

> That's a part of the problem in mod_webapp with APR.

Choosing APR has been my decision from the beginning. If you guys didn't
want to do it, why not voting -1 when I dropped the code in CVS? Now it's
there, I believe it's good. You might not like it, as I don't like what
you're doing, but, hey, we're forced to coexist on the same mailing list.

So, as I don't piss you off on what you're doing, please, you do the same.
:) :) :) :) :)

Thanks...

Pier




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

2001-09-06 Thread craigmcc

craigmcc01/09/06 17:18:49

  Modified:.RELEASE-PLAN-4.0.txt
   jasper/src/share/org/apache/jasper/compiler
TagBeginGenerator.java
  Log:
  Fix two bugs in the generated code for custom tag attributes:
  * If the property type is char or Character, correctly deal with a single
character string to be converted.
  * If the property type is short, correctly include a cast in the
generated string value.
  
  PR: Bugzilla #3366 and #3381
  Submitted by: Simon Brown <[EMAIL PROTECTED]>
  Reviewed by:  Kin-Man Chung <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.7   +3 -5  jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt
  
  Index: RELEASE-PLAN-4.0.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RELEASE-PLAN-4.0.txt  2001/09/06 20:10:29 1.6
  +++ RELEASE-PLAN-4.0.txt  2001/09/07 00:18:49 1.7
  @@ -1,4 +1,4 @@
  -$Id: RELEASE-PLAN-4.0.txt,v 1.6 2001/09/06 20:10:29 craigmcc Exp $
  +$Id: RELEASE-PLAN-4.0.txt,v 1.7 2001/09/07 00:18:49 craigmcc Exp $
   
 Release Plan for Apache Tomcat 4.0
 ==
  @@ -95,10 +95,6 @@
   
   Catalina3194Javadoc errors during build
   
  -Catalina3285Tomcat 4.0-b5 class loader fails on IBM JDK
  -
  -Catalina3293Allow content lengths > 2^31
  -
   Catalina3434NT/2K Service installation on JDK 1.4 b2 fails 
   
   Jasper  3055 tag ignores the name attribute
  @@ -125,6 +121,8 @@
   Catalina2570Add ability to configure a default error handler
   
   Catalina2823Allow a  inside 
  +
  +Catalina3293Allow content lengths > 2^31
   
   Jasper  2500FileNotFoundException unintentionally caught
   
  
  
  
  1.15  +3 -3  
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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TagBeginGenerator.java2001/07/23 19:57:32 1.14
  +++ TagBeginGenerator.java2001/09/07 00:18:49 1.15
  @@ -260,7 +260,7 @@
   return "new Byte((byte)" + Byte.valueOf(s).toString() + ")";
   } else if (c == char.class) {
   // non-normative, because a normative method would fail to compile
  -if (s.length() > 1) {
  +if (s.length() > 0) {
   char ch = s.charAt(0);
   // this trick avoids escaping issues
   return "((char) " + (int) ch + ")";
  @@ -271,7 +271,7 @@
   }
   } else if (c == Character.class) {
   // non-normative, because a normative method would fail to compile
  -if (s.length() > 1) {
  +if (s.length() > 0) {
   char ch = s.charAt(0);
   // this trick avoids escaping issues
   return "new Character((char) " + (int) ch + ")";
  @@ -293,7 +293,7 @@
   } else if (c == Integer.class) {
   return "new Integer(" + Integer.valueOf(s).toString() + ")";
   } else if (c == short.class) {
  -return Short.valueOf(s).toString();
  +return "((short) " + Short.valueOf(s).toString() + ")";
   } else if (c == Short.class) {
   return "new Short(" + Short.valueOf(s).toString() + ")";
   } else if (c == long.class) {
  
  
  



[PATCH] only parse workers.properties once

2001-09-06 Thread Ryan Bloom


This is an improvement for mod_jk, to only parse workers.properties once
on platforms that use fork().  Most platforms will not require us to read
the workers.properties file in the child process, because they process it in
the parent.  Windows is the only platform I know of today that does require
us to read it twice.

This also has the advantage, that the workers.properties file does not need
to be readable by the user that the web server is running as.

Ryan

Index: mod_jk.c
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
retrieving revision 1.23
diff -u -d -b -w -u -r1.23 mod_jk.c
--- mod_jk.c2001/09/06 17:00:54 1.23
+++ mod_jk.c2001/09/06 21:54:01
@@ -1214,6 +1214,7 @@
 return overrides;
 }
 
+#ifdef WIN32
 /** Standard apache callback, initialize jk.
  */
 static void jk_child_init(apr_pool_t *pconf, 
@@ -1224,6 +1225,7 @@
 
 init_jk( pconf, conf, s );
 }
+#endif
 
 /** Initialize jk, using worker.properties. 
 We also use apache commands ( JkWorker, etc), but this use is 
@@ -1340,7 +1342,9 @@
 {
 ap_hook_handler(jk_handler, NULL, NULL, APR_HOOK_MIDDLE);
 ap_hook_post_config(jk_post_config,NULL,NULL,APR_HOOK_MIDDLE);
+#ifdef WIN32
 ap_hook_child_init(jk_child_init,NULL,NULL,APR_HOOK_MIDDLE);
+#endif
 ap_hook_translate_name(jk_translate,NULL,NULL,APR_HOOK_FIRST);
 #if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
 ap_hook_map_to_storage(jk_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);


__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: xsl by extension

2001-09-06 Thread Craig R. McClanahan



On Thu, 6 Sep 2001, javi . wrote:

> Date: Thu, 06 Sep 2001 21:45:46 +
> From: javi . <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Re: xsl by extension
>
> Thanks, craig, but i'm working with version 3.3. ¿isn't any
> alternative avalaible?

Nope ... if you map your extension to your servlet, you cannot also map it
to the JSP servlet.

> it seems it should be a quite common
> problem...
>

That's why filters were added in servlet 2.3 :-).

> jv
>

Craig


>
> >From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: <[EMAIL PROTECTED]>
> >Subject: Re: xsl by extension
> >Date: Thu, 6 Sep 2001 14:37:43 -0700 (PDT)
> >
> >In a servlet 2.3 environment (i.e. Tomcat 4) you can do this sort of thing
> >with a Filter.  You would map *.xtp to the JSP servlet, and then apply
> >your filter as well to the response.
> >
> >Craig
> >
> > >
> > > i'm trying to add to tomcat a nice feature of resin:
> > > automatically apply a xsl transformation over all files
> > > with .xtp extension (xml templates).
> > >
> > > i've already done it, simply associating that extension
> > > to my servlet. the servlet read the xsl path
> > > from the .xtp itself.
> > >
> > > the problem is that i want to allow the jsp code in the
> > > xtp file to be executed, so i must retrieve it via http and not from
> > > the os file system... but when i do it, of course, my
> > > xtp servlet catch de call and began a recursive loop!
> > >
>
>
> _
> Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp
>
>




Ajp13 threads

2001-09-06 Thread Adrian Almenar

i would like to monitor how many threads is tomcat with ajp13 using when
working toghether with apache ?


Thanks  in advance,

Adrian Almenar




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs realm-howto.xml

2001-09-06 Thread ccain

ccain   01/09/06 16:06:43

  Modified:webapps/tomcat-docs realm-howto.xml
  Log:
  Typo correction.
  
  Revision  ChangesPath
  1.2   +1 -1  jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml
  
  Index: realm-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/realm-howto.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- realm-howto.xml   2001/09/06 03:43:12 1.1
  +++ realm-howto.xml   2001/09/06 23:06:43 1.2
  @@ -129,7 +129,7 @@
   
   JDBCRealm is an implementation of the Tomcat 4
   Realm interface that looks up users in a relational database
  -accessed via a JDBC driver.  There is substantial conviguration flexibility
  +accessed via a JDBC driver.  There is substantial configuration flexibility
   that lets you adapt to existing table and column names, as long as your
   database structure conforms to the following requirements:
   
  
  
  



cvs commit: jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/compressionFilters CompressionFilter.java CompressionResponseStream.java CompressionServletResponseWrapper.java

2001-09-06 Thread remm

remm01/09/06 16:05:08

  Modified:webapps/examples/WEB-INF/classes/compressionFilters
CompressionFilter.java
CompressionResponseStream.java
CompressionServletResponseWrapper.java
  Log:
  - Fixes various issues with the compression filter, including:
- don't set content length (fixes problems with static content)
- close the writer retrieved with getWriter()
- remove some unnecessary flushes
  - The filter could still be improved in a lot of ways, including:
- being smarter with the content length (it could be set when not in
  compression mode)
- only compress text data (I don't think that is implemented at the moment)
  
  Revision  ChangesPath
  1.5   +9 -5  
jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java
  
  Index: CompressionFilter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CompressionFilter.java2001/09/06 04:18:53 1.4
  +++ CompressionFilter.java2001/09/06 23:05:08 1.5
  @@ -1,8 +1,8 @@
   /*
* CompressionFilter.java
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java,v
 1.4 2001/09/06 04:18:53 amyroh Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/09/06 04:18:53 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilter.java,v
 1.5 2001/09/06 23:05:08 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/09/06 23:05:08 $
*
* 
*
  @@ -80,7 +80,7 @@
* the ServletResponse if it is bigger than a threshold.
*
* @author Amy Roh
  - * @version $Revision: 1.4 $, $Date: 2001/09/06 04:18:53 $
  + * @version $Revision: 1.5 $, $Date: 2001/09/06 23:05:08 $
*/
   
   public class CompressionFilter implements Filter{
  @@ -194,7 +194,11 @@
   if (debug > 0) {
   System.out.println("doFilter gets called with compression");
   }
  -chain.doFilter(request, wrappedResponse);
  +try {
  +chain.doFilter(request, wrappedResponse);
  +} finally {
  +wrappedResponse.finishResponse();
  +}
   return;
   }
   }
  
  
  
  1.4   +17 -20
jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java
  
  Index: CompressionResponseStream.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CompressionResponseStream.java2001/09/06 04:18:54 1.3
  +++ CompressionResponseStream.java2001/09/06 23:05:08 1.4
  @@ -1,8 +1,8 @@
   /*
* CompressionResponseStream.java
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java,v
 1.3 2001/09/06 04:18:54 amyroh Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/09/06 04:18:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java,v
 1.4 2001/09/06 23:05:08 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/09/06 23:05:08 $
*
* 
*
  @@ -76,7 +76,7 @@
* the CompressionServletResponseWrapper implementation.
*
* @author Amy Roh
  - * @version $Revision: 1.3 $, $Date: 2001/09/06 04:18:54 $
  + * @version $Revision: 1.4 $, $Date: 2001/09/06 23:05:08 $
*/
   
   public class CompressionResponseStream
  @@ -177,17 +177,22 @@
*/
   public void close() throws IOException {
   
  +//System.out.println("close() @ CompressionResponseStream");
   if (closed)
  - throw new IOException("This output stream has already been closed");
  +throw new IOException("This output stream has already been closed");
   
  -flush();
  -
  -if (gzipstream!=null) {
  +if (gzipstream != null) {
  +flushToGZip();
   gzipstream.close();
  +} else {
  +if (bufferCount > 0) {
  +output.write(buffer, 0, bufferCount);
  +bufferCount = 0;
  +}
   }
   
   output.close();
  - closed = true;
  +closed = true;
   
   }
   
  @@ -203,12 +208,6 @@
   throw new IOException("Cannot flush a cl

Re: xsl by extension

2001-09-06 Thread Jeff Turner

Ummm... perhaps invoke Jasper from your servlet?

Class clazz = Class.forName("org.apache.jasper.servlet.JspServlet");
HttpServlet jsp = (HttpServlet) clazz.newInstance();
jsp.init(context);
jsp.service(request, response);

That code is from Cocoon 2's JspGenerator, which uses Jasper to create
XML with JSP, which is then transformed and rendered in the Cocoon
pipeline.

--Jeff


On Thu, Sep 06, 2001 at 09:15:29PM +, javi . wrote:
> hello everybody!!
> 
> i'm new here, and so excuse me if this thread has been
> started (and closed) before. and xcuse me for my spelling ;)
> my native language is java.
> 
> i'm trying to add to tomcat a nice feature of resin:
> automatically apply a xsl transformation over all files
> with .xtp extension (xml templates).
> 
> i've already done it, simply associating that extension
> to my servlet. the servlet read the xsl path
> from the .xtp itself.
> 
> the problem is that i want to allow the jsp code in the
> xtp file to be executed, so i must retrieve it via http and not from
> the os file system... but when i do it, of course, my
> xtp servlet catch de call and began a recursive loop!
> 
> is there any way to avoid that? i've look at the code
> by about ten hours and i don't see how to manage this
> problem...
> 
> thank you very much in advance.
> 
> Javi Moreno (jv)
> 
> 
> 
> ps: i promise to post the servlet ;)
> 
> pps: yes, i will try {to take another English course...}



[PATCH] Jasper generates bad custom tag variable names

2001-09-06 Thread Kin-Man Chung

This patch fixes Bug 3019.

If a tag name includes a '-', the generated var name is not a legal Java
identifier name, causing javac compilation errors.  The bug is fixed by
substituting '-' with "$1".  Similarily, '.' is replaced by "$2",
and ':' by "$3".

runsocks cvs diff -u TagGeneratorBase.java
Index: TagGeneratorBase.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/T
agGeneratorBase.java,v
retrieving revision 1.2
diff -u -r1.2 TagGeneratorBase.java
--- TagGeneratorBase.java   2000/11/01 20:25:08 1.2
+++ TagGeneratorBase.java   2001/09/06 22:32:12
@@ -119,7 +119,42 @@
return (TagVariableData) tagHandlerStack.peek();
 }
 
+private String substitute(String name, char from, String to) {
+   StringBuffer s = new StringBuffer();
+   int begin = 0;
+   int last = name.length();
+   int end;
+   while (true) {
+   end = name.indexOf(from, begin);
+   if (end == -1)
+   end = last;
+   s.append(name.substring(begin, end));
+   if (end == last)
+   break;
+   s.append(to);
+   begin = end + 1;
+   }
+   return s.toString();
+}
+   
+/**
+ * Return a tag variable name from the given prefix and shortTagName.
+ * Not all NMTOKEN's are legal Java identifiers, since they may contain
+ * '-', '.', or ':'.  We use the following mapping: substitute "-" with
+ * "$1", "." with "$2", and ":" with "$3".
+ */
 protected String getTagVarName(String prefix, String shortTagName) {
+
+   if (shortTagName.indexOf('-') != -1) {
+   shortTagName = substitute(shortTagName, '-', "$1");
+   }
+   if (shortTagName.indexOf('.') != -1) {
+   shortTagName = substitute(shortTagName, '.', "$2");
+   }
+   if (shortTagName.indexOf(':') != -1) {
+   shortTagName = substitute(shortTagName, ':', "$3");
+   }
+
// Fix: Can probably remove the synchronization now when no vars or 
method is static
synchronized (tagVarNumbers) {
String tag = prefix+":"+shortTagName;




Re: xsl by extension

2001-09-06 Thread javi .

Thanks, craig, but i'm working with version 3.3. ¿isn't any
alternative avalaible? it seems it should be a quite common
problem...

jv


>From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: Re: xsl by extension
>Date: Thu, 6 Sep 2001 14:37:43 -0700 (PDT)
>
>In a servlet 2.3 environment (i.e. Tomcat 4) you can do this sort of thing
>with a Filter.  You would map *.xtp to the JSP servlet, and then apply
>your filter as well to the response.
>
>Craig
>
> >
> > i'm trying to add to tomcat a nice feature of resin:
> > automatically apply a xsl transformation over all files
> > with .xtp extension (xml templates).
> >
> > i've already done it, simply associating that extension
> > to my servlet. the servlet read the xsl path
> > from the .xtp itself.
> >
> > the problem is that i want to allow the jsp code in the
> > xtp file to be executed, so i must retrieve it via http and not from
> > the os file system... but when i do it, of course, my
> > xtp servlet catch de call and began a recursive loop!
> >


_
Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp




Re: xsl by extension

2001-09-06 Thread Craig R. McClanahan

In a servlet 2.3 environment (i.e. Tomcat 4) you can do this sort of thing
with a Filter.  You would map *.xtp to the JSP servlet, and then apply
your filter as well to the response.

Craig


On Thu, 6 Sep 2001, javi . wrote:

> Date: Thu, 06 Sep 2001 21:15:29 +
> From: javi . <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: xsl by extension
>
> hello everybody!!
>
> i'm new here, and so excuse me if this thread has been
> started (and closed) before. and xcuse me for my spelling ;)
> my native language is java.
>
> i'm trying to add to tomcat a nice feature of resin:
> automatically apply a xsl transformation over all files
> with .xtp extension (xml templates).
>
> i've already done it, simply associating that extension
> to my servlet. the servlet read the xsl path
> from the .xtp itself.
>
> the problem is that i want to allow the jsp code in the
> xtp file to be executed, so i must retrieve it via http and not from
> the os file system... but when i do it, of course, my
> xtp servlet catch de call and began a recursive loop!
>
> is there any way to avoid that? i've look at the code
> by about ten hours and i don't see how to manage this
> problem...
>
> thank you very much in advance.
>
> Javi Moreno (jv)
>
>
>
> ps: i promise to post the servlet ;)
>
> pps: yes, i will try {to take another English course...}
>
>
> _
> Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp
>
>




Re: Tomcat 3.3 (JDK 1.1 compatibility fixes)

2001-09-06 Thread cmanolache

Thanks James, I'm very happy to see your contributions. ( and my
appologies for not testing with 1.1 often enough ).

> 
>jakarta-tomcat-3.3-dev-src\src\share\org\apache\tomcat\util\depend\DependClassLoader.java
> ==
> The method "loadClassInternal" appears to be incorrect.  When loading a
> class, the code first retrieves the class as a resource from the "parent"
> class loader.  But, the return value from the "getResource" is not used
> because the code then delegates the class loading to the "parent2" class
> loader ("parent2.loadClass(name)").  When running with JDK 1.1, the
> "getResource" returns null because the "jar" protocol is not valid (the
> exception message "unknown protocol: jar" is thrown from SimpleClassLoader
> where a java.net.URL is constructed).  This causes the "loadClassInternal"
> method to throw a "ClassNotFoundException" prematurely because the class
> can successfully be loaded by one of the the parent class loaders.  Below I
> offer a solution but I think it would be best if someone with a more
> in-depth understanding of the code can validate this solution.

The code is a bit tricky. 3.3 uses normal URLClassLoaders for loading, but
in order to support reloading we use an additional wrapper (
DependClassLoader ) that will collect dependencies ( since a servlet/jsp
can depend on multiple jars/classes ).

For DCL, "parent" is the webapp class loader. "parent2" is the
applications class loader, parent of all webapp loaders.

The code tries to make DependClassLoader as non-intrusive as possible (
i.e. the behavior of using DCL should be as close as possible to 'normal'
).

If a class can be loaded by parent2 ( the common app loader ), then we
just delegate to it ( that's the normal delegation that would be used if
no DCL was present ). We don't delegate to parent because then all classes
loaded as result of resolving the current class would not be registered as
depends ( parent will do all the loading without any notification ).

If not, we'll use parent to get the bytes - then load them. The reason we
have DependClassLoader12 is to support the security context - I couldn't
find any other way ( like via jdkcompat ) since we need to call a
protected method in super.


>   // check parent class
>   if( parent != null ) {
>  try {
> c = parent.loadClass( name );

^^^ That will not brake part of reloading - parent will load all classes
that are requested by the current class, and we'll not be able to record
that...

I'll try to find another fix ( nice try ! :-).

Costin





xsl by extension

2001-09-06 Thread javi .

hello everybody!!

i'm new here, and so excuse me if this thread has been
started (and closed) before. and xcuse me for my spelling ;)
my native language is java.

i'm trying to add to tomcat a nice feature of resin:
automatically apply a xsl transformation over all files
with .xtp extension (xml templates).

i've already done it, simply associating that extension
to my servlet. the servlet read the xsl path
from the .xtp itself.

the problem is that i want to allow the jsp code in the
xtp file to be executed, so i must retrieve it via http and not from
the os file system... but when i do it, of course, my
xtp servlet catch de call and began a recursive loop!

is there any way to avoid that? i've look at the code
by about ten hours and i don't see how to manage this
problem...

thank you very much in advance.

Javi Moreno (jv)



ps: i promise to post the servlet ;)

pps: yes, i will try {to take another English course...}


_
Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp




WG: worker.properties swallows my first worker (mod_jk)

2001-09-06 Thread Hans Schmid

Hi,

just filed a bug on Larrys request

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

Thanks for looking into this one.

Cheers,
Hans


-Ursprüngliche Nachricht-
Von: Larry Isaacs [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 6. September 2001 19:39
An: '[EMAIL PROTECTED]'
Betreff: RE: worker.properties swallows my first worker (mod_jk)


Hi Hans,

The answers to your questions are:

1.) Why gets this hardcoded worker on port 8007 created?

Don't know, I will investigate.

2.) Is this a Bug I shall report?

   Yes, and please attache the workers.properties in question.

Thanks.

Larry


> -Original Message-
> From: Hans Schmid [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 06, 2001 12:57 PM
> To: Tomcat-User
> Subject: worker.properties swallows my first worker (mod_jk)
>
>
> Hello,
>
> This is about mod_jk in Tomcat 3.3b1 on Solaris with Apache 1.3.19
>
> It seems to me that the first worker found in the worker.list
> always gets
> created as ajp12 on port 8007
> regardless what i configure.
>
> The following worker.list entry
> worker.list=worker.list=ajp12-01, ajp12-02, ajp13-01, ajp13-02
>
> produces 4 workers:
> ajp12-01 on port 8007  ajp12
> ajp12-02 on port 9017  ajp12
> ajp13-01 on port 9009  ajp13
> ajp13-02 on port 9019  ajp13
>
> instead of the expected:
> ajp12-01 on port 9007  ajp12
> ajp12-02 on port 9017  ajp12
> ajp13-01 on port 9009  ajp13
> ajp13-02 on port 9019  ajp13
>
> Please note the ajp12-01 worker points to port 8007 instead of 9007.
>
> When I put a space in front of the first worker I get my
> expected 4 workers
> pointing to the correct ports
> plus a 5th worker ('' on port 8007)
>
>
> The following entry in workers.properties
> worker.list=worker.list= ajp12-01, ajp12-02, ajp13-01, ajp13-02
>
> produces 5 workers instead of 4
> Please note the port 8007 for the first worker named
> worker.list= of ajp12
> I do not have a worker assigned to this port (greped through
> all config
> files).
>
>
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (207)]: Into
> build_worker_map,
> creating 5 workers
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
> build_worker_map, creating
> worker worker.list=
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]:
> wc_create_worker, about to
> create instance worker.list= of ajp12
> [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
> ajp12_worker_factory
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]:
> wc_create_worker, about to
> validate and init worker.list=
> [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
> jk_worker_t::validate
> [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
> jk_worker_t::validate for worker worker.list= contact is
> localhost:8007
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]:
> wc_create_worker, done
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]:
> build_worker_map, removing
> old worker.list= worker
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
> build_worker_map, creating
> worker ajp12-01
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]:
> wc_create_worker, about to
> create instance ajp12-01 of ajp12
> [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
> ajp12_worker_factory
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]:
> wc_create_worker, about to
> validate and init ajp12-01
> [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
> jk_worker_t::validate
> [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
> jk_worker_t::validate for worker ajp12-01 contact is localhost:9007
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]:
> wc_create_worker, done
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]:
> build_worker_map, removing
> old ajp12-01 worker
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
> build_worker_map, creating
> worker ajp12-02
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]:
> wc_create_worker, about to
> create instance ajp12-02 of ajp12
> [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
> ajp12_worker_factory
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]:
> wc_create_worker, about to
> validate and init ajp12-02
> [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
> jk_worker_t::validate
> [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
> jk_worker_t::validate for worker ajp12-02 contact is localhost:9017
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]:
> wc_create_worker, done
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]:
> build_worker_map, removing
> old ajp12-02 worker
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
> build_worker_map, creating
> worker ajp13-01
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
> [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]:
> wc_create_worker, about to
> creat

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

2001-09-06 Thread craigmcc

craigmcc01/09/06 13:10:29

  Modified:.RELEASE-PLAN-4.0.txt
   catalina/src/conf web.xml
  Log:
  Pretty up the $CATALINA_HOME/conf/web.xml deployment descriptor that
  provides defaults for all web apps.  No functional changes (the size of
  the commit message is driven by arranging the MIME types in alphabetical
  order - sorry about that.
  
  Revision  ChangesPath
  1.6   +1 -3  jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt
  
  Index: RELEASE-PLAN-4.0.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-PLAN-4.0.txt,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RELEASE-PLAN-4.0.txt  2001/09/06 03:43:11 1.5
  +++ RELEASE-PLAN-4.0.txt  2001/09/06 20:10:29 1.6
  @@ -1,4 +1,4 @@
  -$Id: RELEASE-PLAN-4.0.txt,v 1.5 2001/09/06 03:43:11 craigmcc Exp $
  +$Id: RELEASE-PLAN-4.0.txt,v 1.6 2001/09/06 20:10:29 craigmcc Exp $
   
 Release Plan for Apache Tomcat 4.0
 ==
  @@ -51,8 +51,6 @@
   "enhancement request")
   
   Catalina3292Class reloading fails (awaiting test case)
  -
  -Catalina3443Class reloading fails for servlets that use JNI
   
   Connectors  1788mod_webapp errors on Win2k
   
  
  
  
  1.21  +477 -374  jakarta-tomcat-4.0/catalina/src/conf/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/web.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- web.xml   2001/09/06 15:40:34 1.20
  +++ web.xml   2001/09/06 20:10:29 1.21
  @@ -2,13 +2,46 @@
   
   http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>
  +"http://java.sun.com/dtd/web-app_2_3.dtd";>
   
   
   
  -  
   
  -  
  +  
  +
  +
  +  
  +  
  +  
  +  
  +  
  +
  +
  +  
  +
  +
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +
 
   default
   org.apache.catalina.servlets.DefaultServlet
  @@ -22,8 +55,21 @@
   
   1
 
  +
   
  -  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +
 
   invoker
   org.apache.catalina.servlets.InvokerServlet
  @@ -33,686 +79,743 @@
   
   2
 
  +
   
  -  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +
 
   jsp
  -  org.apache.jasper.servlet.JspServlet
  -
  -
  -
  -  
  -  javaEncoding
  -  UTF-8
  -
  -
  -  
 logVerbosityLevel
 WARNING
   
  -4
  +3
 
  +
  +
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
   
  -  
 
   ssi
   org.apache.catalina.servlets.SsiInvokerServlet
   
  -  
  +  buffered
  +  1
  +
  +
 debug
 0
   
   
  -  
 expires
 666
   
   
  -  
  -  buffered
  -  1
  -
  -
  -  
 isVirtualWebappRelative
 0
   
  -5
  +
 
  +
   
  -  
  -   
  - cgi
  - org.apache.catalina.servlets.CGIServlet
  - 
  -   
  -   debug
  -   6
  - 
  - 
  -   
  -   
  -   clientInputTimeout
  -   100
  - 
  - 
  -   
  -   
  -   cgiPathPrefix
  -   WEB-INF/cgi
  - 
  -
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +  
  +
  +  
  +cgi
  +org.apache.catalina.servlets.CGIServlet
  +
  +  clientInputTimeout
  +  100
  +
  +
  +  debug
  +  6
  +
  +
  +  cgiPathPrefix
  +  WEB-INF/cgi
  +
  +
  
   
  +
  +  
  +
  +
  +  
  +  
  +  
  +  
  +
  +
 
 
   default
   /
 
   
  +
 
  -  
 
   invoker
   /servlet/*
 
   
  +
 
  -  
 
   jsp
   *.jsp
 
  +
   
  -  
  +  
  +
  +
  +
  +  
  +
  +
  +
  +  
   
  - 
  - 
  - 
  +  
  +  
   
  -  
 
   30
 
   
  -  
  +
  +  
  +
  +
  +  
  +  
  +  
  +  
  +  
  +
  +
 
  -txt
  -text/plain
  +abs
  +audio/x-mpeg
 
 
  -html
  -text/html
  +ai
  +application/postscript
 
 
  -htm
  -text/html
  +aif
  +audio/x-aiff
 
 
  -gif
  -image/gif
  +aifc
  +audio/x-aiff
 
 
  -jpg
  -image/jpeg
  +aiff
  +audio/x-aiff
 
 
  -jpe
  -image/jpeg
  +aim
  + 

Tomcat 3.3 (JDK 1.1 compatibility fixes)

2001-09-06 Thread James THOMAS


Hello, I've provided below JDK 1.1 compatibility fixes for Tomcat 3.3.  Can
someone please add these fixes to the code?  I believe you'll find that the
fixes are trivial except for the last one.  The last problem I described
below concerns the way the class loaders are implemented.  I have a
solution that works but I think it needs to be verified.   Thank you for
your time.  James.



==
File:  jakarta-tomcat-3.3-dev-src\src\build.xml
==
Line:  301
Add the following line:
 
Reason:
 We don't want to compile the class "DependClassLoader12" when JDK 1.1
is used to compile Tomcat 3.3

==
File:
jakarta-tomcat-3.3-dev-src\src\admin\WEB-INF\classes\tadm\AntTag.java
==
Line: 24
targets.clear();
Change to:
targets.removeAllElements();
Reason:
 The method "clear" does not exist on Vector class in JDK 1.1

==
File:
jakarta-tomcat-3.3-dev-src\src\share\org\apache\tomcat\startup\EmbededTomcat.java
==
Line:  198
 attributes.put( name, v );
Change To:
 if( v == null )
  attributes.remove( name );
 else
  attributes.put( name, v );
Reason:
 When running with JDK 1.1, the value of the "parentClassLoader" is
null, which will cause an exception because null values cannot be placed
into a hashtable.  As a generic solution, I recommend changing the
implementation to treat a "setAttribute" with a null value as a request to
remove the current attribute value.

==
File:
jakarta-tomcat-3.3-dev-src\src\share\org\apache\tomcat\startup\Main.java
==
Line: 215-216
 System.setProperty( "tomcat.home", installDir );
 System.setProperty("java.security.policy",  policyFile);
Change To:
 System.getProperties().put( "tomcat.home", installDir );
 System.getProperties().put("java.security.policy",  policyFile);
Reason:
 The method "setProperty" does not exist in JDK 1.1

==
File:
jakarta-tomcat-3.3-dev-src\src\share\org\apache\tomcat\util\compat\Jdk11Compat.java
==
Line: 142
 }while((cl!=null) && ( depth < c ));
Change To:
 }while((cl!=null) && ( depth >= c ));
Reason:
 The loop condition is incorrect.  This bug cause JSP compilation
errors because the classpath does not contain the common classpath (which
includes the servlet.jar).

==
File:
jakarta-tomcat-3.3-dev-src\src\share\org\apache\tomcat\util\depend\DependClassLoader.java
==
The method "loadClassInternal" appears to be incorrect.  When loading a
class, the code first retrieves the class as a resource from the "parent"
class loader.  But, the return value from the "getResource" is not used
because the code then delegates the class loading to the "parent2" class
loader ("parent2.loadClass(name)").  When running with JDK 1.1, the
"getResource" returns null because the "jar" protocol is not valid (the
exception message "unknown protocol: jar" is thrown from SimpleClassLoader
where a java.net.URL is constructed).  This causes the "loadClassInternal"
method to throw a "ClassNotFoundException" prematurely because the class
can successfully be loaded by one of the the parent class loaders.  Below I
offer a solution but I think it would be best if someone with a more
in-depth understanding of the code can validate this solution.

Side note: with the solution below, we can eliminate the need for the
"parent2" attribute held by the "DependClassLoader" class.

protected Class loadClassInternal( String name, boolean resolve )
  throws ClassNotFoundException
   {
  if( debug>0) log( "loadClass() " + name + " " + resolve);
  Class c = null;

  // check if  we already loaded this class
c = findLoadedClass( name );
if( c != null ) {
 //System.out.println( "class already loaded" );
   if( resolve )
resolveClass( c );
 return c;
  }

  // check parent class
  if( parent != null ) {
 try {
c = parent.loadClass( name );
//System.out.println( "class loaded by parent" );
return c;
 }
 catch( ClassNotFoundException e ) {
 }
  }

  throw new ClassNotFoundException(name);
   }


James Thomas
ENOVIA Corp.
704 - 944 - 8933
[EMAIL PROTECTED]




minor bug 3114 : LocalStrings_es.properties

2001-09-06 Thread Carlos Gaston Alvarez

Hi Craig,

   I did some small spelling corrections to the file as I found it at
bugzilla.
   If this is not all tell me that I can help you.

Chau,

Gaston

 LocalStrings_es.properties


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

2001-09-06 Thread larryi

larryi  01/09/06 12:12:19

  Modified:src/doc  NT-Service-howto.html
   src/native/mod_jk/nt_service jk_nt_service.c
  Log:
  Applying patch for Bugzilla #3370 which includes a documentation update.
  
  Allow adding of service dependancies
  Allow adding of service with different user name
  Allow adding of service as Automatic startup
  New functions to start and stop services on remote machines
  
  Submitted by: David Oxley
  
  Revision  ChangesPath
  1.6   +141 -132  jakarta-tomcat/src/doc/NT-Service-howto.html
  
  Index: NT-Service-howto.html
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/doc/NT-Service-howto.html,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NT-Service-howto.html 2001/07/17 03:53:41 1.5
  +++ NT-Service-howto.html 2001/09/06 19:12:19 1.6
  @@ -1,148 +1,157 @@
  +
   
   
  -  
  -  
  +  
  +
  + 
 
  +   
 
 Working with the Jakarta NT Service
  +
   
  -
  -
  -
  +  
   Working with the Jakarta NT Service
  -
  -By Gal Shachor
  -[EMAIL PROTECTED]>
  -
  -
  -
  -The Jakarta NT service is an executable that wraps the
  -Tomcat servlet container and executes it in the background as an NT service. To
  -install it you will need to:
  -
  +By Gal Shachor [EMAIL PROTECTED]
  +   >
  +   Modified by Dave Oxley [EMAIL PROTECTED]
  +   >
  +
  +The Jakarta NT service is an executable that wraps the Tomcat servlet container
  +and executes it in the background as an NT service. To install it you will
  +need to:
   
  - Get a
  - hold on the NT executable (jk_nt_service.exe)
  - 
  -  Download
  -  the executable from the win32/i386 directory  found where you downloaded the
  -  http://jakarta.apache.org/site/binindex.html";> Tomcat binary
  -  distribution. For those using Netscape as your browser, try downloading
  -  a zip version of the file, if available. There can be problems using Netscape
  -  to download DLL files.
  - 
  - Customize
  - a properties file that provides the service with Tomcat information
  - (wrapper.properties).
  - 
  -  Locate the wrapper.properties template file in your Tomcat conf/jk directory.
  -  Update
  -  the wrapper.tomcat_home property to point at your tomcat home.
  -  Update
  -  the wrapper.java_home property to point at your Java home.
  - 
  - Install
  - jk_nt_service by running it with the -i flag.
  - 
  -  Execute
  -  jk_nt_service -I  
  -   should be a single word (without and spaces) such as
  -  Jakarta
  -   should point to your wrapper.properties
  -  file (and the service will check it's existence.)
  -  For
  -  example, a valid command line can be jk_nt_service -I Jakarta 
wrapper.properties
  - 
  - Start
  - tomcat as a service.
  - 
  -  From
  -  the command line, execute net start  (e.g. net
  -  start Jakarta)
  -  From
  -  the NT services applet, highlight your service and press start.
  - 
  - Note: If the log file location in your wrapper.properties file points to
  - the logs directory, and the logs directory doesn't yet exist,
  - manually create it before starting the service.
  - Stop
  - Tomcat as a service.
  - 
  -  From
  -  the command line, execute net stop  (e.g. net
  -  stop Jakarta)
  -  From
  -  the NT services applet, highlight your service and press stop.
  - 
  +  Get a  hold on the NT executable (jk_nt_service.exe)
  +  
  +Download   the executable from the win32/i386 directory  found 
  + where you downloaded the   http://jakarta.apache.org/site/binindex.html";>
  +Tomcat binary   distribution.
  +For those using Netscape as your browser, try downloading   a zip 
  +version  of the file, if available. There can be problems using Netscape 
  + to download DLL files.
  +  
  +  Customize  a properties file that provides the service with Tomcat 
  + information  (wrapper.properties).
  +  
  +Locate the wrapper.properties template file in your Tomcat conf/jk 
  + directory.   
  +Update   the wrapper.tomcat_home property to point at your tomcat 
  + home.
  +Update   the wrapper.java_home property to point at your Java 
  + home.
  +  
  +  Install  jk_nt_service by running it with the -i flag.
  +  
  +Execute   jk_nt_service -I   
  + should be a single word (without and 
  + spaces) such as   Jakarta
  + are any of the following:
  +
  +  -U  - to 

RE: cvs commit: jakarta-tomcat-connectors/webapp/apache-2.0 mod_webapp.c

2001-09-06 Thread GOMEZ Henri

>This will need to change when my next patches in the webapp 
>library go in,
>as Apache will be able to serve static files when possible...
>
>Also, since Apache 2.0 is not final yet, I would remove all
>MODULE_MAGIC_NUMBER checks, and _require_ for the module to be 
>built with
>the latest HEAD out of CVS... I don't care at this point about 
>2.0 backward
>compatibility

I didn't agree with that Pier, we must try to keep compatibility 
with previous release of Apache 2.0, since there IS STILL NO
official release. 

Many users are still using Apache 2.0.24-alpha (including myself), 
or even 2.0.18-beta (including IBM iSeries team porting Apache 2.0).

Let avoid questions in user-list asking about which version of 
Apache 2.0 to be used, or why we couldn't compile the module
against a running (even if obsolete) Apache 2.0

That's a part of the problem in mod_webapp with APR.
 
>I'd do something like at the top of the file, and move the 
>version to check
>against accordingly, until 2.0 doesn't get final.
>
>#if (MODULE_MAGIC_NUBER_MAJOR < 20010808)
>#error ERROR: You need the latest Apache 2.0 code to compile
>#endif

Please mod_jk commiters, in JT and JTC, keep care of 
previous releases and still use MODULE_MAGIC_NUBER_MAJOR
when needed.

As soon as Apache 2.0 will be released, we'll clean code by 
dropping all that controls, but until that we must keep 
compatibility with at least latest beta (2.0.18-beta)

Hi Ho.



RE: LinkageError: duplicate Class definition

2001-09-06 Thread Peter Romianowski

ok, i switched to today's nightly (20010906) but the error remains.
instead of bothering you again and again i downloaded the src (20010906) and
"fixed" the bug. (or at least make it disappear :-)
first i simply synchronized the complete method
(WebappClassLoader.findClassInternal) and that did the trick.

because of possible performance issues (dont know if there are some) i moved
the formally synchronized code to a separate synchronized method (and left
the findClassInternal unsynchronized).
but then the error reoccured (this time within the new method)... :-(

are there points for which the whole method must not be synchronized? if
not, i would synchronize it...

any other ideas?

as always - thanks dudes...

pero



-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 06, 2001 5:05 PM
To: [EMAIL PROTECTED]
Subject: Re: LinkageError: duplicate Class definition


> ok, i try to develop a test case (and environment). but my first attempt
to
> reproduce the error in that testcase failed (even though it remains in my
> "real" application). here's a short doc on what's happening:
> 1. i start tomcat with tomcat/bin/catalina.sh -config myserver.xml - file
> follows
>
> tomcat startup message
>
> Using CLASSPATH:
>
c:/tools/java/tomcat4/bin/bootstrap.jar;c:\tools\java\jdk\1.3.1/lib/tools.ja
> r
> Using CATALINA_HOME: c:/tools/java/tomcat4
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0-b7
> WebappLoader[]: Deploying class repositories to work directory
> o:\coreg\projects\main\devenv\tomcat\work
> WebappLoader[]: Deploy JAR /WEB-INF/lib/peroframework.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\peroframework
> .jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/coregmain.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\coregmain.jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/parser.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\parser.jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/ecs-1.4.1.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\ecs-1.4.1.jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/jaxp.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\jaxp.jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/mail.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\mail.jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/mysqljdbc202.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\mysqljdbc202.j
> ar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/activation.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\activation.jar
> StandardManager[]: Seeding random number generator class
> java.security.SecureRandom
> StandardManager[]: Seeding of random number generator has been completed
> StandardWrapper[:default]: Loading container servlet default
> default: init
> StandardWrapper[:invoker]: Loading container servlet invoker
> invoker: init
> StandardWrapper[:jsp]: Using Jasper classloader for servlet jsp
> jsp: init
> __coregapplication: init <--- THIS IS MY SERVLET
>
>
> 2. i've written a servlet which is executed on tomcat-startup (web.xml
> 1000)
> 3. within the init method i start some threads that are alive throughout
the
> whole server-lifetime
> 4. upon first execution there's the linkage-error
>
> trace:
>
> [Thu Sep 06 15:17:00 CEST 2001:
> coreg.mail.campaignuser.ReceiveDaemon.service]
> [[RecieveDaemon] unsubscribe] fatal exception
> java.lang.LinkageError: duplicate class definition:
> com/sun/mail/pop3/POP3Store
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
> at
>
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
> ader.java:1484)
> at
>
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav
> a:851)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1230)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1113)
> at javax.mail.Session.getService(Session.java:587)
> at javax.mail.Session.getStore(Session.java:402)
> at javax.mail.Session.getStore(Session.java:364)
> at javax.mail.Session.getStore(Session.java:343)
> at pero.mail.Pop3Handler.connect(Pop3Handler.java:38)
> at
> coreg.mail.campaignuser.ReceiveDaemon.service(ReceiveDaemon.java:172)
> at pero.common.Deamon.run(Deamon.java:94)

This stacktrace shows you're not using the latest CVS version or nightly
(which syncs the call to defineClass and would probably solve the issue).
In the latest 

Re: cvs commit: jakarta-tomcat-connectors/webapp/apache-2.0mod_webapp.c

2001-09-06 Thread Pier Fumagalli

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

> +#if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
> +/* bypass the directory_walk and file_walk for non-file requests */
> +static int wam_map_to_storage(request_rec *r)
> +{
> +if (apr_table_get(r->notes, "webapp-handler")) {
> +r->filename = (char *)apr_filename_of_pathname(r->uri);
> +return OK;
> +}
> +return DECLINED;
> +}
> +#endif

This will need to change when my next patches in the webapp library go in,
as Apache will be able to serve static files when possible...

Also, since Apache 2.0 is not final yet, I would remove all
MODULE_MAGIC_NUMBER checks, and _require_ for the module to be built with
the latest HEAD out of CVS... I don't care at this point about 2.0 backward
compatibility

I'd do something like at the top of the file, and move the version to check
against accordingly, until 2.0 doesn't get final.

#if (MODULE_MAGIC_NUBER_MAJOR < 20010808)
#error ERROR: You need the latest Apache 2.0 code to compile
#endif

Pier




cvs commit: jakarta-tomcat-connectors/webapp/apache-2.0 mod_webapp.c

2001-09-06 Thread jfclere

jfclere 01/09/06 10:00:54

  Modified:jk/native/apache-2.0 mod_jk.c
   webapp/apache-2.0 mod_webapp.c
  Log:
  Arrange apache-2.0 support (like in mod_jk.c).
  Submitted by: Ryan Bloom, [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.23  +2 -2  jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mod_jk.c  2001/09/06 13:39:29 1.22
  +++ mod_jk.c  2001/09/06 17:00:54 1.23
  @@ -60,7 +60,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.22 $   *
  + * Version: $Revision: 1.23 $   *
***/
   
   /*
  @@ -1329,7 +1329,7 @@
   static int jk_map_to_storage(request_rec *r)
   {
   if (apr_table_get(r->notes, JK_WORKER_ID)) {
  -r->filename = apr_filename_of_pathname(r->uri);
  +r->filename = (char *)apr_filename_of_pathname(r->uri);
   return OK;
   }
   return DECLINED;
  
  
  
  1.2   +18 -1 jakarta-tomcat-connectors/webapp/apache-2.0/mod_webapp.c
  
  Index: mod_webapp.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/apache-2.0/mod_webapp.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_webapp.c  2001/08/21 16:20:58 1.1
  +++ mod_webapp.c  2001/09/06 17:00:54 1.2
  @@ -57,7 +57,7 @@
   
   /**
* @author  Pier Fumagalli 
  - * @version $Id: mod_webapp.c,v 1.1 2001/08/21 16:20:58 pier Exp $
  + * @version $Id: mod_webapp.c,v 1.2 2001/09/06 17:00:54 jfclere Exp $
*/
   
   #include 
  @@ -413,6 +413,9 @@
   
   /* The uri path is matched: set the handler and return */
   r->handler=apr_pstrdup(r->pool,"webapp-handler");
  +#if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
  +apr_table_setn(r->notes,"webapp-handler", "webapp-handler");
  +#endif
   
   /* Set the webapp request structure into Apache's request structure */
   ap_set_module_config(r->request_config, &webapp_module, appl);
  @@ -507,12 +510,26 @@
   return(OK);
   }
   
  +#if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
  +/* bypass the directory_walk and file_walk for non-file requests */
  +static int wam_map_to_storage(request_rec *r)
  +{
  +if (apr_table_get(r->notes, "webapp-handler")) {
  +r->filename = (char *)apr_filename_of_pathname(r->uri);
  +return OK;
  +}
  +return DECLINED;
  +}
  +#endif
   
   static void register_hooks(apr_pool_t *p)
   {
   ap_hook_handler(wam_invoke, NULL, NULL, APR_HOOK_MIDDLE);
   ap_hook_translate_name(wam_match, NULL, NULL, APR_HOOK_MIDDLE);
   ap_hook_child_init(wam_startup, NULL, NULL, APR_HOOK_MIDDLE);
  +#if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
  +ap_hook_map_to_storage(wam_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);
  +#endif
   }
   
   /* Apache module declaration */
  
  
  



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

2001-09-06 Thread craigmcc

craigmcc01/09/06 08:40:34

  Modified:catalina/src/conf web.xml
  Log:
  Add MIME type for MIDlet Java Application Descriptor.
  
  Submitted by: Kare Nuorteva <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.20  +4 -0  jakarta-tomcat-4.0/catalina/src/conf/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/web.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- web.xml   2001/08/28 00:24:26 1.19
  +++ web.xml   2001/09/06 15:40:34 1.20
  @@ -676,6 +676,10 @@
   jnlp
   x-java-jnlp-file
 
  +  
  +jad
  +text/vnd.sun.j2me.app-descriptor
  +  
   
 
 
  
  
  



Re: User of "catalina.home" property

2001-09-06 Thread Craig R. McClanahan

On Thu, 6 Sep 2001, Anand B N wrote:

> Date: Thu, 06 Sep 2001 11:40:36 +0530
> From: Anand B N <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: User of "catalina.home" property
>
> Can we rely on the fact that catalina.home property will always return a
> valid path(either ".." a.k.a. parent or an absolute path) abd write
> components that will run for Tomcat only based on that property.
>
> Currently I do the following:-
>
>  FileInputStream in ;
>  File catalinaHome = new  File(System.getProperty("catalina.home"));
>  handlerMap = new HashMap();
>
>  /*
>Load request mapping File descriptor
>  */
>  in = new
> 
>FileInputStream(catalinaHome.getCanonicalFile()+fileSeparator+"webapps"+fileSeparator+"casadmin"..
>
> I works fine so far but justo find out if it can be relied upon.
>
> Anand
>
>

Yes, you can rely on the "catalina.home" property, as long as you are
starting Tomcat with the standard startup scripts.

In addition, a recent nightly build added the new "catalina.base"
property, which defaults to the same place, but can be set different
directory -- this facilitates using the same installed copy of Tomcat 4
for more than one user on the same server.  The "catalina.base" property
is the default base for the "bin", "classes", "common", "jasper", "lib",
and "server" directories (i.e. all the parts of Tomcat 4 that are
constant), while "catalina.home" is the default base for "logs",
"webapps", and "work".

To take advantage of this configuration capability, simply set the
CATALINA_BASE environment variable to where you want "catalina.base" to
point at.  If not set, it defaults to whatever value CATALINA_HOME has
(whether calculated or pre-set).

Craig





RE: RequestDispatcher problems [Tomcat 3.3b1].

2001-09-06 Thread Larry Isaacs

Hi Prasanna,

Code like you show works for me. It is supposed to be impossible
for a Java program to crash.  If it does, there is a bug in the
JVM.  Which JVM are you using and is there an upgrade or
alternative you can try.

Larry

> -Original Message-
> From: Prasanna Uppaladadium [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 06, 2001 11:16 AM
> To: [EMAIL PROTECTED]
> Subject: RequestDispatcher problems [Tomcat 3.3b1].
> 
> 
> Hello.
> 
> The bugs database is down so I couldn't check to see if there 
> is already
> a bug filed for this one.
> 
> It looks to me that something in the RequestDispatcher interface
> implementation is fundamentally broken: the following code 
> causes Tomcat
> 3.3b1 to just crash (I mean the process just vanishes into thin air).
> 
>  RequestDispatcher rd =
> request.getRequestDispatcher(voiceRegServlet);
>  rd.include(request, response);
> 
> The above code fragment is part of a (fairly simple) servlet. The
> fragment is executed when an error condition is to be generated. The
> variable voiceRegServlet simply points to a JSP page.
> 
> Is this a known bug? Any help is appreciated.
> 
> Thanks,
> Prasanna.
> 
> 



RequestDispatcher problems [Tomcat 3.3b1].

2001-09-06 Thread Prasanna Uppaladadium

Hello.

The bugs database is down so I couldn't check to see if there is already
a bug filed for this one.

It looks to me that something in the RequestDispatcher interface
implementation is fundamentally broken: the following code causes Tomcat
3.3b1 to just crash (I mean the process just vanishes into thin air).

 RequestDispatcher rd =
request.getRequestDispatcher(voiceRegServlet);
 rd.include(request, response);

The above code fragment is part of a (fairly simple) servlet. The
fragment is executed when an error condition is to be generated. The
variable voiceRegServlet simply points to a JSP page.

Is this a known bug? Any help is appreciated.

Thanks,
Prasanna.





[PATCH] MIME type for MIDlet Java Application Descriptor

2001-09-06 Thread Kare Nuorteva


I hope it's useful!


  jad 
  text/vnd.sun.j2me.app-descriptor


Cheers,
Kare


-- 
Kare Nuorteva
System Architect
tel: +44 207 598 3010  mobile: +44 777 384 6595

Satama Interactive
Elsley House, 24-30 Great Titchfield Street, London W1P 7AD, United Kingdom
www.satama.com




Re: LinkageError: duplicate Class definition

2001-09-06 Thread Remy Maucherat

> ok, i try to develop a test case (and environment). but my first attempt
to
> reproduce the error in that testcase failed (even though it remains in my
> "real" application). here's a short doc on what's happening:
> 1. i start tomcat with tomcat/bin/catalina.sh -config myserver.xml - file
> follows
>
> tomcat startup message
>
> Using CLASSPATH:
>
c:/tools/java/tomcat4/bin/bootstrap.jar;c:\tools\java\jdk\1.3.1/lib/tools.ja
> r
> Using CATALINA_HOME: c:/tools/java/tomcat4
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0-b7
> WebappLoader[]: Deploying class repositories to work directory
> o:\coreg\projects\main\devenv\tomcat\work
> WebappLoader[]: Deploy JAR /WEB-INF/lib/peroframework.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\peroframework
> .jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/coregmain.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\coregmain.jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/parser.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\parser.jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/ecs-1.4.1.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\ecs-1.4.1.jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/jaxp.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\jaxp.jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/mail.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\mail.jar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/mysqljdbc202.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\mysqljdbc202.j
> ar
> WebappLoader[]: Deploy JAR /WEB-INF/lib/activation.jar to
> o:\coreg\projects\main\devenv\www\WEB-INF\lib\activation.jar
> StandardManager[]: Seeding random number generator class
> java.security.SecureRandom
> StandardManager[]: Seeding of random number generator has been completed
> StandardWrapper[:default]: Loading container servlet default
> default: init
> StandardWrapper[:invoker]: Loading container servlet invoker
> invoker: init
> StandardWrapper[:jsp]: Using Jasper classloader for servlet jsp
> jsp: init
> __coregapplication: init <--- THIS IS MY SERVLET
>
>
> 2. i've written a servlet which is executed on tomcat-startup (web.xml
> 1000)
> 3. within the init method i start some threads that are alive throughout
the
> whole server-lifetime
> 4. upon first execution there's the linkage-error
>
> trace:
>
> [Thu Sep 06 15:17:00 CEST 2001:
> coreg.mail.campaignuser.ReceiveDaemon.service]
> [[RecieveDaemon] unsubscribe] fatal exception
> java.lang.LinkageError: duplicate class definition:
> com/sun/mail/pop3/POP3Store
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
> at
>
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
> ader.java:1484)
> at
>
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav
> a:851)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1230)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1113)
> at javax.mail.Session.getService(Session.java:587)
> at javax.mail.Session.getStore(Session.java:402)
> at javax.mail.Session.getStore(Session.java:364)
> at javax.mail.Session.getStore(Session.java:343)
> at pero.mail.Pop3Handler.connect(Pop3Handler.java:38)
> at
> coreg.mail.campaignuser.ReceiveDaemon.service(ReceiveDaemon.java:172)
> at pero.common.Deamon.run(Deamon.java:94)

This stacktrace shows you're not using the latest CVS version or nightly
(which syncs the call to defineClass and would probably solve the issue).
In the latest version, line 1484 of WebappClassLoader is:
-> synchronized(this) {
clazz = defineClass(name, entry.binaryContent, 0,
entry.binaryContent.length, codeSource);
}

In the version before, it was the defineClass call.

So could you try again with the latest nightly ? Looking at the stack trace,
it really looks like the bug which was fixed.

Remy




Re: Where should i put the JSP file ?

2001-09-06 Thread Joseph Toussaint

Just put it at the same level as the WEB-INF directory.

So it looks something like this

 \---+
 index.jsp
 WEB-INF--+
 web.xml
 classes
 lib


joe

At 10:50 AM 9/6/2001 +0800, Kenny Ma wrote:
>Hi
>Can you tell me where I put the jsp file
>then my web server (apache) can read it ?
>
>I put my servlet file in webapps/xxx/WEB-INF/classes
>how about JSP file ?
>
>thanks
>
>
>/* Kenny Ma
>[EMAIL PROTECTED] */




Re: Patch for mod_jk and Apache 2.0

2001-09-06 Thread jean-frederic clere

Many thanks. I have committed it.

Ryan Bloom wrote:
> 
> This patch allows mod_jk to successfully serve pages against Apache 2.0
> and Tomcat 4.0.  This is required after the changes to abstract out location
> and directory walks from the core request processing.  This was created by
> Will Rowe and myself.
> 
> Ryan
> 
> Index: mod_jk.c
> ===
> RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
> retrieving revision 1.18
> diff -u -d -b -w -u -r1.18 mod_jk.c
> --- mod_jk.c2001/09/04 10:57:03 1.18
> +++ mod_jk.c2001/09/06 00:17:28
> @@ -1333,13 +1333,22 @@
>  return DECLINED;
>  }
> 
> +static int jk_map_to_storage(request_rec *r)
> +{
> +if (apr_table_get(r->notes, JK_WORKER_ID)) {
> +r->filename = apr_filename_of_pathname(r->uri);
> +return OK;
> +}
> +return DECLINED;
> +}
> +
>  static void jk_register_hooks(apr_pool_t *p)
>  {
>  ap_hook_handler(jk_handler, NULL, NULL, APR_HOOK_MIDDLE);
>  ap_hook_post_config(jk_post_config,NULL,NULL,APR_HOOK_MIDDLE);
>  ap_hook_child_init(jk_child_init,NULL,NULL,APR_HOOK_MIDDLE);
>  ap_hook_translate_name(jk_translate,NULL,NULL,APR_HOOK_FIRST);
> -
> +ap_hook_map_to_storage(jk_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);
>  }
> 
>  module AP_MODULE_DECLARE_DATA jk_module =
> 
> __
> Ryan Bloom  [EMAIL PROTECTED]
> Covalent Technologies   [EMAIL PROTECTED]
> --



cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c

2001-09-06 Thread jfclere

jfclere 01/09/06 06:39:29

  Modified:jk/native/apache-2.0 mod_jk.c
  Log:
  This patch allows mod_jk to successfully serve pages against Apache 2.0
  and Tomcat.  This is required after the changes to abstract out location
  and directory walks from the core request processing. (since version 2.0.25)
  Submitted by: Ryan Bloom, [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.22  +16 -2 jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- mod_jk.c  2001/09/05 17:05:23 1.21
  +++ mod_jk.c  2001/09/06 13:39:29 1.22
  @@ -60,7 +60,7 @@
* Description: Apache 2 plugin for Jakarta/Tomcat *
* Author:  Gal Shachor <[EMAIL PROTECTED]>   *
* Henri Gomez <[EMAIL PROTECTED]>   *
  - * Version: $Revision: 1.21 $   *
  + * Version: $Revision: 1.22 $   *
***/
   
   /*
  @@ -1324,13 +1324,27 @@
   return DECLINED;
   }
   
  +#if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
  +/* bypass the directory_walk and file_walk for non-file requests */
  +static int jk_map_to_storage(request_rec *r)
  +{
  +if (apr_table_get(r->notes, JK_WORKER_ID)) {
  +r->filename = apr_filename_of_pathname(r->uri);
  +return OK;
  +}
  +return DECLINED;
  +}
  +#endif
  +
   static void jk_register_hooks(apr_pool_t *p)
   {
   ap_hook_handler(jk_handler, NULL, NULL, APR_HOOK_MIDDLE);
   ap_hook_post_config(jk_post_config,NULL,NULL,APR_HOOK_MIDDLE);
   ap_hook_child_init(jk_child_init,NULL,NULL,APR_HOOK_MIDDLE);
   ap_hook_translate_name(jk_translate,NULL,NULL,APR_HOOK_FIRST);
  -
  +#if (MODULE_MAGIC_NUMBER_MAJOR > 20010808)
  +ap_hook_map_to_storage(jk_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);
  +#endif
   }
   
   module AP_MODULE_DECLARE_DATA jk_module =
  
  
  



RE: [PATCH] Tomcat 3.2.1 Admin Context

2001-09-06 Thread Ed Yu

Yes, I've found this to be true in 3.2.2 and 3.2.3 also. I've ask around and
no-one seems to be willing to look into fixing it in the distribution.

-Original Message-
From: Oliver Szymanski [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 06, 2001 8:46 AM
To: '[EMAIL PROTECTED]'
Subject: [PATCH] Tomcat 3.2.1 Admin Context


> Hello *,
> 
> i have found an error in the admin context of tomcat 3.2.3 and hopefully
> corrected it.
> 
> You can not use the function "view all contexts" because this
> functionality throws an error.
> 
> The problem is that the method  "public final static String
> URLDecode(String str)" in the class org.apache.tomcat.util.RequestUtil
> can't decode a string that contains the char "/".
> 
> But it is used in the class "ContextAdmin" of the admin context of tomcat
> 3 to decode the value of the property "work dir" from a context (line 122
> of the file "ContextAdmin.java"). This throws an exception, because of the
> reason this property is an directory path it certainly has "/" in it.
> 
> I have exchanged the line 76:
> v.addElement("WORK DIR: " +
> RequestUtil.URLDecode(context.getWorkDir().getName()));
> with
> v.addElement("WORK DIR: " +
> java.net.URLDecoder.decode(context.getWorkDir().getName()));
> 
> and the line 92
> v.addElement("ATTRIBUTE: " +
> RequestUtil.URLDecode(context.getAttribute(key).toString()));
> with
> v.addElement("ATTRIBUTE: " +
> java.net.URLDecoder.decode(context.getAttribute(key).toString()));
> 
> and everything's working fine.
> 
> 
> 
> Oliver Szymanski 
> Technology Specialist
> BOV Aktiengesellschaft
> Voice: +49 201/ 4513 - 067 
> Fax: +49 201/ 4513 - 149 
> Mobil: +49 172 / 27 27 504 
> mailto:[EMAIL PROTECTED]
> visit our new website: http://www.bov.de
> subscribe to our newsletter: http://www.bov.de/presse/newsletter.asp
> 
> Web your knowledge - nun auch im Internet. Besuchen sie unser neues Portal
> www.bazaar42.de  mit vielfältigen Informationen
> rund um "Bazaar42" - der webbasierten Software von BOV. Weitere
> Informationen: . Wir freuen uns auf Ihren Besuch.
> 
> Wie Sie wissen, koennen ueber das Internet versandte eMails leicht unter
> fremden Namen erstellt oder manipuliert werden. Aus diesem Grunde bitten
> wir um Verstaendnis dafuer, dass wir zu Ihrem und unserem Schutz die
> rechtliche Verbindlichkeit der vorstehenden Erklaerungen und Aeusserungen
> ausschliessen. 
> As you are probably aware, e-mails sent via the Internet can easily be
> copied or manipulated by third parties. For this reason we would ask for
> your understanding that, for your own protection and ours, we must decline
> all legal responsibility for the validity of the statements and comments
> given above. 
> 
> 
> 
> 
 



AW: LinkageError: duplicate Class definition

2001-09-06 Thread Peter Romianowski

ok, i try to develop a test case (and environment). but my first attempt to
reproduce the error in that testcase failed (even though it remains in my
"real" application). here's a short doc on what's happening:
1. i start tomcat with tomcat/bin/catalina.sh -config myserver.xml - file
follows

tomcat startup message

Using CLASSPATH:
c:/tools/java/tomcat4/bin/bootstrap.jar;c:\tools\java\jdk\1.3.1/lib/tools.ja
r
Using CATALINA_HOME: c:/tools/java/tomcat4
Starting service Tomcat-Standalone
Apache Tomcat/4.0-b7
WebappLoader[]: Deploying class repositories to work directory
o:\coreg\projects\main\devenv\tomcat\work
WebappLoader[]: Deploy JAR /WEB-INF/lib/peroframework.jar to
o:\coreg\projects\main\devenv\www\WEB-INF\lib\peroframework
.jar
WebappLoader[]: Deploy JAR /WEB-INF/lib/coregmain.jar to
o:\coreg\projects\main\devenv\www\WEB-INF\lib\coregmain.jar
WebappLoader[]: Deploy JAR /WEB-INF/lib/parser.jar to
o:\coreg\projects\main\devenv\www\WEB-INF\lib\parser.jar
WebappLoader[]: Deploy JAR /WEB-INF/lib/ecs-1.4.1.jar to
o:\coreg\projects\main\devenv\www\WEB-INF\lib\ecs-1.4.1.jar
WebappLoader[]: Deploy JAR /WEB-INF/lib/jaxp.jar to
o:\coreg\projects\main\devenv\www\WEB-INF\lib\jaxp.jar
WebappLoader[]: Deploy JAR /WEB-INF/lib/mail.jar to
o:\coreg\projects\main\devenv\www\WEB-INF\lib\mail.jar
WebappLoader[]: Deploy JAR /WEB-INF/lib/mysqljdbc202.jar to
o:\coreg\projects\main\devenv\www\WEB-INF\lib\mysqljdbc202.j
ar
WebappLoader[]: Deploy JAR /WEB-INF/lib/activation.jar to
o:\coreg\projects\main\devenv\www\WEB-INF\lib\activation.jar
StandardManager[]: Seeding random number generator class
java.security.SecureRandom
StandardManager[]: Seeding of random number generator has been completed
StandardWrapper[:default]: Loading container servlet default
default: init
StandardWrapper[:invoker]: Loading container servlet invoker
invoker: init
StandardWrapper[:jsp]: Using Jasper classloader for servlet jsp
jsp: init
__coregapplication: init <--- THIS IS MY SERVLET


2. i've written a servlet which is executed on tomcat-startup (web.xml
1000)
3. within the init method i start some threads that are alive throughout the
whole server-lifetime
4. upon first execution there's the linkage-error

trace:

[Thu Sep 06 15:17:00 CEST 2001:
coreg.mail.campaignuser.ReceiveDaemon.service]
[[RecieveDaemon] unsubscribe] fatal exception
java.lang.LinkageError: duplicate class definition:
com/sun/mail/pop3/POP3Store
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
ader.java:1484)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav
a:851)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1230)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1113)
at javax.mail.Session.getService(Session.java:587)
at javax.mail.Session.getStore(Session.java:402)
at javax.mail.Session.getStore(Session.java:364)
at javax.mail.Session.getStore(Session.java:343)
at pero.mail.Pop3Handler.connect(Pop3Handler.java:38)
at
coreg.mail.campaignuser.ReceiveDaemon.service(ReceiveDaemon.java:172)
at pero.common.Deamon.run(Deamon.java:94)

my server.xml:





  
  








  
  

  

  
  







  



  





you are right: the error upon jsp-compilation disappeared (i did not recheck
after switching to tomcat 4b07 right after its release)

hope this helps (you to help me) - thanks again, i appreciate your work. as
i said i'm trying to build the testcase. perhaps i have to strip down my
application to gain the test case... but perhaps this is only a
configuration fault or there's a workaround... (for now the workaround is,
that i simply catch the error for i know that the second run works - i could
live with that if i am the only one struggling with this)...

sincerly,
pero



-Ursprüngliche Nachricht-
Von: Remy Maucherat [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 6. September 2001 03:59
An: [EMAIL PROTECTED]
Betreff: Re: LinkageError: duplicate Class definition


> hi there,
>
> I got a weird problem getting on here. I'm using tomcat 4b07 on both
win2000
> and linux.
> after startup I start some threads and when they execute for the first
time
> I get a LinkageError: duplicate Class definition.
> there are 4 things with this I dont understand:
> 1st: all classes are there exactly once. no jar is twice within the
> classpath (I checked that a dozen times)
> 2nd: the error occurs only when the thread is executing for the very first
> time. after each execution I wait some amount of time (Thread.sleep) and
> when the code which crashed before is re-executed everything works fi

[PATCH] Tomcat 3.2.1 Admin Context

2001-09-06 Thread Oliver Szymanski

> Hello *,
> 
> i have found an error in the admin context of tomcat 3.2.3 and hopefully
> corrected it.
> 
> You can not use the function "view all contexts" because this
> functionality throws an error.
> 
> The problem is that the method  "public final static String
> URLDecode(String str)" in the class org.apache.tomcat.util.RequestUtil
> can't decode a string that contains the char "/".
> 
> But it is used in the class "ContextAdmin" of the admin context of tomcat
> 3 to decode the value of the property "work dir" from a context (line 122
> of the file "ContextAdmin.java"). This throws an exception, because of the
> reason this property is an directory path it certainly has "/" in it.
> 
> I have exchanged the line 76:
> v.addElement("WORK DIR: " +
> RequestUtil.URLDecode(context.getWorkDir().getName()));
> with
> v.addElement("WORK DIR: " +
> java.net.URLDecoder.decode(context.getWorkDir().getName()));
> 
> and the line 92
> v.addElement("ATTRIBUTE: " +
> RequestUtil.URLDecode(context.getAttribute(key).toString()));
> with
> v.addElement("ATTRIBUTE: " +
> java.net.URLDecoder.decode(context.getAttribute(key).toString()));
> 
> and everything's working fine.
> 
> 
> 
> Oliver Szymanski 
> Technology Specialist
> BOV Aktiengesellschaft
> Voice: +49 201/ 4513 - 067 
> Fax: +49 201/ 4513 - 149 
> Mobil: +49 172 / 27 27 504 
> mailto:[EMAIL PROTECTED]
> visit our new website: http://www.bov.de
> subscribe to our newsletter: http://www.bov.de/presse/newsletter.asp
> 
> Web your knowledge - nun auch im Internet. Besuchen sie unser neues Portal
> www.bazaar42.de  mit vielfältigen Informationen
> rund um "Bazaar42" - der webbasierten Software von BOV. Weitere
> Informationen: . Wir freuen uns auf Ihren Besuch.
> 
> Wie Sie wissen, koennen ueber das Internet versandte eMails leicht unter
> fremden Namen erstellt oder manipuliert werden. Aus diesem Grunde bitten
> wir um Verstaendnis dafuer, dass wir zu Ihrem und unserem Schutz die
> rechtliche Verbindlichkeit der vorstehenden Erklaerungen und Aeusserungen
> ausschliessen. 
> As you are probably aware, e-mails sent via the Internet can easily be
> copied or manipulated by third parties. For this reason we would ask for
> your understanding that, for your own protection and ours, we must decline
> all legal responsibility for the validity of the statements and comments
> given above. 
> 
> 
> 
> 
 



RE: isapi_redirect.dll

2001-09-06 Thread Marc Saegesser

Questions like this should be posted to the TOMCAT-USER list, not the
developers' list.  This question has been asked and answered more times then
I care to count on TOMCAT-USER.  I suggest your search the archives.  The
problem is either the isapi_redirect.dll was corrupted during download (not
likely, but it has happened) or your registry entries are wrong (very
likely).


Marc Saegesser

> -Original Message-
> From: Golash Rahul [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 06, 2001 5:27 AM
> To: [EMAIL PROTECTED]
> Subject: RE: isapi_redirect.dll
>
>
> Dear All,
> i am trying to configure the TOMACAT version 3.2.3 with IIS WebServer.
> while loading the specified dll named 'isapi_redirect.dll', it fails.
> Eventvwr says that given error message
> "The HTTP Filter DLL
> D:\jakarta-tomcat-3.2.3\bin\win32\i386\isapi_redirect.dll failed to
> load.
> The data is the error. "
>
> i have make sure that dll is proper while looking its dependancy through
> dependancy walker.
>
> anyone having any suggesions?
>
> regards
> rahul
>
> -Original Message-
> From: Kevin Seguin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 27, 2001 11:57 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: isapi_redirect.dll
>
>
> see the following:
> http://jakarta.apache.org/site/binindex.html
>
> i believe what you are looking for is this:
> http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.3/bin/win32
> /i38
> 6/
>
> > -Original Message-
> > From: Golash Rahul
> > Sent: Monday, August 27, 2001 7:07 AM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: isapi_redirect.dll
> >
> >
> > Hi there,
> > Where can i find the isapi_redirect.dll which is required to redirect
> > the requests to tomcat server while using IIS Web server as a
> > front server
> > for the Servlets on WinNT.
> >
> > Please acknowledge soon.
> >
> > with best regards
> > rahul golash
>




Help trying to compile nsapi_redirector.so

2001-09-06 Thread abdullah . h . rashid

Help!

We are trying to use the iPlanet 4.1 as a front end Web Server that is
passing through to Tomcat 3.2 servlet engine as part of the backend.  Both
servers are sitting on the Solaris 2.6 OS.  The problem I have been having
is that Makefile.solaris is not allowing me to compile successfully.

First, I was wondering if anyone was able to compile on this plateform
successfully with the latest version of *.c as well as the
Makefile.solaris?

Second, has anyone complied the code with the files in the native/jk
directory (where the jk*.c and jk*.h files exist) for Tomcat 3.2.2? or
should I be using another version of those c and header files?

Third, I am getting the following message in the stdout when I run the make
-f Makefile.solaris file:

gcc -DNET_SSL -DSOLARIS -D_REENTRANT -D_LP64 -DMCC_HTTPD -DXP_UNIX
-DSPAPI20 -DSOLARIS -Wall -I/opt/iplanet/webserver/plugins/include
-I/opt/iplanet/webserver/plugins/include/base
-I/opt/iplanet/webserver/plugins/include/frame -I/usr/java/include
-I/usr/java/include/solaris -I/export/home/arashid/nsapi_plugin/jk -c
jk_ajp12_worker.c
In file included from /usr/include/sys/turnstile.h:12,
 from /usr/include/sys/t_lock.h:20,
 from /usr/include/sys/vnode.h:37,
 from /usr/include/sys/stream.h:21,
 from /usr/include/netinet/in.h:38,
 from /usr/include/netdb.h:96,
 from jk_global.h:82,
 from jk_logger.h:65,
 from jk_ajp12_worker.h:65,
 from jk_ajp12_worker.c:63:
/usr/local/lib/gcc-lib/sparc-sun-solaris2.3/2.7.2.3/include/sys/param.h:175:


warning: `NBBY' redefined
/usr/include/sys/select.h:45: warning: this is the location of the previous
definition
In file included from /usr/include/sys/stream.h:21,
 from /usr/include/netinet/in.h:38,
 from /usr/include/netdb.h:96,
 from jk_global.h:83,
 from jk_logger.h:65,
 from jk_ajp12_worker.h:65,
 from jk_ajp12_worker.c:63:
/usr/include/sys/vnode.h:162: parse error before `u_offset_t'
/usr/include/sys/vnode.h:162: warning: no semicolon at end of struct or
union
/usr/include/sys/vnode.h:170: parse error before `}'
/usr/include/sys/vnode.h:170: warning: data definition has no type or
storage class
/usr/include/sys/vnode.h:278: parse error before `intptr_t'
/usr/include/sys/vnode.h:331: parse error before `u_offset_t'
In file included from /usr/include/netdb.h:96,
 from jk_global.h:83,
 from jk_logger.h:65,
 from jk_ajp12_worker.h:65,
 from jk_ajp12_worker.c:63:
/usr/include/netinet/in.h:156: parse error before `uint32_t'
/usr/include/netinet/in.h:156: warning: no semicolon at end of struct or
union
/usr/include/netinet/in.h:156: warning: no semicolon at end of struct or
union
/usr/include/netinet/in.h:160: warning: data definition has no type or
storage class
/usr/include/netinet/in.h:167: parse error before `}'
/usr/include/netinet/in.h:226: field `sin_addr' has incomplete type
/usr/include/netinet/in.h:286: field `imr_multiaddr' has incomplete type
/usr/include/netinet/in.h:287: field `imr_interface' has incomplete type
In file included from jk_global.h:89,
 from jk_logger.h:65,
 from jk_ajp12_worker.h:65,
 from jk_ajp12_worker.c:63:
/usr/include/arpa/inet.h:53: warning: parameter has incomplete type
/usr/include/arpa/inet.h:55: warning: parameter has incomplete type
/usr/include/arpa/inet.h:57: warning: parameter has incomplete type
*** Error code 1
make: Fatal error: Command failed for target `jk_ajp12_worker.o'

Any guidance on what I might be doing wrong would greatly appreciated.
Please not that I did have to add the -D_LP64 line because for some reason
defined constant in the /usr/include/sys/ folder was not set correctly.

Fourth if I cannot still overcome the error that I am getting from above is
there anywhere that I can get a complied version of the binary *.so or does
anyone have a better suggestion?


Abdul


PS Thank you ahead of time for anyone that can give me some direction on
this issue.
This message is for the designated recipient only and may contain
privileged or confidential information.  If you have received it in error,
please notify the sender immediately and delete the original.  Any other
use of the email by you is prohibited.
This message is for the designated recipient only and may contain
privileged or confidential information.  If you have received it in error,
please notify the sender immediately and delete the original.  Any other
use of the email by you is prohibited.




RE: isapi_redirect.dll

2001-09-06 Thread Golash Rahul

Dear All,
i am trying to configure the TOMACAT version 3.2.3 with IIS WebServer. 
while loading the specified dll named 'isapi_redirect.dll', it fails.
Eventvwr says that given error message
"The HTTP Filter DLL
D:\jakarta-tomcat-3.2.3\bin\win32\i386\isapi_redirect.dll failed to load.
The data is the error. "

i have make sure that dll is proper while looking its dependancy through
dependancy walker. 

anyone having any suggesions?

regards
rahul

-Original Message-
From: Kevin Seguin [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 27, 2001 11:57 PM
To: '[EMAIL PROTECTED]'
Subject: RE: isapi_redirect.dll


see the following:
http://jakarta.apache.org/site/binindex.html

i believe what you are looking for is this:
http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.3/bin/win32/i38
6/

> -Original Message-
> From: Golash Rahul 
> Sent: Monday, August 27, 2001 7:07 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: isapi_redirect.dll
> 
> 
> Hi there,
> Where can i find the isapi_redirect.dll which is required to redirect
> the requests to tomcat server while using IIS Web server as a 
> front server
> for the Servlets on WinNT.
> 
> Please acknowledge soon.
> 
> with best regards
> rahul golash



cvs commit: jakarta-tomcat-connectors/jk/native configure.in

2001-09-06 Thread jfclere

jfclere 01/09/06 01:49:39

  Modified:jk/native configure.in
  Log:
  Improve the error message with the given apxs is no valid.
  
  Revision  ChangesPath
  1.12  +3 -3  jakarta-tomcat-connectors/jk/native/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/configure.in,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- configure.in  2001/08/31 12:16:56 1.11
  +++ configure.in  2001/09/06 08:49:39 1.12
  @@ -1,7 +1,7 @@
   dnl
   dnl Process this file with autoconf to produce a configure script
   dnl
  -AC_REVISION($Id: configure.in,v 1.11 2001/08/31 12:16:56 jfclere Exp $)dnl
  +AC_REVISION($Id: configure.in,v 1.12 2001/09/06 08:49:39 jfclere Exp $)dnl
   
   AC_PREREQ(2.13)
   AC_INIT(common/jk_ajp13.h)
  @@ -73,10 +73,10 @@
   AC_MSG_ERROR(Invalid location for apxs: '${APXS}')
   fi
   
  -$APXS -q PREFIX >/dev/null 2>/dev/null || apxs_support=false
  +${APXS} -q PREFIX >/dev/null 2>/dev/null || apxs_support=false
   
   if ${TEST} "${apxs_support}" = "false" ; then
  -AC_MSG_RESULT(could not find apxs)
  +AC_MSG_RESULT(could not find ${APXS})
   AC_MSG_ERROR(You must specify a valid --with-apxs path)
   fi
   
  
  
  



RE: Patch for mod_jk and Apache 2.0

2001-09-06 Thread GOMEZ Henri

Thanks a log Ryan and Will :)

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



>-Original Message-
>From: Ryan Bloom [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, September 06, 2001 2:22 AM
>To: [EMAIL PROTECTED]
>Subject: Patch for mod_jk and Apache 2.0
>
>
>
>This patch allows mod_jk to successfully serve pages against Apache 2.0
>and Tomcat 4.0.  This is required after the changes to 
>abstract out location
>and directory walks from the core request processing.  This 
>was created by
>Will Rowe and myself.
>
>Ryan
>
>Index: mod_jk.c
>===
>RCS file: 
>/home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/
>mod_jk.c,v
>retrieving revision 1.18
>diff -u -d -b -w -u -r1.18 mod_jk.c
>--- mod_jk.c   2001/09/04 10:57:03 1.18
>+++ mod_jk.c   2001/09/06 00:17:28
>@@ -1333,13 +1333,22 @@
> return DECLINED;
> }
> 
>+static int jk_map_to_storage(request_rec *r)
>+{
>+if (apr_table_get(r->notes, JK_WORKER_ID)) {
>+r->filename = apr_filename_of_pathname(r->uri);
>+return OK;
>+}
>+return DECLINED;
>+}
>+
> static void jk_register_hooks(apr_pool_t *p)
> {
> ap_hook_handler(jk_handler, NULL, NULL, APR_HOOK_MIDDLE);
> ap_hook_post_config(jk_post_config,NULL,NULL,APR_HOOK_MIDDLE);
> ap_hook_child_init(jk_child_init,NULL,NULL,APR_HOOK_MIDDLE);
> ap_hook_translate_name(jk_translate,NULL,NULL,APR_HOOK_FIRST);
>-
>+ap_hook_map_to_storage(jk_map_to_storage, NULL, NULL, 
>APR_HOOK_MIDDLE);
> }
> 
> module AP_MODULE_DECLARE_DATA jk_module =
>
>
>__
>Ryan Bloom [EMAIL PROTECTED]
>Covalent Technologies  [EMAIL PROTECTED]
>--
>
>
>