RE: Jasper 2 Question
Lenny, disclaimer: I don't use JSP's myself so I might be totally off here... but there is the following comment in Tomcat 4.1 Release Notes: -- Using Jasper 1 with Tomcat 4.1: -- It is possible to use Jasper 1 (included in Tomcat 4.0.x) with Tomcat 4.1, as it has the same API and supports the same JSP API. To use Jasper 1 instead of Jasper 2, copy the two following JARs to $CATALINA_HOME/common/lib (overwriting the two existing JARs): * $TOMCAT40_HOME/lib/jasper-runtime.jar * $TOMCAT40_HOME/lib/jasper-compiler.jar However, users are urged to use the version of Jasper included with Tomcat 4.1 (Jasper 2), as it has much higher performance and scalability than Jasper 1. would switching back to Jasper 1 help? Julius -Original Message- From: Lenny Karpel [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 3:28 PM To: 'Tomcat Developers List' Subject: RE: Jasper 2 Question ok .. now I am really confused .. here is the tomcat development group .. the 'Official Reference Implementation' for JSP .. and I am being told by people within this group .. to NOT use it .. this is truly amazing .. how can this possibly be .. my original question is about 'bugs' in jasper2 .. not about what tools I should use .. my question is not one of religion .. once again .. the quote from the intellij site .. As for Tomcat 4.1.x support, I'm afraid we are out-of-luck here. Tomcat 4.0.4 used to generate useful comments in the servlet code, that allowed the integration plugin to map jsp line numbers to servlet line numbers. But from the new version of Tomcat (Jasper2 in particular), this functionality is missing. At least I haven't been able to find anything to enable comment generation, and nobody from Tomcat user-list answered my question about this. for myself .. all I want to know .. is if this 'situation' in jasper2 will be fixed .. if so .. when .. if not .. why .. we use JSP here .. as do quite a few others .. in quite a few places .. i did not post this question to find out that the developers of JSP (jasper) would rather I use something else .. could this possibly be how the 'managers' of this development effort feel ?? -Original Message- From: Bojan Smojver [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 3:25 PM To: Tomcat Dev List Subject: RE: Jasper 2 Question On Fri, 2002-09-20 at 04:30, Lenny Karpel wrote: is it right that when I ask a serious question about jasper2 that I get these totally ridiculous answers ? Well, Jon and Pier are known to throw in a curly one from time to time, which keeps all of us here on the list in good spirits ;-) Anyway, there is a serious side to all this as JSP's are inherently evil. You'll find that creating true MVC applications in Velocity is almost trivial. I suggest you do read Jon's article. The fact that JSP's are official, doesn't mean they are good. Bojan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Here we go again - mod_webapp and mod_rewrite
Pier, I have a releated question - does it also mean that currently mod_webapp will not work with Apache 2 that uses worker mpm? thanks Julius Gawlas -Original Message- From: Pier Fumagalli [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 07, 2002 9:57 AM To: Tomcat Developers List Subject: Re: Here we go again - mod_webapp and mod_rewrite Brendan Benke [EMAIL PROTECTED] wrote: touche! so let me ask you this, what are some alternative connectors? mod_webapp seems like the most current and best idea. We're woring on mod_webapp for Apache 2.0, and that will work with windows as well, now that Aaron wrote the APR resourcelist, we're really close to completion. Pier -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Jk2: missing Makefiles/configure?
Hi, I wanted to build jk2, but I could not find neither configure nor makefiles in jk/native2. Could you give me some pointers? thanks Julius -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PATCH] latest mod_jk and Apache 2.0 initialization (reposting)
I am reposting that patch again - let me know if there are any questions or concerns. Seems like the latest j-t-c mod_jk calls initialization (init_jk) twice - once during post_config and then in child_init. This has a side effect of trying to create non existing workers and subsequently failing. Enclosed simple patch prevents second initialization call. Julius Index: mod_jk.c === RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v retrieving revision 1.39 diff -u -r1.39 mod_jk.c --- mod_jk.c2001/12/04 21:38:26 1.39 +++ mod_jk.c2001/12/05 23:56:17 @@ -1473,7 +1473,10 @@ jk_server_conf_t *conf = (jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module); -init_jk( pconf, conf, s ); +if(!conf-was_initialized) { +conf-was_initialized = JK_TRUE; + init_jk( pconf, conf, s ); + } } /** Initialize jk, using worker.properties. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PATCH] latest mod_jk and Apache 2.0 initialization
Seems like the latest j-t-c mod_jk calls initialization (init_jk) twice - once during post_config and then in child_init. This has a side effect of trying to create non existing workers and subsequently failing. Enclosed simple patch prevents second initialization call. Julius Index: mod_jk.c === RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v retrieving revision 1.39 diff -u -r1.39 mod_jk.c --- mod_jk.c2001/12/04 21:38:26 1.39 +++ mod_jk.c2001/12/05 23:56:17 @@ -1473,7 +1473,10 @@ jk_server_conf_t *conf = (jk_server_conf_t *)ap_get_module_config(s-module_config, jk_module); -init_jk( pconf, conf, s ); +if(!conf-was_initialized) { +conf-was_initialized = JK_TRUE; + init_jk( pconf, conf, s ); + } } /** Initialize jk, using worker.properties. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
mod_jk inprocess worker and Apache 2.0 not working
I am trying to make inprocess tomcat work with Apache 2.0 without much success. I am using j-t-c mod_jk from cvs. First I noticed that since Apache calls module initialization twice jni worker fails when trying to load jvm the second time. I found in the archives that that issue has been adressed in the mod_jk that goes along tomcat 3.3 so I took changes to loading JVM and applied them to j-t-c jk_jni_worker.c. Now JVM initializes properly but it failes when calling tomcat inside service() method. Maybe there are more changes neccessary to make it work? Note that when I temporarly fix Apache to avoid double call to initialization all works fine. Any ideas? Thanks Julius Here is the patch that I applied to j-t-c jk_jni_worker.c Index: jk_jni_worker.c === RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/common/jk_jni_worker.c,v retrieving revision 1.6 diff -u -r1.6 jk_jni_worker.c --- jk_jni_worker.c 2001/11/17 06:00:24 1.6 +++ jk_jni_worker.c 2001/12/04 17:26:50 @@ -751,9 +751,10 @@ dlerror()); } else { jni_create_java_vm = dlsym(handle, JNI_CreateJavaVM); +jni_get_created_java_vms = dlsym(handle, JNI_GetCreatedJavaVMs); jni_get_default_java_vm_init_args = dlsym(handle, JNI_GetDefaultJavaVMInitArgs); -if(jni_create_java_vm jni_get_default_java_vm_init_args) { +if(jni_create_java_vm jni_get_default_java_vm_init_args jni_get_created_java_vms) { jk_log(l, JK_LOG_DEBUG, In load_jvm_dll, symbols resolved, done\n); return JK_TRUE; @@ -931,7 +932,7 @@ int optn = 0, err; char* tmp; -*env = NULL; +*env = penv = NULL; jk_log(l, JK_LOG_DEBUG, Into open_jvm2\n); @@ -992,10 +993,25 @@ } jk_log(l, JK_LOG_DEBUG, In open_jvm2, about to create JVM...\n); + +err=jni_create_java_vm((p-jvm), penv, vm_args); + +if (JNI_EEXIST == err) +{ +int vmCount; + jk_log(l, JK_LOG_DEBUG, JVM alread instantiated. Trying to attach instead.\n); + +jni_get_created_java_vms((p-jvm), 1, vmCount); +if (NULL != p-jvm) +penv = attach_to_jvm(p, l); -if((err=jni_create_java_vm((p-jvm), penv, vm_args)) != 0) { +if (NULL != penv) +err = 0; +} + +if(err != 0) { jk_log(l, JK_LOG_EMERG, Fail- could not create JVM, code: %d \n, err); -return JK_FALSE; +return JK_FALSE; } jk_log(l, JK_LOG_DEBUG, In open_jvm2, JVM created, done\n); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mod_jk inprocess worker and Apache 2.0 not working
Costin, The main problem with JNI and apache is that we can't support sessions corectly. Apache is a multi-process server ( even apache2.0 - each process has multiple threads, but it's still multiprocess ). Thanks for quick answer, but I don't think I can quite see contradiction here - I would appreciate very much if you can expand on the explanation. BTW, few days ago I posted a patch to t-j-c mod_jk.c for Apache 2.0. Most important is the change in prototype of jk_post_config which used to be void but now needs to return success code, also changes to types of some variables to better confirm to Apache 2.0 types. I am attaching it again since as it stands now mod_jk does not work with Apache 2.0. Thanks again Julius Index: mod_jk.c === RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v retrieving revision 1.37 diff -u -r1.37 mod_jk.c --- mod_jk.c2001/11/21 00:09:21 1.37 +++ mod_jk.c2001/11/30 23:58:13 @@ -110,9 +110,8 @@ #define ADD_SSL_INFO /* module MODULE_VAR_EXPORT jk_module; */ -AP_DECLARE_DATA module jk_module; +AP_MODULE_DECLARE_DATA module jk_module; - typedef struct { /* @@ -326,7 +325,7 @@ /* Debug - try to get around rwrite */ while( ll 0 ) { -long toSend=(llCHUNK_SIZE) ? CHUNK_SIZE : ll; +size_t toSend=(llCHUNK_SIZE) ? CHUNK_SIZE : ll; r = ap_rwrite((const char *)bb, toSend, p-r ); jk_log(main_log, JK_LOG_DEBUG, writing %ld (%ld) out of %ld \n,toSend, r, ll ); @@ -535,7 +534,7 @@ } if(conf-envvars_in_use) { -apr_array_header_t *t = apr_table_elts(conf-envvars); +const apr_array_header_t *t = apr_table_elts(conf-envvars); if(t t-nelts) { int i; apr_table_entry_t *elts = (apr_table_entry_t *)t-elts; @@ -563,7 +562,7 @@ s-num_headers = 0; if(r-headers_in apr_table_elts(r-headers_in)) { int need_content_length_header = (!s-is_chunked s-content_length == 0) ? JK_TRUE : JK_FALSE; -apr_array_header_t *t = apr_table_elts(r-headers_in); +const apr_array_header_t *t = apr_table_elts(r-headers_in); if(t t-nelts) { int i; apr_table_entry_t *elts = (apr_table_entry_t *)t-elts; @@ -1514,7 +1513,7 @@ return; } -static void jk_post_config(apr_pool_t *pconf, +static int jk_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) @@ -1528,6 +1527,7 @@ init_jk( pconf, conf, s ); } } + return OK; } /** Use the internal mod_jk mappings to find if this is a request for -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mod_jk inprocess worker and Apache 2.0 not working
Costin, With JNI, each apache process will have it's own VM and will process requests. If a session is created, it'll be in one of the VMs, and the servlet spec requires that all further requets within that session go to the same VM. This is not possible right now - a second request can be received by another process/VM and jniworker can't forward it right now. Ahhh, of course - I guess I was not really connecting correctly, was not thinking about that; thanks for explanations. We have most of the code ( in lb_worker ), but we need to enable it. cool, looking forward to seeing it Julius -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PATCH] mod_jk for Apache 2.0 minor fixes
This patch contains minor fixes for mod_jk for Apache 2.0; Most important is the change in prototype of jk_post_config which used to be void but now needs to return success code, also changes to types of some variables to better confirm to Apache 2.0 types. Let me know if you have any comments. Julius Index: mod_jk.c === RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v retrieving revision 1.37 diff -u -r1.37 mod_jk.c --- mod_jk.c2001/11/21 00:09:21 1.37 +++ mod_jk.c2001/11/30 23:58:13 @@ -110,9 +110,8 @@ #define ADD_SSL_INFO /* module MODULE_VAR_EXPORT jk_module; */ -AP_DECLARE_DATA module jk_module; +AP_MODULE_DECLARE_DATA module jk_module; - typedef struct { /* @@ -326,7 +325,7 @@ /* Debug - try to get around rwrite */ while( ll 0 ) { -long toSend=(llCHUNK_SIZE) ? CHUNK_SIZE : ll; +size_t toSend=(llCHUNK_SIZE) ? CHUNK_SIZE : ll; r = ap_rwrite((const char *)bb, toSend, p-r ); jk_log(main_log, JK_LOG_DEBUG, writing %ld (%ld) out of %ld \n,toSend, r, ll ); @@ -535,7 +534,7 @@ } if(conf-envvars_in_use) { -apr_array_header_t *t = apr_table_elts(conf-envvars); +const apr_array_header_t *t = apr_table_elts(conf-envvars); if(t t-nelts) { int i; apr_table_entry_t *elts = (apr_table_entry_t *)t-elts; @@ -563,7 +562,7 @@ s-num_headers = 0; if(r-headers_in apr_table_elts(r-headers_in)) { int need_content_length_header = (!s-is_chunked s-content_length == 0) ? JK_TRUE : JK_FALSE; -apr_array_header_t *t = apr_table_elts(r-headers_in); +const apr_array_header_t *t = apr_table_elts(r-headers_in); if(t t-nelts) { int i; apr_table_entry_t *elts = (apr_table_entry_t *)t-elts; @@ -1514,7 +1513,7 @@ return; } -static void jk_post_config(apr_pool_t *pconf, +static int jk_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) @@ -1528,6 +1527,7 @@ init_jk( pconf, conf, s ); } } + return OK; } /** Use the internal mod_jk mappings to find if this is a request for -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]