cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_uriEnv.h
costin 02/04/29 23:41:18 Modified:jk/native2/include jk_uriEnv.h Log: Reorganize the struct, add support for storing vhost and context settings. The mapping is now done in the same way as in tomcat: first vhost and context, then exact, prefix and suffix rules. We use a tree structure ( only 3 levels ) - other optimizations are possible but probably less effective. Revision ChangesPath 1.11 +48 -33jakarta-tomcat-connectors/jk/native2/include/jk_uriEnv.h Index: jk_uriEnv.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_uriEnv.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- jk_uriEnv.h 29 Apr 2002 19:35:35 - 1.10 +++ jk_uriEnv.h 30 Apr 2002 06:41:18 - 1.11 @@ -118,50 +118,74 @@ struct jk_workerEnv *workerEnv; -struct jk_webapp *webapp; - +struct jk_uriMap *uriMap; + /* Generic name/value properties. Some workers may use it. */ struct jk_map *properties; -/* Original uri ( unparsed ) +/* Properties extracted from the URI name -- */ +/** Full name */ +char *name; + +/* Virtual server handled - NULL means 'global' ( visible in all + * virtual servers ). Part of the uri name. + */ +char *virtual; + +/* Original uri ( unparsed ). Part of the uri name. */ char *uri; -/** XXX todo. +/* Properties set using setAttribute -- */ +/** ContextPath. Set with 'context' attribute. */ -int status; +char *contextPath; +int ctxt_len; -/** Servlet. No need to compute it again in tomcat +/** ServletName. Set with 'servlet' attribute. */ char *servlet; int servletId; +/** Group, set with 'group' attribute. Defaults to 'lb'. + */ +char *workerName; +struct jk_worker *worker; + +/** Debug for that location. Set with 'debug' + */ +int debug; + +/** For MATCH_TYPE_HOST, the list of aliases for the virtual host. + * Set using (multi-value ) 'alias' attribute on vhost uris. +*/ +struct jk_map *aliases; + +/* Properties extracted from the uri, at init() */ /* Extracted suffix, for extension-based mathces */ char *suffix; +int suffix_len; + +/* Prefix based mapping. Same a contextPath for MATCH_TYPE_CONTEXT + */ char *prefix; - int prefix_len; -int suffix_len; int match_type; -int debug; - -/** Worker associated with this uri -Inherited by virtual host. Defaults to the first declared worker. -( if null == use default worker ). -*/ -struct jk_worker *worker; - -/** worker name - allow this to be set before the worker is defined. - * worker will be set on init. +/** For MATCH_TYPE_HOST, the list of webapps in that host */ -char *workerName; +struct jk_map *webapps; -/** You can fine-tune the logging level per location +/** For MATCH_TYPE_CONTEXT, the list of local mappings */ -int logLevel; +struct jk_map *exactMatch; +struct jk_map *prefixMatch; +struct jk_map *suffixMatch; + +/* Other properties */ + /** Different apps can have different loggers. */ @@ -172,19 +196,10 @@ int envvars_in_use; struct jk_map *envvars; -/* Virtual server handled - NULL means 'global' ( visible in all - * virtual servers ). This is the canonical name. - */ -char *virtual; -int virtualPort; - -/** Uri we're monted on - * The 'id' is the index in the context table ( todo ), it - * reduce the ammount of trafic ( and string creation on java ) +/** XXX . */ -char *context; -int ctxt_len; -int contextId; +/* int status; */ +/* int virtualPort; */ /* Methods */ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_uriMap.h
costin 02/04/29 23:42:35 Modified:jk/native2/include jk_uriMap.h Log: Changed the struct - now uriMap only has a table with the vhosts and the default vhost - the uriEnv representing each host will have a table of contexts, etc. We use the jk_map object instead of char[][]. Probably a bit less efficient but cleaner. Revision ChangesPath 1.12 +6 -10 jakarta-tomcat-connectors/jk/native2/include/jk_uriMap.h Index: jk_uriMap.h === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_uriMap.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- jk_uriMap.h 29 Apr 2002 19:14:25 - 1.11 +++ jk_uriMap.h 30 Apr 2002 06:42:35 - 1.12 @@ -99,10 +99,9 @@ struct jk_uriMap { struct jk_bean *mbean; -/* map URI-WORKER */ -struct jk_uriEnv **maps; -int size; -int capacity; +/* All mappings */ +struct jk_map *maps; + struct jk_workerEnv *workerEnv; int debug; @@ -111,11 +110,8 @@ * level. */ struct jk_map *vhosts; - -/** Managed webapps. Key is VHOST/CONTEXT, value is the - * uriEnv that corresponds to the top level of the webapp. - */ -struct jk_map *webapps; +struct jk_uriEnv *defaultVhost; + /* -- Methods -- */ /** Initialize the map. This should be called after all workers @@ -124,7 +120,7 @@ int (*init)( struct jk_env *env, jk_uriMap_t *_this); void (*destroy)( struct jk_env *env, jk_uriMap_t *_this ); - + int (*addUriEnv)(struct jk_env *env, struct jk_uriMap *uriMap, struct jk_uriEnv *uriEnv); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_uriEnv.c
costin 02/04/29 23:44:57 Modified:jk/native2/common jk_uriEnv.c Log: A bit of reorganization to support the new maping. Note that the 'special' maps are recognized but not curently used in uriMap, we may add them later. Revision ChangesPath 1.13 +133 -55 jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c Index: jk_uriEnv.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- jk_uriEnv.c 29 Apr 2002 19:35:35 - 1.12 +++ jk_uriEnv.c 30 Apr 2002 06:44:57 - 1.13 @@ -69,41 +69,51 @@ #include jk_uriMap.h #include jk_registry.h -static int jk2_uriEnv_init(jk_env_t *env, jk_uriEnv_t *uriEnv); +/** Parse the name: + VHOST/PATH -static int jk2_uriEnv_parseUri( jk_env_t *env, jk_uriEnv_t *uriEnv, -char *name) +If VHOST is empty, we map to the default host. + +The PATH will be further split in CONTEXT/LOCALPATH during init ( after +we have all uris, including the context paths ). +*/ +static int jk2_uriEnv_parseName( jk_env_t *env, jk_uriEnv_t *uriEnv, + char *name) { char *n=name; -char *slash=strchr( n, '/' ); +char *slash=strchr( name, '/' ); +fprintf( stderr, XXX parseURI %s\n, name ); + if( slash==NULL ) { -env-l-jkLog( env, env-l, JK_LOG_ERROR, - uriEnv.parseUri(): At least a '/' must be included %s\n, name); -return JK_ERR; +/* That's a virtual host definition ( no actual mapping, just global + * settings like aliases, etc + */ +uriEnv-match_type= MATCH_TYPE_HOST; +if( name[0]=='\0' ) { +uriEnv-virtual=NULL; /* for the default host */ +} else { +uriEnv-virtual=name; +} +return JK_OK; } -/* Cut the uri. prefix, if any */ -if( (strncmp( name, uri., 4 ) == 0 )|| -(strncmp( name, uri:, 4 ) == 0 )) { -n=name+4; -} -/* Cut the */ -if( *n == '' ) n++; -/* If it doesn't start with /, it must be a vhost */ -if( *n != '/' ) { -char *portIdx=strchr( n, ':' ); -char *vhost=NULL; - -/* XXX Extract and set the vhost */ +/* If it doesn't start with /, it must have a vhost */ +if( *name != '/' ) { +jk_uriEnv_t *vhost; +// char *portIdx=strchr( n, ':' ); +uriEnv-virtual=uriEnv-pool-calloc( env, uriEnv-pool, slash - name + 2 ); +strncpy( uriEnv-virtual, name, slash-name ); } n=slash; uriEnv-uri=uriEnv-pool-pstrdup(env, uriEnv-pool, n); -jk2_uriEnv_init(env, uriEnv); -/* env-l-jkLog( env, env-l, JK_LOG_INFO, */ -/*uriEnv.parseUri() Setting path %s for %s\n, n, name); */ + +/* No further init - will be called by uriMap.init() */ +env-l-jkLog( env, env-l, JK_LOG_INFO, + uriEnv.parseUri() Parsing %s to host=%s uri=%s\n, name, + uriEnv-virtual, uriEnv-uri ); return JK_OK; } @@ -122,7 +132,7 @@ return NULL; } -static int JK_METHOD jk2_uriEnv_setProperty(jk_env_t *env, +static int JK_METHOD jk2_uriEnv_setAttribute(jk_env_t *env, jk_bean_t *mbean, char *nameParam, void *valueP) @@ -135,20 +145,50 @@ uriEnv-properties-add( env ,uriEnv-properties, name, val ); -if( strcmp(worker, name) == 0 ) { + +if( strcmp(group, name) == 0 ) { uriEnv-workerName=val; -} -if( strcmp(debug, name) == 0 ) { +return JK_OK; +} else if( strcmp(context, name) == 0 ) { +jk_bean_t *ctxMB; +jk_uriEnv_t *ctxEnv; +char *cname; + +uriEnv-contextPath=val; +uriEnv-ctxt_len=strlen( val ); + +if( strcmp( val, uriEnv-uri ) == 0 ) { +uriEnv-match_type= MATCH_TYPE_CONTEXT; +} +return JK_OK; +} else if( strcmp(servlet, name) == 0 ) { +uriEnv-servlet=val; +} else if( strcmp(alias, name) == 0 ) { +if( uriEnv-match_type == MATCH_TYPE_HOST ) { +if( uriEnv-aliases==NULL ) { +jk2_map_default_create( env, uriEnv-aliases, mbean-pool ); +} +uriEnv-aliases-put( env, uriEnv-aliases, val, uriEnv, NULL ); +} +} else if( strcmp(debug, name) == 0 ) { uriEnv-debug=atoi( val ); -} -if( strcmp(path, name) == 0 ) { +return JK_OK; +} + +
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_uriMap.c
costin 02/04/29 23:49:21 Modified:jk/native2/common jk_uriMap.c Log: That's the big one for today. Again, the alghoritm is the one from java and from the spec, without any changes. Virtual hosts are mapped corectly, contexts are also mapped corectly. Still not completed - vhost aliases ( few more lines of code needed ). Note that the current code is very sensitive to correct configuration, I started to add some code to auto-set some of the required settings. It is required to define each vhost and webapp - if you set a mapping for an unexistend vhost/webapp you may get a NPE or it won't work. ( it won't be that painfull - the autoconf and better defaults will avoid most manual settings ). Also not completed - WEB-INF filtering and the default settings for each webapp ( servlet/*, *.jsp ) ( there is no reason to ask the user to configure those ) Revision ChangesPath 1.27 +405 -245 jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c Index: jk_uriMap.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- jk_uriMap.c 29 Apr 2002 19:35:35 - 1.26 +++ jk_uriMap.c 30 Apr 2002 06:49:21 - 1.27 @@ -75,18 +75,13 @@ #include jk_uriMap.h #include jk_registry.h -static jk_uriEnv_t *jk2_uriMap_addMapping(jk_env_t *env, jk_uriMap_t *_this, - const char *vhost, - const char *puri, - const char *pworker); - static INLINE const char *jk2_findExtension(jk_env_t *env, const char *uri); -static jk_uriEnv_t *jk2_uriMap_mapUri(jk_env_t *env, jk_uriMap_t *_this, +static jk_uriEnv_t *jk2_uriMap_mapUri(jk_env_t *env, jk_uriMap_t *uriMap, const char *vhost, const char *uri); -static int jk2_uriMap_checkUri(jk_env_t *env, jk_uriMap_t *_this, +static int jk2_uriMap_checkUri(jk_env_t *env, jk_uriMap_t *uriMap, const char *uri); /* @@ -100,30 +95,32 @@ * * Was: check_security_fraud */ -static int jk2_uriMap_checkUri(jk_env_t *env, jk_uriMap_t *_this, +static int jk2_uriMap_checkUri(jk_env_t *env, jk_uriMap_t *uriMap, const char *uri) { int i; -for(i = 0 ; i _this-size ; i++) { -if(MATCH_TYPE_SUFFIX == _this-maps[i]-match_type) { +for(i = 0 ; i uriMap-maps-size( env, uriMap-maps ) ; i++) { +jk_uriEnv_t *uriEnv=uriMap-maps-valueAt( env, uriMap-maps, i ); + +if(MATCH_TYPE_SUFFIX == uriEnv-match_type) { char *suffix_start; -for(suffix_start = strstr(uri, _this-maps[i]-suffix) ; +for(suffix_start = strstr(uri, uriEnv-suffix) ; suffix_start ; suffix_start = -strstr(suffix_start + 1, _this-maps[i]-suffix)) { +strstr(suffix_start + 1, uriEnv-suffix)) { if('.' != *(suffix_start - 1)) { continue; } else { char *after_suffix = suffix_start + -strlen(_this-maps[i]-suffix); +strlen(uriEnv-suffix); if((('.' == *after_suffix) || ('/' == *after_suffix) || (' ' == *after_suffix)) - (0 == strncmp(_this-maps[i]-prefix, uri, - _this-maps[i]-prefix_len))) { + (0 == strncmp(uriEnv-prefix, uri, + uriEnv-prefix_len))) { /* * Security violation !!! * this is a fraud. @@ -139,158 +136,330 @@ } -#define UW_INC_SIZE 4 /* 4 URI-WORKER STEP */ - -/* - * Ensure there will be memory in context info to store Context Bases +/** Add a uri mapping. Called during uri: initialization. Will just copy the +uri in the table ( XXX use a map keyed on name ). In init() we process this +and set the right structures. */ -static int jk2_uriMap_realloc(jk_env_t *env,jk_uriMap_t *_this) +static int jk2_uriMap_addUriEnv( jk_env_t *env, jk_uriMap_t *uriMap, jk_uriEnv_t *uriEnv ) { -if (_this-size == _this-capacity) { -jk_uriEnv_t **uwr=NULL; -int capacity = _this-capacity + UW_INC_SIZE; - -uwr = (jk_uriEnv_t **) -_this-pool-alloc(env, _this-pool, - sizeof(jk_uriEnv_t *) * capacity);
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_apr_socket.c jk_env.c
costin 02/04/29 23:49:45 Modified:jk/native2/common jk_channel_apr_socket.c jk_env.c Log: Other minor fixes. Revision ChangesPath 1.10 +1 -1 jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c Index: jk_channel_apr_socket.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- jk_channel_apr_socket.c 25 Apr 2002 18:46:38 - 1.9 +++ jk_channel_apr_socket.c 30 Apr 2002 06:49:45 - 1.10 @@ -365,7 +365,7 @@ jk_endpoint_t *endpoint) { apr_socket_t *sd; -apr_status_t *rc; +apr_status_t rc; jk_channel_apr_data_t *chD=endpoint-channelData; if( chD==NULL ) 1.20 +8 -3 jakarta-tomcat-connectors/jk/native2/common/jk_env.c Index: jk_env.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- jk_env.c 25 Apr 2002 19:12:57 - 1.19 +++ jk_env.c 30 Apr 2002 06:49:45 - 1.20 @@ -167,10 +167,15 @@ char *type, char *localName ) { jk_env_objectFactory_t fac; -jk_bean_t *result; +jk_bean_t *result=NULL; jk_pool_t *workerPool; char *name; +if( localName!=NULL ) +result=env-getBean2( env, type, localName ); +if( result!=NULL ) +return result; + if( pool==NULL ) { pool=env-globalPool; } @@ -307,7 +312,7 @@ { if( name==NULL ) { env-l-jkLog(env, env-l, JK_LOG_ERROR, -env.getByName(): NullPointerException\n); +env.getBean(): NullPointerException\n); return NULL; } @@ -319,7 +324,7 @@ char *name; if( type==NULL || localName==NULL ) { env-l-jkLog(env, env-l, JK_LOG_ERROR, -env.getByName(): NullPointerException\n); +env.getBean2(): NullPointerException\n); return NULL; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/conf workers2.properties
costin 02/04/29 23:50:05 Modified:jk/conf workers2.properties Log: An update config to test the new mapping. Revision ChangesPath 1.9 +41 -17jakarta-tomcat-connectors/jk/conf/workers2.properties Index: workers2.properties === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/conf/workers2.properties,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- workers2.properties 18 Apr 2002 19:22:54 - 1.8 +++ workers2.properties 30 Apr 2002 06:50:05 - 1.9 @@ -17,13 +17,13 @@ # file=logs/mod_jk.log [shm] -file=${TOMCAT_HOME}/work/jk2.shm +file=${serverRoot}/logs/jk2.shm size=100 Channels # Each channel defines a communication mechanism to a tomcat instance. -# Each channel is associated with a worker.ajp13:NAME, with the same local name +# Each channel is associated with a ajp13:NAME, with the same local name # Default channel @@ -72,7 +72,7 @@ # to work reliably and on all platforms. Same for other java libs. # java script is a good example, Sun needs it to start java and we need it to. # JAVA_HOME and TOMCAT_HOME can be set as environment variables -[vm] +[disabled:vm] # That will work with both 3.x and 4.x. OPT=-Djava.class.path=${TOMCAT_HOME}/bin/tomcat-jni.jar OPT=-Dtomcat.home=${TOMCAT_HOME} @@ -89,23 +89,47 @@ # XXX Uris to be read from separate file, one per webapp. # XXX Webapps to be declared automatically, using webapps/ content :-) -[uri:/examples/servlet/HelloWorldExample] -worker=ajp13:jni -# worker=ajp13:localhost:8009 -# worker=ajp13:unixSocket -[uri:/examples/servlet/RequestHeaderExample] -#worker=ajp13:jni -# worker=ajp13:localhost:8009 -worker=ajp13:unixSocket - -[uri:/examples/servlet/RequestInfoExample] -#worker=ajp13:jni -worker=ajp13:localhost:8009 -# worker=ajp13:unixSocket +### Virtual host definitions ( in the vhost directory ) +# No '/' in the name. +# It _must_ be defined for each virtual host ( or bad things will happen in jk2.0, +# later we might forgive you ) ( either manually or automatically ) + +[uri:localhost:8080] +alias=127.0.0.1:8080 +alias=myLocalHost:8080 + +### Webapps definitions ( in each webapp ) +# The name and context are equals ( that's how we know it's a context definition ) +# Must be defined + +[uri:/examples] +context=/examples +[uri:localhost:8080/examples] +context=/examples # Status worker. XXX protect it with Location and security settings, # it'll display all properties - including eventual secrets. +# +[uri:/jkstatus] +context=/jkstatus + +### Per/uri mappings + +# Exact mapping +[uri:/examples/servlet/RequestHeaderExample] + +# Prefix mapping +[uri:/examples/servlet/RequestInfoExample/*] + +# Extension match +[uri:/examples/*.jsp] + [uri:/jkstatus/*] -worker=worker.status +worker=worker.status: + +## No other forms of mappings are currently supported +# Because the spec doesn't support them. + + -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8552] - malformed URL upon second redirect
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8552. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8552 malformed URL upon second redirect --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 07:19 --- Created an attachment (id=1738) jsp bug example -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8552] - malformed URL upon second redirect
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8552. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8552 malformed URL upon second redirect [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 07:20 --- Here is a jsp that demonstrates the bug. Try calling it with: http://localhost:8080/Expose.jsp?request=newname=se.zenon.wine.redwineall:1 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8552] - malformed URL upon second redirect
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8552. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8552 malformed URL upon second redirect [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||WORKSFORME --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 07:29 --- It works for me with 4.1.0. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: logrotate and tomcat 3.3/4.0/4.1
On the java side ? I think we should just use commons-logging, and the admin/ or manager/ or some other ( java-based code ) to control the underlying logger ( which should probably default to log4j when somebody has the time to do this ). commons-logging seems a good way to hide log4j or jdk14 impl. And is allready present in tomcat-utils which is required for 3.3.2 (may be also 4.x) So everything is in now ? I do some experimentation : I replaced ref to LogHandler with CommonLogHandler, added a log4j.conf and put -Dlog4j.configuration=file:/$TOMCAT_HOME/conf/log4j.conf in tomcat startup script and but tomcat didn't use log from common (still use QueueLogger) Question: commons-loggins should be use in QueueLogger ? There is no need to complicate things with -HUP and java - it isn't difficult ( I even started to work on that in the jk jni code ), but it would be much cleaner/portable/etc to just use java mechanisms. ( of course, JMX is a good choice - and log4j does support JMX ) In latest log4j release or in HEAD ? The good thing with logrotate is that it's something admins known well and use very easily. What about jakarta-service or it's version in commons ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: jakarta-tomcat-connectors documentation/summaries
The only limitation is that it support only 255 methods ( unless we use an expansion ), since it has a byte as method code ( to facilitate table-based dispatching ). 255 methods should be suffisant since we could have the generic get/set property method ;) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: logrotate and tomcat 3.3/4.0/4.1
Whaou. Didn't now about copytruncate option of logrotate. Under Linux there is truncate and ftruncate calls but I wonder how it works regarding OS ? I'll add this to all my tomcat rpm ASAP - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 -Original Message- From: Bojan Smojver [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 12:40 AM To: Tomcat Dev List Subject: RE: logrotate and tomcat 3.3/4.0/4.1 This works (TC 3.3.x): /var/tomcat/logs/*.log { copytruncate weekly rotate 52 compress missingok } 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]
AW: PROPOSAL: mod_jk2 autoconfig
See intermixed -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 29. April 2002 19:17 An: List Tomcat-Dev Betreff: PROPOSAL: mod_jk2 autoconfig Hi, I spent a lot of time on this - and I think this is a very good solution. Please send feedback - the sooner the better... I think the current solution of generating configs on tomcat startup, or having tomcat send it's config to apache is wrong. Basically what I would like to propose is similar with what Glen implemented in jk1 for apache1.3 ( the webapp/ directory auto-conf )- with few enhancements. The major requirement is that mod_jk2 is configured with the location of the webapp/ directory. Inside webapp, it'll look for directories and configure them automatically, like tomcat is doing. I can not see how this works if you have Apache and Tomcat on different machines. This way we do not have a webapp/ directory on that Apache server. Or does this work across several machines? We have two Apache 1.3 servers which are busy serving static contents plus PHP legacy stuff. We run at least 4 Tomcats on two different servers to distribute our webapps. Did I misunderstand the intent of this configuration? Is it a 'best guess' for simple setups? Probably in our scenario we have to configure it manually anyways. Some 'special' files ( like in 4.1 and the 3.3 apps- files ) will also be read and used to load webapps that sit in different directories. same here we are on different machines. In addition, a separate directory ( named ??? ) can be used with a host-based hierarchy. Given that most users are using a single host and the current webapps/ habbits, the vhost hierarchy will be different from the 'default server'. For each discovered webapp ( either directory or CONTEXT.jk2 file ) , jk will look for WEB-INF/jk2/map.properties and load the file. I would need a complete webapp structure for configurating mod_jk2 on a server which does not have any tomcat - and webapp installed. Just make sure, everything in the config can be overwritten and configures manually if possible in a single file (as workers.properties right now) But I agree the concept is nice for simple setups. The map.properties file will be generated from web.xml - using a small tool ( I'll commit the first code shortly ) that is independent of tomcat ( it doesn't require starting tomcat ). It can be used as CLI, as ant task or as a bean inside an admin or deploy application. The tool curently uses DOM - and very simple and strictly specialized code, no LoadModule or anything that is beyond web.xml content. In addition, the tool may generate Apache-specific configuration fragments for the 'native' mapper ( as you may remember, jk2 can map URIs using it's internal mapper - but also using Location and Set-Handler directives ). It'll also generate JkMounts for backward compat. All other code from the jk1 autoconf will be separated ( or replaced with some templates ) - the location of jk, other global settings are better to be done manually ( and have decent defaults ). Finally, the shmem system that is ( will be ) used for autoconfiguration of workers ( i.e. when a tomcat starts up it can add itself automatically, without admin intervention ) can be used by the deploy/admin tool to reconfigure uri mappings ( with the common mapper, the native mapper still requires a soft restart - but that can be automated as well ). Implementation-wise - this is not difficult, and can be done pretty fast if Glenn and few other people step in. I believe that's going to be very close to 'minimal' pain for the regular user while preserving the ability to fine tune everything. NOTE: jk2 will use a different model for the lb, see next mail. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Thanks, Hans -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: PROPOSAL: mod_jk2: Group/Instance
Hi Costin, some weeks ago I send a patch for mod_jk for an only routing lb_worker. A few days later I sent the docu. Henry Gomez said, that it should be commited. But it I think it isn't in the repository. But its the same with me here, to mutch work for to less time :). Again an example of my environment: Cluster with 4 nodes, tomcat and apache on every node. One Loadbalancer in front of the cluster which does a simple round robbin. I need sticky sessions but no loadbalancing in the module. If a request without a session comes in, it should be routed to the _local_ tomcat. I think this could be possible with the associated instance of a channel (item 7). Then I have to configure all four nodes for the same group. Because all nodes will serve the same webapps and associate the channel with this group. But for this I need a non balancing group. I don't see if the default behavior of a group is balancing and if this can be switched off. Is this right or do I miss something? Thanks Bernd [EMAIL PROTECTED] wrote: One of the major goals of mod_jk2 is simpler configuration. This proposal will cover the 'workers'. 1. The 'worker' name is deprecated. It refers to too many things in mod_jk, and causes too much confusion ( i.e. it is a 'handler', coresponds to a jvmRoute, a protocol, a channel ). 2. We'll use the term 'channel' to define the connections between jk and tomcat. Each channel will follow a standard naming syntax: channel.socket:HOST:PORT channel.unix:/PATH channel.jni:jni Altenatively, the local part can be used as a shortcut. Each channel will use Ajp13 protocol by default ( or whatever is specific to the transport, or overriden ). 3. We'll use the term 'instance' ( XXX or a better name if you can sugest one ) to refer to a single tomcat VM. That's what will be used in the jvmRoute. A tomcat instance can be reached by multiple channels. By default, each instance will have one socket channel and will be named by the local part ( i.e. HOST:port ). That's the name that'll identify the VM. 4. We'll use the term 'group' to reffer to a set of tomcat 'instances' that share a number of applications. The default group will be called 'lb'. One 'instance' can be part of one or many groups. 5. Each URI will be associated with a 'group'. In what used to be: JkMount /examples ajp13 the 'group' will replace ajp13. As I said, the default group is called 'lb' and includes all tomcat instances that are defined. For each application that is installed on all instances, the 'lb' group must be used. If you have a sophisticated setup - and an app is installed only on some instances, you can use names like lb_examples, and explicitely define what tomcat instances belong to the group. 6. The webapps will be defined by a hierarchy of directories ( host/webapp_name ) ( see previous mail ). Each webapp is obviously mapped consistently to one group, which will be defined inside the WEB-INF/jk2/map.properties. 7. Each channel will have an associated 'instance' ( it can't go to 2 tomcats ) and groups. The lb configuration is done automatically based on those attributes. The mappings are done automatically based on the hierarchy. If no map.properties is found, the whole webapp will be forwarded to the default group ( the common case ). I believe this model covers all current use cases. Please, please, send feedback and let me know if you can help ( implementation, documentation, testing ), but feedback is the first step. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Dipl.-Inform. Bernd Koecke UNIX-Entwicklung Schlund+Partner AG Fon: +49-721-91374-0 E-Mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
remm02/04/30 01:15:58 Modified:jasper2/src/share/org/apache/jasper/compiler Generator.java Log: - Apply patch to fix bug 8290. - The only drawback I can see is that it creates a Vector and a BitSet even if the page does not use tags. It seems acceptable, though. - Passes Watchdog and runs the TC admin webapp :) - The code generated implements the same flow as with nested try/catch/finally blocks. - The administration webapp in Tomcat, which felt sluggish before, now feels snappy, so I don't need any fancy graphs to see a nice performance difference :) - This patch should be reviewed by Jasper gurus. - Patch submitted by Denis Benoit denoitde at sympatico.ca Revision ChangesPath 1.7 +164 -24 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Generator.java25 Apr 2002 18:16:06 - 1.6 +++ Generator.java30 Apr 2002 08:15:58 - 1.7 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v 1.6 2002/04/25 18:16:06 kinman Exp $ - * $Revision: 1.6 $ - * $Date: 2002/04/25 18:16:06 $ + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v 1.7 2002/04/30 08:15:58 remm Exp $ + * $Revision: 1.7 $ + * $Date: 2002/04/30 08:15:58 $ * * * @@ -63,6 +63,8 @@ import java.util.*; import java.beans.*; import java.net.URLEncoder; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; import java.lang.reflect.Method; import javax.servlet.jsp.tagext.*; import org.xml.sax.Attributes; @@ -91,6 +93,9 @@ private JspCompilationContext ctxt; private boolean breakAtLF; private PageInfo pageInfo; +private FinallyApplyer finallies; +private int tryBit; +private Stack tryStack; /** * @param s the input string @@ -199,6 +204,17 @@ // Constructor (empty so far) here // Other methods here +out.printil(private void addTagToVector(java.util.Vector tags, int index, javax.servlet.jsp.tagext.Tag tag) {); +out.pushIndent(); +out.printil(if (index + 1 tags.size())); +out.pushIndent(); +out.printil(tags.setSize(index + 1);); +out.popIndent(); +out.printil(tags.setElementAt(tag, index);); +out.popIndent(); +out.printil(}); +out.println(); +out.println(); // Now the service method out.printin(public void ); @@ -222,6 +238,8 @@ out.printil(ServletConfig config = null;); out.printil(JspWriter out = null;); out.printil(Object page = this;); +out.printil(java.util.BitSet bitmask = new java.util.BitSet();); +out.printil(java.util.Vector tags = new java.util.Vector();); out.printil(try {); out.pushIndent(); @@ -882,6 +900,10 @@ out.println( */); Class tagHandlerClass = handlerInfo.getTagHandlerClass(); + +boolean implementsTryCatchFinally = +TryCatchFinally.class.isAssignableFrom(tagHandlerClass); + out.printin(tagHandlerClass.getName()); out.print( ); out.print(tagHandlerVar); @@ -895,8 +917,22 @@ declareTagVariableInfos(tagVarInfos, n.getTagData(), VariableInfo.AT_BEGIN); - out.printil(try {); - out.pushIndent(); +if (implementsTryCatchFinally) { +out.printil(try {); +out.pushIndent(); +} else { +out.printil(// try {); +out.printin(bitmask.set(); +Integer tryBitVal = new Integer(tryBit++); +tryStack.push(tryBitVal); +out.print(tryBitVal.toString()); +out.println();); +out.printin(addTagToVector(tags, ); +out.print(tryBitVal.toString()); +out.print(, ); +out.print(tagHandlerVar); +out.println();); +} out.printin(int ); out.print(tagEvalVar); out.print( = ); @@ -918,8 +954,17 @@ out.pushIndent(); if (isBodyTag) { - out.printil(try {); - out.pushIndent(); +out.printil(// try {); +out.printin(bitmask.set(); +
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
remm02/04/30 01:18:07 Modified:jasper2/src/share/org/apache/jasper/compiler Generator.java Log: - Forgot to add Denis in the author list. Revision ChangesPath 1.8 +4 -3 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Generator.java30 Apr 2002 08:15:58 - 1.7 +++ Generator.java30 Apr 2002 08:18:06 - 1.8 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v 1.7 2002/04/30 08:15:58 remm Exp $ - * $Revision: 1.7 $ - * $Date: 2002/04/30 08:15:58 $ + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v 1.8 2002/04/30 08:18:06 remm Exp $ + * $Revision: 1.8 $ + * $Date: 2002/04/30 08:18:06 $ * * * @@ -83,6 +83,7 @@ * @author Pierre Delisle * @author Kin-man Chung * @author Jan Luehe + * @author Denis Benoit */ public class Generator { -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8290] - Problem in the code generated by jasper 2
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8290. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8290 Problem in the code generated by jasper 2 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 08:41 --- I've applied the patch for this in Jasper 2. Thanks ! The 4.1.1 milestone will have the fix. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.1.txt RELEASE-PLAN-4.1.txt
remm02/04/30 01:41:46 Modified:.RELEASE-PLAN-4.1.txt Added: .RELEASE-NOTES-4.1.txt Log: - Change my mind again and use a common release notes document. - Update status. Revision ChangesPath 1.8 +1 -2 jakarta-tomcat-4.0/RELEASE-PLAN-4.1.txt Index: RELEASE-PLAN-4.1.txt === RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-PLAN-4.1.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- RELEASE-PLAN-4.1.txt 25 Apr 2002 22:00:19 - 1.7 +++ RELEASE-PLAN-4.1.txt 30 Apr 2002 08:41:46 - 1.8 @@ -1,4 +1,4 @@ -$Id: RELEASE-PLAN-4.1.txt,v 1.7 2002/04/25 22:00:19 remm Exp $ +$Id: RELEASE-PLAN-4.1.txt,v 1.8 2002/04/30 08:41:46 remm Exp $ Release Plan for Apache Tomcat 4.1 == @@ -125,7 +125,6 @@ 7160 Jasper compiles files to same classname 7993 parameters in jsp:plugin for jsp Document do not work 8005 Bad Param passing with jsp:include -8290 Problem in the code generated by jasper 2 Unconfirmed Bugs (Awaiting Reproducible Failure Case): 1.1 jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt Index: RELEASE-NOTES-4.1.txt === Apache Tomcat Version 4.1 = Release Notes = $Id: RELEASE-NOTES-4.1.txt,v 1.1 2002/04/30 08:41:46 remm Exp $ INTRODUCTION: This document describes the changes that have been made in the current development version of Apache Tomcat, relative to the Tomcat 4.0 release. The release notes for all prior releases of Tomcat 4.0 are also included, for your reference. Bug reports should be entered at the bug reporting system for Jakarta projects at: http://nagoya.apache.org/bugzilla/ Please report bugs and feature requests under product name Tomcat 4. NEW FEATURES: General New Features: - Catalina New Features: - --- Jasper New Features: --- [4.1.1] JspServlet, Options: Add new reloading flag allowing to disable the JSP reloading checks, to allow better performance on production servers. == BUG FIXES AND IMPROVEMENTS: == -- Generic Bug Fixes: -- -- Catalina Bug Fixes: -- [4.1.1] #8611 Summary: Sealed .jar files in WEB-INF/lib always fail to load second class WebappClassLoader: The classloader will now generate codebases URL for classes loaded from JAR file which point to the JAR, intead of using a nested jar: URL. This change will affect security manager policy files. Jasper Bug Fixes: [4.1.1] #8290 Summary: Problem in the code generated by jasper 2 Generator: This workaround for a JDK bug (BugParade Id: 4414162) introduces a massive performance improvement when using pages containing lots of tags. KNOWN ISSUES IN THIS RELEASE: * Tomcat 4.0 and JNI Based Applications * Tomcat 4.0 Standard APIs Available * Tomcat 4.0 and XML Parsers * Web application reloading and static fields in shared libraries * JAVAC leaking memory * Linux and Sun JDK 1.2.x - 1.3.x * Jasper and Jikes * Enabling SSI and CGI Support * Tomcat examples web application - Tomcat 4.0 and JNI Based Applications: - Applications that require native libraries must ensure that the libraries have been loaded prior to use. Typically, this is done with a call like: static { System.loadLibrary(path-to-library-file); } in some class. However, the application must also ensure that the library is not loaded more than once. If the above code were placed in a class inside the web application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and the application were reloaded, the loadLibrary() call would be attempted a second time. To avoid this problem, place classes that load native libraries outside of the web application, and ensure that the loadLibrary() call is executed only once during the lifetime of a particular JVM. -- Tomcat 4.0 Standard APIs
RE: logrotate and tomcat 3.3/4.0/4.1
And surprise!!, 3.3 it's suppoussed to have another logrotate inside, broken, but the code is there.. just need that someones have spare cycles to fix it.. I started take a look a log stuff in 3.3.2 and will see how to fix the logrotate support or better add log4j support ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Idea for dtomcat4 script/conf in webapp.rpm
What do you think of adding a conf variable that allow one to set the location of catalina.out thats independent of $CATALINA_BASE? Something like $CATALINA_LOGDIR? Do you means specific to rpm ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: logrotate and tomcat 3.3/4.0/4.1
Quoting GOMEZ Henri [EMAIL PROTECTED]: Whaou. Didn't now about copytruncate option of logrotate. It has some downsides too. But it's documented in the manual page, so everyone should know what to expect. Under Linux there is truncate and ftruncate calls but I wonder how it works regarding OS ? Not sure what you mean here exactly, but here is the text from the manual page that explains what happens: copytruncate Truncate the original log file in place after cre- ating a copy, instead of moving the old log file and optionally creating a new one, It can be used when some program can not be told to close its log file and thus might continue writing (appending) to the previous log file forever. Note that there is a very small time slice between copying the file and truncating it, so some logging data might be lost. When this option is used, the create option will have no effect, as the old log file stays in place. I'll add this to all my tomcat rpm ASAP Cool. Bojan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [NITPICK] didn't see this one coming...
Pier Fumagalli wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Mon, 29 Apr 2002, Remy Maucherat wrote: However I do think we should somehow document better what's happening - many people have the strange impression that webapp is going to replace jk. I'd like to find a way to indicate that the two preferred connectors are: - Coyote HTTP/1.1 - Coyote JK 2 (AJP with mod_jk, JNI) And to clearly indicate that for whatever OS Pier is using and Apache2, users can also use mod_webapp. I can cover for OS/X and Solaris 8 (both X86 and SPARC). That's all I have access to ATM (my flatmate's Linux box is a happily hand-tuned llama slow Debian box, basically impossible to compile whatever on it) J-F uses a couple of whacko ;) systems, and something else (???) I have some Linux (Suse), access to FreeBSD, Solaris8, ReliantUnix (mips) and BS2000 (EBCDIC mainframe) ;-)) Henri is building RPMs for WebApp already, and since it's another dialect of a pseudo POSIX-compliant OS, things should work there as well, and it's pretty easy to provide fixes when he tries to build the thing. I used to have an HP-UX box as well, but the power supply died last week, and the cost to replace that was much more than the value of the box itself, so it just ended up in the bin with my kitty litter last week... I know that Covalent has some HP-UX boxes, if they want to put them on-line, it might be good (since I was hosting HP-UX for the entire Apache community) Apart from that, if someone wants to do some Windows porting, he's more than welcome to volunteer (as you are well-aware of, it's kinda impossible to run MSVC from remote, you _have_ to have a console. The only alternative would be someone providing a Wintel PC with a valid license of MSVC and an SSH server to do builds on, although it might get nasty when you think about doing all those NMAKE files)... I have (at home) a win98 (For hacking USB devices). I have made some tries there, with cygwin is it possible to run sshd and use a machine remotly. It is even possible to compile programs for native win32. The problem starts when the native program stops and displays a message box (may be vnc can help (http://www.uk.research.att.com/vnc/) but I have not tried it yet) normaly a ps -W + kill -9 or custom shutdown.exe helps... 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]
DO NOT REPLY [Bug 8644] New: - Mysql-Connection (Servlet) Problem (Timeout ?)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8644. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8644 Mysql-Connection (Servlet) Problem (Timeout ?) Summary: Mysql-Connection (Servlet) Problem (Timeout ?) Product: Tomcat 3 Version: 3.2.3 Final Platform: PC URL: http://www.ascom.ch OS/Version: Linux Status: NEW Severity: Normal Priority: Other Component: Servlet AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have a Servlet that makes a Connection to a mysql-DB. When I compile it (javac *.java) and restart Tomcat (rctomcat restart) it works fine... The users are displayed from the DB and I could login. But the next day (13 Hours later) it doesn't work. It can't see the users displayed from the DB... See dont_work.jpg. The following Links are the Screenshots ! http://tigarr.ch/ska/cesi/tomcat_bug/work_fine.jpg http://tigarr.ch/ska/cesi/tomcat_bug/dont_work.jpg My Java, Servlet - Code is here : I've tried all the Combinations (//...) http://tigarr.ch/ska/cesi/tomcat_bug/AFIdentification.java http://tigarr.ch/ska/cesi/tomcat_bug/DBCon.java But after I restarted Tomcat (rctomcat restart) the Servlet works fine, and I could login... See work_fine.jpg Need help, what is wrong here ??? Can anyone help me please ? Thanks Cesi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8645] New: - Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645 Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date Summary: Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date Product: Tomcat 3 Version: 3.3.1 Final Platform: All OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Webapps AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] This might or might not be Tomcat's problem, however I've found no documentation of this problem anywhere on the web, and Tomcat is severly affected. If Tomcat is behaving according to plan, then this bug report can be seen more as for information purposes. Microsoft's Services for UNIX v2.0 http://www.microsoft.com/windows2000/sfu/ includes an NFS server amongst other things. This server has a big problem with last modification times of files. My setup is a Windows 2000 Server with Services for UNIX, sharing some folders using NFS to a Redhat Linux 7.2 box where I'm running tomcat on the NFS file system. It seems the NFS server sets the modification time twice for every update to the file. First when the NFS write is done to memory, and second when the change is flushed out to disk. I have verified that the second modification date change happens when I see a change in the NTFS file system. Consider the following shell excercise where we can see the modification date changing twice just using some normal shell tools: $ pwd /home/martin $ mount | grep /home/martin winserv:/user_folders/martin on /home/martin type nfs (rw,hard,addr=10.8.0.2) $ date ; echo foo bar ; ls --full-time bar Tue Apr 30 09:42:21 BST 2002 -rw-rw-r--1 martin dev 4 Tue Apr 30 09:42:21 2002 bar $ date ; ls --full-time bar Tue Apr 30 09:42:31 BST 2002 -rw-rw-r--1 martin dev 4 Tue Apr 30 09:42:23 2002 bar In words what we see is that the file gets a new modification time when I do the echo to the file. And roughly ten seconds later when I look at it again. The modification time has changed again (after that it stays as is). The second change is always around 2 seconds later. Needless to say this has quite significant impacts on applications like Tomcat, where the modificaion time is used to determine reloads. The behaviour I'm seeing in Tomcat is along the lines of: A) .jsp gets compiled to .java that gets compiled to .class 2002-04-30 09:03:12 - Ctx() : Compiling: /index.jsp to index_0 B) A dependency graph is built inside Tomcat using org.apache.tomcat.util.Dependecy and org.apache.tomcat.util.DependManager. The dependencies seems to be: ROOT context - .jsp ROOT context - .java ROOT context - .class C) At a later request the DependManager will validate the dependencies and finds the the .class file to have changed. (DependManager contains logging, but it is not possible to turn on without editing the class): DependManager: Found expired file index_1.class DependManager: ShouldReload5 E=true C=false D) This triggers an invalidation of the whole dependency graph (my guess) that ultimatelly triggers the reload of the context: 2002-04-30 09:05:58 - ContextManager: Removing context martin.www.ioboxgroup.com.developer.taglab.com:/ROOT 2002-04-30 09:05:58 - Ctx() : Remove mapping 2002-04-30 09:05:58 - Ctx() : Remove mapping /index.jsp 2002-04-30 09:05:58 - ContextManager: Adding context 127.0.0.1:/ROOT My webapps doesn't handle this reload very well, so this was a problem for me. Possible fixes: 1) Stop using crap Microsoft solutions. 2) Convince Microsoft to fix this problem (why does the phrase move a mountain spring to mind?) 3) Make the Dependency class tolerant for minor changes in the modification date. By testing I have concluded that the second update to the modification date seems to always be around 2 seconds after the first. The solution I've implemented locally allows for a 4 second change without doing a reload. This has of course the unwanted side effect that if I update say a JSP two times within 4 seconds, the server might not notice the second change. Arguably this is a fix for the symptoms and not the cause, and hence is probably nothing we would like to see in the Tomcat code base. 4) Should a change in the .class file really trigger a reload of the whole context? In the DependManager there is a concept of files being local or not local. A change in a local is seemed to not be a reason to invalidate the whole Dependency manager. I am not sure I have all the facts about the local concept, but perhaps the .class file should be
[4.1.0] Anyone testing it ?
Is anyone testing 4.1.0 ? The URL as a reminder: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.0/ Obviously, I expect people voting to rate the build to have tried it ;-) Of particular interest is testing: - AJP 1.3 support - To see if bug 5735 is fixed with the current Coyote connector - Jasper 2 Thanks, Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [4.1.0] Anyone testing it ?
Downloaded yesterday, will try it on linux and rpm packaging ASAP - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 11:50 AM To: Tomcat Developers List Subject: [4.1.0] Anyone testing it ? Is anyone testing 4.1.0 ? The URL as a reminder: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.0/ Obviously, I expect people voting to rate the build to have tried it ;-) Of particular interest is testing: - AJP 1.3 support - To see if bug 5735 is fixed with the current Coyote connector - Jasper 2 Thanks, Remy -- 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]
Problem with url session encoding - Tomcat 4.0.4 b2
Hi, I am writing an e-commerce application using tomcat and have come across a minor issue with url session encoding. The problem is that if a valid session id is available on the url then tomcat does not use cookies. Here is my scenario :- 1. I have tomcat configured to use cookies for session id's if possible. 2. An access to the index.html of my site redirects via url encoding to home/index.html. This causes the session to be sent both via the url and a cookie, from here on tomcat knows it can use cookies and doesn't bother adding the session id to the url when I use encodeURL. 3. If I close the browser and open a new browser and use the url history box then the url that appears is home/index.html with the added url encoding (because I redirected from the original index.html). 4. Because this url has a valid session id, tomcat now defaults to using the url endoing method and doesn't even try to use a cookie for this browser session. My problem is that I want tomcat to always try and use a cookie even when using url encoding (unless it is already using a cookie). I realise it is a pain for those users that have setup prompts before accepting cookies, but in my case I would prefer an inconvenience to a small number of users and not the vast variety of users seeing the session id on all their url's. My own prefernce would be to overload the cookies parameter so that a value of force would cause this behaviour and leave the existing semantics for the already defined values. Regards, Arshad -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/qlog Logger.java
Thanks!! :), Now we have the flexible logrotate of tc3.3, working.. Saludos , Ignacio J. Ortega -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: PROPOSAL: mod_jk2 autoconfig
I think the current solution of generating configs on tomcat startup, or having tomcat send it's config to apache is wrong. when tomcats and httpd servers run on differents machines you need to have a form of link between them, and that's why I proposed autoconf to be added to ajp13 (I don't tell ajp14 to avoid confusion). I agree we have a sort of chicken and eggs problems here since httpd servers need to know which tomcat are available to try to connect to them to get the configuration. Ideally we need a broadcast solution for such purpose. httpd server should have a thread (or fork in AP 1.3) to listen to incoming broadcast notification and determine if there is a new tomcat in (or out) and contact newcomer to get its config informations. In case of tomcat caming out, it should remove references to the old tomcat. - In java land there is a solution, javagroups (http://sourceforge.net/projects/javagroups/) which sadly still use a LGPL license which prevent to have it include in ASF project. If ever javagroups decide to switch to a BSD license or better join jakarta, it will be really great and in that case we could use httpd + jni + javagroups to talk and configure the groups of distants tomcats - In native/java land, there is still spread (http://www.spread.org) which have a license compatible with ASF. Finally, the shmem system that is ( will be ) used for autoconfiguration of workers ( i.e. when a tomcat starts up it can add itself automatically, without admin intervention ) can be used by the deploy/admin tool to reconfigure uri mappings ( with the common mapper, the native mapper still requires a soft restart - but that can be automated as well ). Implementation-wise - this is not difficult, and can be done pretty fast if Glenn and few other people step in. I believe that's going to be very close to 'minimal' pain for the regular user while preserving the ability to fine tune everything. NOTE: jk2 will use a different model for the lb, see next mail. You're speaking of channel, I'd like the idea, since it's very similar to the channel/group concept of javagroup/spread. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/qlog Logger.java
Ok, is there still a need to use commons-log ? - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 -Original Message- From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 12:23 PM To: 'Tomcat Developers List' Subject: RE: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/qlog Logger.java Thanks!! :), Now we have the flexible logrotate of tc3.3, working.. Saludos , Ignacio J. Ortega -- 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]
DO NOT REPLY [Bug 8645] - Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645 Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 11:21 --- Although I'd personally vote for solution 1 :-), have you tried running Samba mount instead? Something like: mount -t smbfs //winserv/martin /home/martin -o username= (blah, blah...) You might have to fiddle with permissions a bit, but I think it can be done. Bojan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8645] - Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645 Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 11:48 --- I haven't seen any strong evidence that autofs and samba would play well together. NIS, autofs and NFS is a very well proven concept in comparison. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8644] - Mysql-Connection (Servlet) Problem (Timeout ?)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8644. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8644 Mysql-Connection (Servlet) Problem (Timeout ?) [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 12:12 --- I looked at your code. This is not a bug in Tomcat, it is a problem in your servlet. MySQL has a limit for how long it will keep an idle db connection open, the default is 8 hours. Your code never tries to reopen the db connection if it gets closed from the db side. You might consider using a db connection pool instead of your own code for managing db connections. For further assistance please use the tomcat-user list. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8644] - Mysql-Connection (Servlet) Problem (Timeout ?)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8644. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8644 Mysql-Connection (Servlet) Problem (Timeout ?) [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|CLOSED -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8645] - Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645 Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 12:18 --- Obviously not with Microsoft NFS ;-) What do you need autofs in this scenario for? Bojan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mod_webapp.so socketpool changes..
Hi, I'm a bit confused about the problem with the use of the APR atomic types. Is the problem that it is not supported on all platforms? If this is the case then isn't this a problem with the apr code? Even if a given OS doesn't specifically offer atomic types then (as menioned earlier) a simple mutex and int in a struct offers the same functionality. As far as I can see, all this wrapping should be part of the apr, shouldn't it? I think puting in #ifdef APR_USE_ATOMICS is a bit of band-aid solution; Whether or not atomics are OS supported the variables in question should really be only operated on atomically (in a multi-threaded environment) or else the code is not thread-safe. Also, I don't know if this has got anything to do with the compilation problems found but when I first put in the atomics I found that the implementation in the (fairly recent) version of the apr I had was broken (on NT) and caused compilation to fail. Getting the latest version fixed this problem. BTW Pier, sorry for not responding earlier - I managed to get the mod_webapp module compiling for Apache 2 after tweaking the 1.3 makefile to get a 2.0 makefile for NT. I used the apr directly from the Apache 2.0 distribution. At the moment I am using Apache 2.0 on an NT intranet server with the mod_webapp at it seems to behave identically to the 1.3 version. PS. If you want me to make any changes modifications (either changing the #ifdef or anything else) to the warp connector just let me know PPS. I noticed a comment about mod_webapp being deprecated. Is this the case? Simon. [EMAIL PROTECTED] wrote: Pier Fumagalli wrote: Cavan Morris [EMAIL PROTECTED] wrote: Attached is an ASCII file with my build process. It may be important to not that I'm using the APR libraries from the webapp-module-1.0.2-tc402 and apxs from apache 2.0.32 not 2.0.35. You _need_ to use the APR libraries shipped with your Apache 2.0 version, and the same APXS, anyway it's bloated on my system as well. I have some spare time on my hands tonight, and tomorrow... I'll try to revamp the autoconf stuff and make it build again... NOTE I might break something in Win32 builds. Can someone with MSVC give it a go once they see my commits, please? /NOTE Question: when you say Yes, that's right... do you mean yes that's right, the socketpool work may solve bug 8433 or yes that's right, it doesn't compile? The #if APR_HAS_THREADS is wrong that should have been #if APR_HAS_ATOMIC. But APR_HAS_ATOMIC is not existing and it is not possible to force APR to use a generic C code for atomics (apr_force_atomic_generic cannot be set to one via some configure options). Therefore when apr_atomic_t is not defined mod_webapp compilation failed miserably. I will try to change the #if APR_HAS_THREADS into #ifdef USE_ATOMICS like in the mod_mem_cache.c of httpd-2.0. (As a temporary fix). Both... Yeah, the socketpool solves that problem as well (at least it should, what's your worker configuration in Apache 2.0? - output of httpd -l please :) and yes, it doesn't compile... On APR they're talking about removing atomics, since those bits actually depend (especially on sun hardware) on some opcodes present only on V9 architectures (JF might explain it better than me, the only 2 RISCs I've coded for are PPCs and MIPSes), thus making binaries unportable from one architecture to another... The atomic for SPARC is using cas that is an 8+ opcode. This causes problems on SPARC machines with old processors. There is a C code for machines that does not have a as atomic support. Therefore my thought is to rely on inter-process mutex locking, instead of atomics)... Thanks for your time. I feel lucky to have some spare time on my hands :) :) :) Pier -Cavan Morris - Original Message - From: Pier Fumagalli [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Saturday, April 27, 2002 8:58 AM Subject: Re: mod_webapp.so socketpool changes.. Cavan Morris [EMAIL PROTECTED] wrote: Hey Guys, I reported bug 8433 and am looking for a way to solve it. I thought that the socketpool work you're doing might solve the problem but wasn't able to compile the latest from cvs. My question is do you think that what you're working on could fix the bug? This is a very severe problem on my system. I have to restart both apache and tomcat if I get 2 concurrent requests. If you've got any ideas on the java side I can look into it, but have no idea what to do with the C. Yes, that's right... Can you send out why it doesn't compile? That code uses ATOMIC, but given that atomics are going to go away in a short time from APR, we'll need to change it to use intra-process mutexes... It doesn't compile on OS/X as well... :( Pier -- I think that it's extremely foolish to name a server after
DO NOT REPLY [Bug 8645] - Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645 Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 13:01 --- To have a unified home directory no matter if I'm using the Linux development server or a Windows desktop. This helps us having centralised backups etc etc. autofs helps with this and centralised home directories is a Good Thing (TM). Hmmm are we off scope now? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Idea for dtomcat4 script/conf in webapp.rpm
Opse, sorry. Yes, I mean in the Tomcat4 RPM, not the mod_webapp rpm. I did this with my tomcat4.conf file and dtomcat4 and it works for the start option. I'm not sure what one would have to do with the run or embed options of dtomcat4. -Mark GOMEZ Henri wrote: What do you think of adding a conf variable that allow one to set the location of catalina.out thats independent of $CATALINA_BASE? Something like $CATALINA_LOGDIR? Do you means specific to rpm ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] # tomcat /etc/rc.d script example configuration file # Use with version 1.07 of the scripts or later # Where your java installation lives JAVA_HOME=/usr/java/jdk # JAVA_HOME=/opt/IBMJava2-13 # You can pass some parameters to java # here if you wish to # JAVACMD=$JAVA_HOME/bin/java -Xms128m -Xmx128m # Where your tomcat installation lives # That change from previous RPM where TOMCAT_HOME # used to be /var/tomcat. # Now /var/tomcat will be the base for webapps only CATALINA_HOME=/var/tomcat4 JASPER_HOME=/var/tomcat4 CATALINA_TMPDIR=/tmp # What user should run tomcat TOMCAT_USER=tomcat4 # You can change your tomcat locale here #LANG=en_US # If you wish to further customize your tomcat environment, # put your own definitions here # (i.e. LD_LIBRARY_PATH for some jdbc drivers) # Just do not forget to export them :) export CATALINA_OPTS=-Xms128m -Xmx128m ulimit -s unlimited export CATALINA_LOG=/var/log/tomcat/catalina.out #!/bin/sh # - # Start/Stop Script for the CATALINA Server # # Environment Variable Prequisites # # CATALINA_HOME May point at your Catalina build directory. # # CATALINA_BASE (Optional) Base directory for resolving dynamic portions # of a Catalina installation. If not present, resolves to # the same directory that CATALINA_HOME points to. # # CATALINA_OPTS (Optional) Java runtime options used when the start, # stop, or run command is executed. # # CATALINA_TMPDIR (Optional) Directory path location of temporary directory # the JVM should use (java.io.tmpdir). Defaults to # $CATALINA_BASE/temp. # # CATALINA_LOG(Optional) Provides alternate output locations for StandardOut # and StandardErr # # JAVA_HOME Must point at your Java Development Kit installation. # # JAVA_OPTS (Optional) Java runtime options used when the start, # stop, or run command is executed. # # JPDA_ADDRESS(Optional) Java runtime options used when the jpda start # command is executed. The default is 8000. # # JSSE_HOME (Optional) May point at your Java Secure Sockets Extension # (JSSE) installation, whose JAR files will be added to the # system class path used to start Tomcat. # # $Id: catalina.sh,v 1.20.2.1 2002/01/30 18:10:39 patrickl Exp $ # - TOMCAT_CFG=/etc/tomcat4/conf/tomcat4.conf [ -r $TOMCAT_CFG ] . ${TOMCAT_CFG} # Set standard commands for invoking Java. _RUNJAVA=$JAVA_HOME/bin/java _RUNJDB=$JAVA_HOME/bin/jdb ### Set up defaults if they were omitted in TOMCAT_CFG ### JVM lookup if [ -z $JAVA_HOME ]; then # Search for java in PATH JAVA=`which java` if [ -z $JAVA ] ; then JAVA_BINDIR=`dirname ${JAVA}` JAVA_HOME=${JAVA_BINDIR}/.. fi # Default clean JAVA_HOME [ -z $JAVA_HOME -a -d /usr/lib/java ] JAVA_HOME=/usr/lib/java # Default IBM JAVA_HOME [ -z $JAVA_HOME -a -d /opt/IBMJava2-13 ] JAVA_HOME=/opt/IBMJava2-13 # Another solution [ -z $JAVA_HOME -a -d /usr/java/jdk ] JAVA_HOME=/usr/java/jdk # madeinlinux JAVA_HOME [ -z $JAVA_HOME -a -d /usr/local/jdk1.2.2 ] JAVA_HOME=/usr/local/jdk1.2.2 # Kondara JAVA_HOME [ -z $JAVA_HOME -a -d /usr/lib/java/jdk1.2.2 ] JAVA_HOME=/usr/lib/java/jdk1.2.2 # Other commonly found JAVA_HOMEs [ -z $JAVA_HOME -a -d /usr/jdk1.2 ] JAVA_HOME=/usr/jdk1.2 # Default Caldera JAVA_HOME [ -z $JAVA_HOME -a -d /opt/java-1.3 ] JAVA_HOME=/opt/java-1.3 # Add other locations here if [ -z $JAVA_HOME ]; then echo No JAVA_HOME specified in ${TOMCAT_CFG} and no java found, exiting... exit 1 else echo Found JAVA_HOME: ${JAVA_HOME} echo Please complete your ${TOMCAT_CFG} so we won't have to look for it next time fi fi # Set standard CLASSPATH CLASSPATH=$JAVA_HOME/lib/tools.jar # Add on extra jar files to CLASSPATH if [ -n $JSSE_HOME ]; then CLASSPATH=$CLASSPATH:$JSSE_HOME/lib/jcert.jar:$JSSE_HOME/lib/jnet.jar:$JSSE_HOME/lib/jsse.jar fi CLASSPATH=$CLASSPATH:$CATALINA_HOME/bin/bootstrap.jar if [ -z $CATALINA_BASE ] ; then CATALINA_BASE=$CATALINA_HOME fi if [ -z $CATALINA_TMPDIR ] ; then # Define the
RE: Idea for dtomcat4 script/conf in webapp.rpm
Yes, I mean in the Tomcat4 RPM, not the mod_webapp rpm. I did this with my tomcat4.conf file and dtomcat4 and it works for the start option. I'm not sure what one would have to do with the run or embed options of dtomcat4. It's something which should be even added to tomcat4 original script. I'm +1 with it. BTW, as rpm packager I'm trying to works closely with projects to have such add-ons included directly in original tarball which help developpers fixes problems of rpm users. That's why we works today so closely with ant developpers to merge the ant original script and the one we're using in rpms (jakarta rpms or jpackage project rpms) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet JspServlet.java
glenn 02/04/30 06:28:24 Modified:jasper2/src/share/org/apache/jasper/servlet JspServlet.java Log: Minor refactoring. Remove commented out and unused code. Move obtaining the classpath from loadIfNecessary to init(), minor performance improvement. Factor out the loadIfNecessary method, it only had a few lines of code left in it. Revision ChangesPath 1.8 +16 -58 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java Index: JspServlet.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet/JspServlet.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JspServlet.java 29 Apr 2002 23:03:06 - 1.7 +++ JspServlet.java 30 Apr 2002 13:28:24 - 1.8 @@ -167,38 +167,8 @@ throw new JasperException(ex); } theServlet.init(JspServlet.this.config); -/* Shouldn't be needed after switching to URLClassLoader - if (theServlet instanceof HttpJspBase) { -HttpJspBase h = (HttpJspBase) theServlet; -h.setClassLoader(JspServlet.this.parentClassLoader); - } -*/ } - - private void loadIfNecessary(HttpServletRequest req, HttpServletResponse res) -throws JasperException, ServletException, FileNotFoundException -{ -// First try context attribute; if that fails then use the -// classpath init parameter. - -// Should I try to concatenate them if both are non-null? - -String cp = (String) context.getAttribute(Constants.SERVLET_CLASSPATH); - -String accordingto; - -if (cp == null || cp.equals()) { -accordingto = according to the init parameter; -cp = options.getClassPath(); -} else -accordingto = according to the Servlet Engine; - -if (loadJSP(this, jspUri, cp, isErrorPage, req, res) -|| theServlet == null) { -load(); -} - } - + public void service(HttpServletRequest request, HttpServletResponse response, boolean precompile) @@ -213,7 +183,11 @@ Constants.getString(jsp.error.unavailable)); } -loadIfNecessary(request, response); +if (loadJSP(this, jspUri, classpath, +isErrorPage, request, response) +|| theServlet == null) { +load(); +} // If a page is to only to be precompiled return. if (precompile) @@ -286,9 +260,9 @@ protected URLClassLoader parentClassLoader; protected ServletEngine engine; protected String serverInfo; -private PermissionCollection permissionCollection = null; -private CodeSource codeSource = null; - +private PermissionCollection permissionCollection; +private CodeSource codeSource; +private String classpath; static boolean firstTime = true; public void init(ServletConfig config) @@ -310,6 +284,13 @@ options = new EmbededServletOptions(config, context); +// Get the classpath to use for compiling +classpath = (String) context.getAttribute(Constants.SERVLET_CLASSPATH); + +if (classpath == null || classpath.equals()) { +classpath = options.getClassPath(); +} + // Get the parent class loader parentClassLoader = (URLClassLoader) Thread.currentThread().getContextClassLoader(); @@ -642,29 +623,6 @@ } return outDated; -} - - -/** - * Determines whether the current JSP class is older than the JSP file - * from whence it came - * KMC: This is currently no used - */ -public boolean isOutDated(File jsp, JspCompilationContext ctxt, - Mangler mangler ) { -File jspReal = null; - boolean outDated; - -jspReal = new File(ctxt.getRealPath(jsp.getPath())); - -File classFile = new File(mangler.getClassFileName()); -if (classFile.exists()) { -outDated = classFile.lastModified() jspReal.lastModified(); -} else { -outDated = true; -} - -return outDated; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Idea for dtomcat4 script/conf in webapp.rpm
GOMEZ Henri wrote: Yes, I mean in the Tomcat4 RPM, not the mod_webapp rpm. I did this with my tomcat4.conf file and dtomcat4 and it works for the start option. I'm not sure what one would have to do with the run or embed options of dtomcat4. It's something which should be even added to tomcat4 original script. I'm +1 with it. BTW, as rpm packager I'm trying to works closely with projects to have such add-ons included directly in original tarball which help developpers fixes problems of rpm users. I'm all for that. Do you know who is currently managing the /usr/bin/dtomcat file in the current tarball? Maybe they can get in on the conversation. That's why we works today so closely with ant developpers to merge the ant original script and the one we're using in rpms (jakarta rpms or jpackage project rpms) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] possible speed enhancement to JspServlet.java
The numbers I got were for a fairly specific application. The page request I was making did includes of 10 jsp's in total (which would account for the difference in my results and yours I think). I really like the idea of having a server vs development setting. I'll take a look at that this morning. Might it be a good idea to have a manual way to force a JSP reload in a production environment? I see reading your comment that you can reload the JSP by reloading the web application, but I'm not sure the container I'm using has that option available in a straight forward manner. Something simple like a parameter in the URL like jasper_jsp_reload=true would make it relatively easy to modify a production system without taking it off-line even briefly. Remy Maucherat wrote: Thanks for the comments Kin-Man. Given those comments and a look at the jasper2 code I have come up with the patch below. After profiling jasper2 I saw that there was indeed a speed improvement over Jasper. However the excessive creation of File objects and getting files from URL's was still a problem. I did as you suggested and used the JspServletWrapper object to hold all of the required data. As well I set up this version to fall back to reading JSP's from a URL if reading the File object doesn't work. I found in my testing that the jasper engine used ~15% of the request time in loadJSP, jasper2 used ~12%, and my change uses ~1%. The only thing my code does not do is force a reload of the .class file if it is deleted. My code only causes a recompile if the jsp changes. I can look into modifying it to handle this situation as well if required. I look forward to your feedback. A much simpler solution would be to allow disabling reloading altogether for production systems. I've committed a patch which does that. That way, loadJSP can use 0% and everything stays very simple. What do you think ? Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Duncan McLean Hummingbird Ltd. 613-548-4355 x1539 http://www.hummingbird.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [4.1.0] Anyone testing it ?
I have 4.1 built from CVS Sunday morning in production for a system who's applications are low volume. But it doesn't use either Coyote or Jasper 2. Ok, how about trying these also ? At least the HTTP/1.1 connector should be solid. BTW, those are the three points I mentioned that I think should recieve the most testing ;-) Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] possible speed enhancement to JspServlet.java
The numbers I got were for a fairly specific application. The page request I was making did includes of 10 jsp's in total (which would account for the difference in my results and yours I think). I really like the idea of having a server vs development setting. I'll take a look at that this morning. Might it be a good idea to have a manual way to force a JSP reload in a production environment? I see reading your comment that you can reload the JSP by reloading the web application, but I'm not sure the container I'm using has that option available in a straight forward manner. Something simple like a parameter in the URL like jasper_jsp_reload=true would make it relatively easy to modify a production system without taking it off-line even briefly. That kind of setting could be used for a DOS attack (making the server recompile pages all the time). It should rather be something like check_modified=true. Actually, I'll have to check what the precompile attribte does. It may already be doing that; otherwise, I'll probably add the other. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] Re: [PROPOSAL] Modification of the code generated by Jasper2
On Mon, 29 Apr 2002, Remy Maucherat wrote: This looks like a good idea to me (Kin-Man is not there this week, so it's not an expert opinion). I would see that kind of change going into Jasper 2, though. Do you think you can prepare a patch against that version ? Remy Thanks! We've done some benchmarks with JMeter, even though the case we tested is pathologic, the JSP contained 100 tags! The results were impressive. The Jasper version included with the pre-beta 4.1 tomcat averaged 20 seconds/hit, with the patch, the CVS version of jasper2 average 0.8 second/hit. If there is less try/finally nesting in the java code of the page, the difference is less impressive of course. The test setup, the test page and the detail of the results can be found: http://www3.sympatico.ca/benoitde/ NOTE my sunday patch contained one bug, this one has been more tested. I've applied the patch. Watchdog is fine, so I committed it. The admin webapp appeared slow before the patch (esp when using a context page), and that was with an Athlon 1700 as the server with one user (me). I'm not happy in general when a request uses 100% of the CPU for 1 full second ;-) I couldn't figure out why it was so slow, and the other runtime optimizations didn't help at all. It turns out it was caused by this JVM bug ... With the patch, it's become quite fast. Very impressive, and since IMO it is quite representative of a Struts based application which would have complex pages, it's really awesome. I suppose the fast JSP compilers (Resin, Orion) use similar tricks in the code generation. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Idea for dtomcat4 script/conf in webapp.rpm
BTW, as rpm packager I'm trying to works closely with projects to have such add-ons included directly in original tarball which help developpers fixes problems of rpm users. I'm all for that. Do you know who is currently managing the /usr/bin/dtomcat file in the current tarball? Maybe they can get in on the conversation. dtomcat is just the rpm renaming of original catalina.sh... I think that patch could be usefull, you should get the latest tomcat 4.0.4 from cvs, and apply the same patch to catalina.sh. # CATALINA_LOG(Optional) Provides alternate output locations for StandardOut # and StandardErr ... ... if [ -z $CATALINA_BASE ] ; then CATALINA_BASE=$CATALINA_HOME fi if [ -z $CATALINA_TMPDIR ] ; then # Define the java.io.tmpdir to use for Catalina CATALINA_TMPDIR=$CATALINA_BASE/temp fi if [ -z $CATALINA_LOG ] ; then # Set it to a default CATALINA_LOG=$CATALINA_BASE/logs/catalina.out fi # - Execute The Requested Command - echo Using CATALINA_BASE: $CATALINA_BASE echo Using CATALINA_HOME: $CATALINA_HOME echo Using CATALINA_TMPDIR: $CATALINA_TMPDIR echo Using CATALINA_LOG:$CATALINA_LOG echo Using JAVA_HOME: $JAVA_HOME ... ... elif [ $1 = start ] ; then shift touch $CATALINA_LOG if [ $1 = -security ] ; then echo Using Security Manager shift $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -Djava.security.manager \ -Djava.security.policy=$CATALINA_BASE/conf/catalina.policy \ -Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ $CATALINA_LOG 21 else $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -Dcatalina.base=$CATALINA_BASE \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ $CATALINA_LOG 21 fi a big +1 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mod_webapp.so socketpool changes..
[EMAIL PROTECTED] wrote: Hi, I'm a bit confused about the problem with the use of the APR atomic types. Is the problem that it is not supported on all platforms? No it is not yet supported on all platforms. If this is the case then isn't this a problem with the apr code? Even if a given OS doesn't specifically offer atomic types then (as menioned earlier) a simple mutex and int in a struct offers the same functionality.] Yep, there is an apr_atomic.c file that could be used as generic atomic code. As far as I can see, all this wrapping should be part of the apr, shouldn't it? I think puting in #ifdef APR_USE_ATOMICS is a bit of band-aid solution; Whether or not atomics are OS supported the variables in question should really be only operated on atomically (in a multi-threaded environment) or else the code is not thread-safe. The status of atomic is not 100% clear in APR. Someone from RedHat tells it will not work in user space (at least on Linux)(see http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=63643). For mod_webapp probably the best might be to use mutex instead of atomic. Also, I don't know if this has got anything to do with the compilation problems found but when I first put in the atomics I found that the implementation in the (fairly recent) version of the apr I had was broken (on NT) and caused compilation to fail. Getting the latest version fixed this problem. BTW Pier, sorry for not responding earlier - I managed to get the mod_webapp module compiling for Apache 2 after tweaking the 1.3 makefile to get a 2.0 makefile for NT. I used the apr directly from the Apache 2.0 distribution. At the moment I am using Apache 2.0 on an NT intranet server with the mod_webapp at it seems to behave identically to the 1.3 version. PS. If you want me to make any changes modifications (either changing the #ifdef or anything else) to the warp connector just let me know I committed your changes. For the moment I think we should wait to see what happends in APR... PPS. I noticed a comment about mod_webapp being deprecated. Is this the case? No. It is just commented out in the server.xml that is delivered with the TC binaries. Simon. [EMAIL PROTECTED] wrote: Pier Fumagalli wrote: Cavan Morris [EMAIL PROTECTED] wrote: Attached is an ASCII file with my build process. It may be important to not that I'm using the APR libraries from the webapp-module-1.0.2-tc402 and apxs from apache 2.0.32 not 2.0.35. You _need_ to use the APR libraries shipped with your Apache 2.0 version, and the same APXS, anyway it's bloated on my system as well. I have some spare time on my hands tonight, and tomorrow... I'll try to revamp the autoconf stuff and make it build again... NOTE I might break something in Win32 builds. Can someone with MSVC give it a go once they see my commits, please? /NOTE Question: when you say Yes, that's right... do you mean yes that's right, the socketpool work may solve bug 8433 or yes that's right, it doesn't compile? The #if APR_HAS_THREADS is wrong that should have been #if APR_HAS_ATOMIC. But APR_HAS_ATOMIC is not existing and it is not possible to force APR to use a generic C code for atomics (apr_force_atomic_generic cannot be set to one via some configure options). Therefore when apr_atomic_t is not defined mod_webapp compilation failed miserably. I will try to change the #if APR_HAS_THREADS into #ifdef USE_ATOMICS like in the mod_mem_cache.c of httpd-2.0. (As a temporary fix). Both... Yeah, the socketpool solves that problem as well (at least it should, what's your worker configuration in Apache 2.0? - output of httpd -l please :) and yes, it doesn't compile... On APR they're talking about removing atomics, since those bits actually depend (especially on sun hardware) on some opcodes present only on V9 architectures (JF might explain it better than me, the only 2 RISCs I've coded for are PPCs and MIPSes), thus making binaries unportable from one architecture to another... The atomic for SPARC is using cas that is an 8+ opcode. This causes problems on SPARC machines with old processors. There is a C code for machines that does not have a as atomic support. Therefore my thought is to rely on inter-process mutex locking, instead of atomics)... Thanks for your time. I feel lucky to have some spare time on my hands :) :) :) Pier -Cavan Morris - Original Message - From: Pier Fumagalli [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Saturday, April 27, 2002 8:58 AM Subject: Re: mod_webapp.so socketpool changes.. Cavan Morris [EMAIL PROTECTED] wrote: Hey Guys, I reported bug 8433 and am looking for a way to solve it. I thought that the socketpool work you're doing might solve the problem but wasn't able to
re: Howto autorun an application when tomcat server startup?
Hi, I am not sure how you would go about doing this in Tomcat 4, but in 3.2.x, in the $TOMCAT_HOME/webapps/yourwebapp/WEB-INF/web.xml file, you could write a special XML tag and give the fully qualified classname of your Java class (e.g. com.yourcompany.MyApplication) in those tags. When Tomcat starts, it will read all the web.xml files, and finding this tag wrapping your class, it will load that class. I've used this to make a static JDBC Connection Pool available to all web applications running in Tomcat. you should probably make your class (MyApplication.java) extend Servlet. Since Servlet has an init() method that will be called once, your application will be started by Tomcat, so you don't have to start it manually. Do your work in init() rather than doGet() or doPost(), so people just don't call your servlet and make it do work all over again. see $TOMCAT_HOME/webapps/text/WEB-INF/web.xml for more details see $TOMCAT_HOME/conf/web.xml for more details make sure your class (MyApplication.class) is in Tomcat's classpath use this tag: load-on-startup/load-on-startup servlet servlet-name myapplication /servlet-name servlet-class com.mycompany.MyApplication /servlet-class load-on-startup -2147483646 /load-on-startup /servlet I'm not sure what the numbers mean :), but it has seemed to work for me. I'm not sure this procedure is still valid in Tomcat 4 or if I've gotten things mixed up in the explanation above, but it should be a start for you. regards, Michael Locasto -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: PROPOSAL: mod_jk2 autoconfig
On Tue, 30 Apr 2002, Hans Schmid wrote: I can not see how this works if you have Apache and Tomcat on different machines. This way we do not have a webapp/ directory on that Apache server. It works fine. There are 2 cases: 1. You want Apache to serve static pages. That's the 'normal' case, and it automatically require that you _have_ the webapp (at lest the static pages, you can remove the clasesses, lib, etc ) on the apache server. 2. You don't want apache to serve static pages for the app. In this case you'll just put a small file in the webapp/ ( myApp.jk2 or something similar - see how 3.3 apps-myApp.xml or 4.1 webapps/myApp.xml works ), with the single mapping that is required to forward all requests. Even in the second case, I think it is easier to 'deploy' one conf file per webapp in a clear format than editing workers.properties. Did I misunderstand the intent of this configuration? Is it a 'best guess' for simple setups? Probably in our scenario we have to configure it manually anyways. Manual configuration will work, of course. In tomcat you can still edit server.xml. It's just that I would strongly discourage that for 'normal' use. Some 'special' files ( like in 4.1 and the 3.3 apps- files ) will also be read and used to load webapps that sit in different directories. same here we are on different machines. Again, all you need is to install 1 file on the server machine for each webapp ( without static files ). I personally believe that is a very bad choice to not let apache serve the static files, but it'll work. Just make sure, everything in the config can be overwritten and configures manually if possible in a single file (as workers.properties right now) Either workers2.properties, or one file in the webapps ( named after the application, with .jk2 extension ). The file can be used if you have the docRoot in a different place in the apache server. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: PROPOSAL: mod_jk2: Group/Instance
On Tue, 30 Apr 2002, Bernd Koecke wrote: some weeks ago I send a patch for mod_jk for an only routing lb_worker. A few days later I sent the docu. Henry Gomez said, that it should be commited. But it I think it isn't in the repository. But its the same with me here, to mutch work for to less time :). I think it is in mod_jk, I remember seeing the commit. And I think I commited it in jk2 as well ( after some modifications ). I need sticky sessions but no loadbalancing in the module. If a request without a session comes in, it should be routed to the _local_ tomcat. Well, there is another use-case with the exact same behavior - Apache2 with tomcat in JNI mode. All requests without session should be routed to the _jni_ channel ( i.e. in-process, minimal overhead ). It's exacly the same - so be sure I do my best to handle this case :-) Apache2 acts like a 'natural' load-balancer/fail-over, with the parent process monitoring for crashes and it starts/stop childs based on load. I think this could be possible with the associated instance of a channel (item 7). Then I have to configure all four nodes for the same group. Because all nodes will serve the same webapps and associate the channel with this group. But for this I need a non balancing group. I don't see if the default behavior of a group is balancing and if this can be switched off. Is this right or do I miss something? The default is balancing, but you can tune this using weithgs ( and I think we use your code for making one instance 'top priority'). Please check the code, take a look and send additional comments/patches. It's not yet completely done, of course. Thanks, Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: PROPOSAL: mod_jk2 autoconfig
On Tue, 30 Apr 2002, GOMEZ Henri wrote: I think the current solution of generating configs on tomcat startup, or having tomcat send it's config to apache is wrong. when tomcats and httpd servers run on differents machines you need to have a form of link between them, and that's why I proposed autoconf to be added to ajp13 (I don't tell ajp14 to avoid confusion). I know. However ( see my previous answer on this topic ) we should get apache to serve the static files - for performance, etc - and that would require the webapp to be on the apache machine anyway. And in the case you want one extra round-trip for each static page, it is still possible to install one small file for each app. The 'ctl' or 'status' workers are supposed to do exactly what you say - get status updates 'over the wire' ( but using HTTP - it's not performance critical and easier ) and eventually change and save the new conf ( save is implemented already in jk_config, but not used yet ). I agree we have a sort of chicken and eggs problems here since httpd servers need to know which tomcat are available to try to connect to them to get the configuration. No chicken and egg here if the config is persistent. Similar with how JMX works - you change/add configs at any time during runtime, it saves the config, and next time you have what you configured, without requiring the JMX manager to be up and re-do the config. httpd server should have a thread (or fork in AP 1.3) to listen to incoming broadcast notification and determine if there is a new tomcat in (or out) and contact newcomer to get its config informations. In case of tomcat caming out, it should remove references to the old tomcat. That would be the ctl handler, and the shm will allow each apache instances to get the message. I know there are other, more sophisticated solutions - but I prefer ( at least for the short term ) a plain HTTP and plain config file. Later we can implement 'broadcast' or other advanced solutions ( like using an LDAP server ?) Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: PROPOSAL: mod_jk2 autoconfig
On Tue, 30 Apr 2002, Glenn Nielsen wrote: Both generating an apache config file on startup and my mod_jk change which auto mounts context's make the assumption that the Tomcat webapps directory is available to the web server. This may not be the case for instances of Tomcat on a remote system. See my previous mails. The only assumption is that you'll have at least one config file on the apache server ( but in a webapps/ directory instead of a line in workers.properties ). It would be best if information about what contexts are configured, which of the configured contexts are available, and the request URI's to map to Tomcat was pushed from Tomcat to Apache via the network (channel ?). I agree - and I was proposing to use a plain HTTP request to communicate between Tomcat and apache, and shared memory to communicate between apache processors. There would still be a need for JkAutoAlias for those who want apache to server static content for a web app which is available via the fs. Yes, and this whole proposal would still need your help :-) Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8662] New: - The jsp_precompile in tomcat 4 is not working
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8662. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8662 The jsp_precompile in tomcat 4 is not working Summary: The jsp_precompile in tomcat 4 is not working Product: Tomcat 4 Version: 4.0.3 Final Platform: PC OS/Version: Other Status: NEW Severity: Critical Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Can somebody what needs to be done to perform precompilation using the jsp_precompile=true in tomcat 4. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8662] - The jsp_precompile in tomcat 4 is not working
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8662. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8662 The jsp_precompile in tomcat 4 is not working [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 15:24 --- It does work with the current builds, as it is used for jspInit with load-on- startup. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with url session encoding - Tomcat 4.0.4 b2
On Tue, 30 Apr 2002, Arshad Mahmood wrote: Date: Tue, 30 Apr 2002 11:12:48 +0100 From: Arshad Mahmood [EMAIL PROTECTED] Reply-To: Tomcat Developers List [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Subject: Problem with url session encoding - Tomcat 4.0.4 b2 Hi, I am writing an e-commerce application using tomcat and have come across a minor issue with url session encoding. The problem is that if a valid session id is available on the url then tomcat does not use cookies. Here is my scenario :- 1. I have tomcat configured to use cookies for session id's if possible. 2. An access to the index.html of my site redirects via url encoding to home/index.html. This causes the session to be sent both via the url and a cookie, from here on tomcat knows it can use cookies and doesn't bother adding the session id to the url when I use encodeURL. This is not quite right. Tomcat doesn't know it can use cookies until the browser makes the second request *with* a cookie. 3. If I close the browser and open a new browser and use the url history box then the url that appears is home/index.html with the added url encoding (because I redirected from the original index.html). As you've probably gathered, closing the browser kills your session cookies, which effectively logs you off of your sessions. This is a Good Thing (tm) -- otherwise, what happens if someone else happens to come along and uses your PC, instead of you? Presto, they would be authenticated with your ID and could do all sorts of mischief. 4. Because this url has a valid session id, tomcat now defaults to using the url endoing method and doesn't even try to use a cookie for this browser session. If the cookie had come back in again, it would have turned off URL rewriting again. My problem is that I want tomcat to always try and use a cookie even when using url encoding (unless it is already using a cookie). I realise it is a pain for those users that have setup prompts before accepting cookies, but in my case I would prefer an inconvenience to a small number of users and not the vast variety of users seeing the session id on all their url's. My own prefernce would be to overload the cookies parameter so that a value of force would cause this behaviour and leave the existing semantics for the already defined values. Sounds like a good opportunity to make your own custom version of the Tomcat code that does this ... and, oh by the way, lock yourself now and forever more into using your patched version of Tomcat, because no other container implements the approach you suggest. Also, you're likely to cause anyone doing a security audit of your application some serious heartburn. Regards, Arshad Craig -- 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]
[TEST] Please ignore...
I need to test the antivirus thinghie on a _BIG_ list, and that's a good one... Sorry... Pier -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: AW: PROPOSAL: mod_jk2 autoconfig
-Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 30. April 2002 16:39 An: Tomcat Developers List Betreff: Re: AW: PROPOSAL: mod_jk2 autoconfig On Tue, 30 Apr 2002, Hans Schmid wrote: I can not see how this works if you have Apache and Tomcat on different machines. This way we do not have a webapp/ directory on that Apache server. It works fine. There are 2 cases: 1. You want Apache to serve static pages. That's the 'normal' case, and it automatically require that you _have_ the webapp (at lest the static pages, you can remove the clasesses, lib, etc ) on the apache server. 2. You don't want apache to serve static pages for the app. In this case you'll just put a small file in the webapp/ ( myApp.jk2 or something similar - see how 3.3 apps-myApp.xml or 4.1 webapps/myApp.xml works ), with the single mapping that is required to forward all requests. We have lots of not webapp related static stuff so we have set the DocumenRoot of apache at our static 'source' tree (not tomcat related source tree). For the few bits of static content in our webapps (few logos) we do not really care (yet). They are served by Tomcat. This has all historic reasons. This is an old system migrating slowly :) So we do not even have a Tomcat installed on our webservers - so no webapps directories. Even in the second case, I think it is easier to 'deploy' one conf file per webapp in a clear format than editing workers.properties. Did I misunderstand the intent of this configuration? Is it a 'best guess' for simple setups? Probably in our scenario we have to configure it manually anyways. Manual configuration will work, of course. In tomcat you can still edit server.xml. It's just that I would strongly discourage that for 'normal' use. We make heavy use of the apps-myall.xml files in TC 3.3.1 - but as I said, no Tomcat on our webservers. We have 2 hardware loadbalanced small pizzaboxes running Apache and three bigger Solaris machines running our Tomcats and the database. Some 'special' files ( like in 4.1 and the 3.3 apps- files ) will also be read and used to load webapps that sit in different directories. same here we are on different machines. Again, all you need is to install 1 file on the server machine for each webapp ( without static files ). I personally believe that is a very bad choice to not let apache serve the static files, but it'll work. Have not yet figured out how to combine our static DocumentRoot plus serving static contents from our webapps. Just make sure, everything in the config can be overwritten and configures manually if possible in a single file (as workers.properties right now) Either workers2.properties, or one file in the webapps ( named after the application, with .jk2 extension ). The file can be used if you have the docRoot in a different place in the apache server. exactly this is our setup. So we will use a workers2.properties. Thanks for clarifying. Cheers, Hans Costin -- 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: Resend: SSL portability and Coyote
Bill Barker [EMAIL PROTECTED] writes: From: Eric Rescorla [EMAIL PROTECTED] Bill Barker [EMAIL PROTECTED] writes: Also, somebody in o.a.c.tomcat4 needs to fire the ACTION_REQ_SSL_ATTRIBUTE action. That's the Coyote replacement for CertificateValve. Ah. Can you give me the 10,000 overview on how ATTRIBUTES work (or point me to the right location)? I assume you mean actions. They are defined in o.a.c.ActionCode, and processed by somebody implementing o.a.c.ActionHook (both under the coyote directory). For the HTTP/1.1 connector, this is o.a.c.http11.Http11Processor (under the http11 directory). The usual way to fire them is to call o.a.c.Response.action (which is conventionally named coyoteResponse). For the SSL action, the second parameter is the o.a.c.Request. Hmm I arranged to call this hook in o.a.c.tomcat4.CoyoteAdapter.postParseRequest, but none of the values seem to be getting propagated to the servlets. I've verified that setAttribute call is made, the variables just don't show up. I'm not really excited about debugging this since it seems to require first figuring out how Coyote and Cataline move attributes around, which I assume someone already knows how to do. If that someone has a working example of setting any such attribute using an action that would be a greatly appreciated. At that point, I should be able to adapt it to set the SSL attributes. Even a fixed string would be fine. Anyone? -Ekr -- [Eric Rescorla [EMAIL PROTECTED]] http://www.rtfm.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 4930] - java.io.StreamCorruptedException: Type code out of range, is 0 with Apache WebApp module
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4930. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4930 java.io.StreamCorruptedException: Type code out of range, is 0 with Apache WebApp module [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/webapp/support aplocal.m4
pier02/04/30 09:42:44 Modified:webapp/support aplocal.m4 Log: Stripped little thing that prevented to build ./configure with AutoConf 2.52 and greater. Revision ChangesPath 1.10 +6 -6 jakarta-tomcat-connectors/webapp/support/aplocal.m4 Index: aplocal.m4 === RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/support/aplocal.m4,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- aplocal.m41 Nov 2001 22:20:52 - 1.9 +++ aplocal.m430 Apr 2002 16:42:44 - 1.10 @@ -57,7 +57,7 @@ dnl -- dnl Author Pier Fumagalli [EMAIL PROTECTED] -dnl Version $Id: aplocal.m4,v 1.9 2001/11/01 22:20:52 pier Exp $ +dnl Version $Id: aplocal.m4,v 1.10 2002/04/30 16:42:44 pier Exp $ dnl -- dnl -- @@ -127,11 +127,11 @@ ]) AC_DEFUN(LOCAL_HELP,[ - AC_DIVERT_PUSH(AC_DIVERSION_NOTICE) - ac_help=${ac_help} - -[$1] - AC_DIVERT_POP() +dnl AC_DIVERT_PUSH(AC_DIVERSION_NOTICE) +dnl ac_help=${ac_help} +dnl +dnl [$1] +dnl AC_DIVERT_POP() ]) dnl -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: AW: PROPOSAL: mod_jk2 autoconfig
On Tue, 30 Apr 2002, Hans Schmid wrote: For the few bits of static content in our webapps (few logos) we do not really care (yet). They are served by Tomcat. So we do not even have a Tomcat installed on our webservers - so no webapps directories. You don't have to have tomcat installed - you can have a webapps directory without tomcat :-) My proposal works regardless of tomcat's presence - all you need is a hierarchy of directories and some config files in some pre-set locations - it will resemble ( or be the same with ) tomcat's webapps/. If you have the 'real' webapp installed in the hierarchy ( or the static subset - you can remove all dynamic pages ), then we'll just use the directory name and WEB-INF/jk2/ for configuration. If you don't want any file on the apache server - you just have one file for each webapp with the basic config information. The only issue is making this consistent and easy ( and eventually allow us in future to implement reloading ). We make heavy use of the apps-myall.xml files in TC 3.3.1 - but as I said, no Tomcat on our webservers. We have 2 hardware loadbalanced small pizzaboxes running Apache and three bigger Solaris machines running our Tomcats and the database. I understand. This is just one more simple overhead - instead of editing httpd.conf and use JkMount you'll use one file for each application. Or just ignore this proposal and use manual configuration - what I'm trying to solve is getting 'simple things simple'. Have not yet figured out how to combine our static DocumentRoot plus serving static contents from our webapps. One easy way would be to configure the /webapps location to be the same dir with the DocumentRoot. ( of course, some Deny for WEB-INF will be required - but that's allways the case and we can do it automatically ). Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] Re: [PROPOSAL] Modification of the code generated by Jasper2
I just ran a quick test using the test pages I used earlier for benchmarking, and the results are very positive. Thanks to Denis for patch. The following data might bring a smile. Here is a link to the previous benchmarks I posted. http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg49733.html The benchmark was performed on System II mentioned in the previous post in tomcat-user list. Another system was used to send requests. New Results with Denis Patch - 1 thread 1000 --- ave - 46 cpu usage - 35-50% 2 threads 500 --- ave - 73 cpu usage - 40-80% 4 threads 250 --- ave - 133 cpu usage - 50-80% 8 threads 125 --- ave - 235 cpu usage - 60-85% 16 threads 65 --- ave - 479 cpu usage - 60-95% 32 threads 63 --- ave - 1157 cpu usage - 80-95% Remy Maucherat wrote: I've applied the patch. Watchdog is fine, so I committed it. The admin webapp appeared slow before the patch (esp when using a context page), and that was with an Athlon 1700 as the server with one user (me). I'm not happy in general when a request uses 100% of the CPU for 1 full second ;-) I couldn't figure out why it was so slow, and the other runtime optimizations didn't help at all. It turns out it was caused by this JVM bug ... With the patch, it's become quite fast. Very impressive, and since IMO it is quite representative of a Struts based application which would have complex pages, it's really awesome. I suppose the fast JSP compilers (Resin, Orion) use similar tricks in the code generation. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] peter lin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] Re: [PROPOSAL] Modification of the code generated by Jasper2
I just ran a quick test using the test pages I used earlier for benchmarking, and the results are very positive. Thanks to Denis for patch. The following data might bring a smile. Here is a link to the previous benchmarks I posted. http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg49733.html The benchmark was performed on System II mentioned in the previous post in tomcat-user list. Another system was used to send requests. I don't remember what your test page was (and I can't find which series of tests I should compare to also ;-)), but you have to remember that the bug is that the time needed by the JVM is non linear to the number of tags. So if you use 10 tags in the page, it should help a bit. If you use 100 tags, it will help a LOT. If you use more tags, the page will likely not work at all without the patch. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/config WebXml2Jk.java
costin 02/04/30 10:40:57 Added: jk/java/org/apache/jk/config WebXml2Jk.java Log: Initial code for the web.xml to jk2 converter. The file will work as an ant task, as CLI ( with each ant attribute used as -ATTRIBUTE VALUE ) or as a bean. It will read web.xml files and generate jk2 configs - no tomcat is required. Revision ChangesPath 1.1 jakarta-tomcat-connectors/jk/java/org/apache/jk/config/WebXml2Jk.java Index: WebXml2Jk.java === /* * * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in *the documentation and/or other materials provided with the *distribution. * * 3. The end-user documentation included with the redistribution, if *any, must include the following acknowlegement: * This product includes software developed by the *Apache Software Foundation (http://www.apache.org/). *Alternately, this acknowlegement may appear in the software itself, *if and wherever such third-party acknowlegements normally appear. * * 4. The names The Jakarta Project, Tomcat, and Apache Software *Foundation must not be used to endorse or promote products derived *from this software without prior written permission. For written *permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called Apache *nor may Apache appear in their names without prior written *permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * http://www.apache.org/. * * [Additional notices, if required by prior licensing conditions] * */ package org.apache.jk.config; import java.io.*; import java.net.*; import java.util.*; import java.security.*; import org.apache.tomcat.util.IntrospectionUtils; import javax.xml.parsers.*; /* Yes, it's using DOM */ import org.w3c.dom.*; import org.xml.sax.*; /* Naming conventions: JK_CONF_DIR == serverRoot/work ( XXX /jkConfig ? ) - Each vhost has a sub-dir named after the canonycal name - For each webapp in a vhost, there is a separate WEBAPP_NAME.jkmap - In httpd.conf ( or equivalent servers ), in each virtual host you should Include JK_CONF_DIR/VHOST/jk_apache.conf. The config file will contain the Alias declarations and other rules required for apache operation. Same for other servers. - WebXml2Jk will be invoked by a config tool or automatically for each webapp - it'll generate the WEBAPP.jkmap files and config fragments. WebXml2Jk will _not_ generate anything else but mappings. It should _not_ try to guess locations or anything else - that's another components' job. */ /** * Read a web.xml file and generate the mappings for jk2. * It can be used from the command line or ant. * * In order for the web server to serve static pages, all webapps * must be deployed on the computer that runs Apache, IIS, etc. * * Dynamic pages can be executed on that computer or other servers * in a pool, but even if the main server doesn't run tomcat, * it must have all the static files and WEB-INF/web.xml. * ( you could have a script remove everything else, including jsps -
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common Shm.java
costin 02/04/30 10:44:50 Modified:jk/java/org/apache/jk/common Shm.java Log: Use the WRITE_SLOT command. Again, the idea is that the scoreboard is divided in 'slots', each slot has a name ( identifying the 'owner' ). We'll use the scoreboard for configuration ( at first ), with a java bean ( used either individually or at tomcat startup ) writing information in the scoreboard about a tomcat instance. The lb worker will read the 'serial' number in the scoreboard header and update it's instance table based on the content. The synchronization is not implemented yet - if 2 tomcats are registered at the exact same time we may get unexpected results ( a bit unlikely, will be fixed after we 'bridge' the APR locks ). Revision ChangesPath 1.7 +8 -5 jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java Index: Shm.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Shm.java 25 Apr 2002 22:44:23 - 1.6 +++ Shm.java 30 Apr 2002 17:44:50 - 1.7 @@ -85,7 +85,7 @@ // Will be dynamic ( getMethodId() ) after things are stable static final int SHM_SET_ATTRIBUTE=0; -static final int SHM_REGISTER_TOMCAT=2; +static final int SHM_WRITE_SLOT=2; static final int SHM_ATTACH=3; static final int SHM_DETACH=4; @@ -142,8 +142,13 @@ this.invoke( msg, mCtx ); } + +public void registerTomcat(String host, int port) throws IOException { +String slotName=TOMCAT: + host + : + port; +writeSlot( slotName ); +} -public void registerTomcat(String host, int port) +public void writeSlot(String slotName) throws IOException { if( apr==null ) return; @@ -151,10 +156,8 @@ Msg msg=(Msg)mCtx.getMsg(0); msg.reset(); C2BConverter c2b=(C2BConverter)mCtx.getNote(C2B_NOTE); - -String slotName=TOMCAT: + host + : + port; -msg.appendByte( SHM_REGISTER_TOMCAT ); +msg.appendByte( SHM_WRITE_SLOT ); appendString( msg, slotName, c2b ); this.invoke( msg, mCtx ); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Idea for dtomcat4 script/conf in webapp.rpm
Think I did this right, didn't I? (I diff'ed my changes against tomcat_404_b2 jakarta-tomcat-4.0/catalina/src/bin/catalina.sh) The patchfile is attached: -Mark Mark Diggory wrote: Which Tag is for 4.0.4 ? (tomcat_404_b2_01 or tomcat_404_b2) or do I want to do it against 4.1 (HEAD) -Mark GOMEZ Henri wrote: BTW, as rpm packager I'm trying to works closely with projects to have such add-ons included directly in original tarball which help developpers fixes problems of rpm users. I'm all for that. Do you know who is currently managing the /usr/bin/dtomcat file in the current tarball? Maybe they can get in on the conversation. dtomcat is just the rpm renaming of original catalina.sh... Index: catalina.sh === RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v retrieving revision 1.20.2.3 diff -u -r1.20.2.3 catalina.sh --- catalina.sh 19 Mar 2002 18:24:36 - 1.20.2.3 +++ catalina.sh 30 Apr 2002 17:39:06 - @@ -17,6 +17,9 @@ # the JVM should use (java.io.tmpdir). Defaults to # $CATALINA_BASE/temp. # +# CATALINA_LOG(Optional) Provides alternate output locations for StandardOut +# and StandardErr +# # JAVA_HOME Must point at your Java Development Kit installation. # # JAVA_OPTS (Optional) Java runtime options used when the start, @@ -94,6 +97,11 @@ CATALINA_TMPDIR=$CATALINA_BASE/temp fi +if [ -z $CATALINA_LOG ] ; then + # Define the default location for StandardErr and StandardOut to use for Catalina +CATALINA_LOG=$CATALINA_BASE/logs/catalina.out +fi + # For Cygwin, switch paths to Windows format before running java if $cygwin; then JAVA_HOME=`cygpath --path --windows $JAVA_HOME` @@ -107,6 +115,7 @@ echo Using CATALINA_BASE: $CATALINA_BASE echo Using CATALINA_HOME: $CATALINA_HOME echo Using CATALINA_TMPDIR: $CATALINA_TMPDIR +echo Using CATALINA_LOG:$CATALINA_LOG echo Using JAVA_HOME: $JAVA_HOME if [ $1 = jpda ] ; then @@ -197,7 +206,7 @@ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ - $CATALINA_BASE/logs/catalina.out 21 + $CATALINA_LOG 21 else $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ @@ -205,7 +214,7 @@ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ - $CATALINA_BASE/logs/catalina.out 21 + $CATALINA_LOG 21 fi elif [ $1 = stop ] ; then -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] Re: [PROPOSAL] Modification of the code generated by Jasper2
Here is a bit more information on the test pages I have. total tags used: 172 main page: 105 header page: 65 footer page: 2 Actually there the main page includes a few other pages using c:import in JSTL. The total count on the tags used is over 200, but the other files are smaller, using a dozen or so tags. I will do more tests using coyote a later in the week. Once I have that data, I will post it. peter lin Remy Maucherat wrote: I just ran a quick test using the test pages I used earlier for benchmarking, and the results are very positive. Thanks to Denis for patch. The following data might bring a smile. Here is a link to the previous benchmarks I posted. http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg49733.html The benchmark was performed on System II mentioned in the previous post in tomcat-user list. Another system was used to send requests. I don't remember what your test page was (and I can't find which series of tests I should compare to also ;-)), but you have to remember that the bug is that the time needed by the JVM is non linear to the number of tags. So if you use 10 tags in the page, it should help a bit. If you use 100 tags, it will help a LOT. If you use more tags, the page will likely not work at all without the patch. Remy -- 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]
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans ConnectorMBean.java StandardServerMBean.java mbeans-descriptors.xml
amyroh 02/04/30 10:47:26 Modified:catalina/src/share/org/apache/catalina/mbeans StandardServerMBean.java mbeans-descriptors.xml Added: catalina/src/share/org/apache/catalina/mbeans ConnectorMBean.java Log: Add ServerSocketFactory properties to HttpsConnector. Revision ChangesPath 1.12 +5 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java Index: StandardServerMBean.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- StandardServerMBean.java 30 Apr 2002 03:25:22 - 1.11 +++ StandardServerMBean.java 30 Apr 2002 17:47:26 - 1.12 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v 1.11 2002/04/30 03:25:22 amyroh Exp $ - * $Revision: 1.11 $ - * $Date: 2002/04/30 03:25:22 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v 1.12 2002/04/30 17:47:26 amyroh Exp $ + * $Revision: 1.12 $ + * $Date: 2002/04/30 17:47:26 $ * * * @@ -109,7 +109,7 @@ * codeorg.apache.catalina.core.StandardServer/code component./p * * @author Amy Roh - * @version $Revision: 1.11 $ $Date: 2002/04/30 03:25:22 $ + * @version $Revision: 1.12 $ $Date: 2002/04/30 17:47:26 $ */ public class StandardServerMBean extends BaseModelMBean { @@ -765,6 +765,7 @@ } writer.println(/ResourceParams); +// Store the ending of this element for (int i = 0; i indent; i++) { writer.print(' '); } 1.51 +29 -9 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- mbeans-descriptors.xml30 Apr 2002 03:25:22 - 1.50 +++ mbeans-descriptors.xml30 Apr 2002 17:47:26 - 1.51 @@ -6,7 +6,7 @@ !-- Descriptions of JMX MBeans for Catalina - $Id: mbeans-descriptors.xml,v 1.50 2002/04/30 03:25:22 amyroh Exp $ + $Id: mbeans-descriptors.xml,v 1.51 2002/04/30 17:47:26 amyroh Exp $ -- mbeans-descriptors @@ -128,7 +128,7 @@ mbean name=CoyoteConnector -className=org.apache.catalina.mbeans.ClassNameMBean +className=org.apache.catalina.mbeans.ConnectorMBean description=Implementation of a Coyote connector domain=Catalina group=Connector @@ -151,6 +151,10 @@ type=java.lang.String writeable=false/ +attribute name=clientAuth + description=Should we require client authentication? + type=boolean/ + attribute name=connectionTimeout description=Timeout value on the incoming connection type=int/ @@ -164,17 +168,17 @@ description=The debugging detail level for this component type=int/ -attribute name=secret - description=Authentication secret (I guess ... not in Javadocs) - type=java.lang.String/ - attribute name=enableLookups description=The 'enable DNS lookups' flag for this Connector type=boolean/ -attribute name=redirectPort - description=The redirect port for non-SSL to SSL redirects - type=int/ +attribute name=keystoreFile + description=Pathname to the key store file to be used + type=java.lang.String/ + +attribute name=keystorePass + description=Password for accessing the key store file + type=java.lang.String/ attribute name=maxProcessors description=The maximum number of processors allowed @@ -187,10 +191,26 @@ attribute name=port description=The port number on which we listen for ajp13 requests + type=int/ + +attribute name=proxyName + description=Ther Server name to which we should pretend requests to this Connector + type=java.lang.String/ + +attribute name=proxyPort + description=Ther Server port to which we should pretend
cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/config WebXml2Jk.java
costin 02/04/30 10:55:27 Modified:jk/java/org/apache/jk/config WebXml2Jk.java Log: Few more lines of code. Revision ChangesPath 1.2 +74 -4 jakarta-tomcat-connectors/jk/java/org/apache/jk/config/WebXml2Jk.java Index: WebXml2Jk.java === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/config/WebXml2Jk.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WebXml2Jk.java30 Apr 2002 17:40:57 - 1.1 +++ WebXml2Jk.java30 Apr 2002 17:55:26 - 1.2 @@ -131,7 +131,7 @@ /** Set the canonycal name of the virtual host. */ -public void setVhost( String vhost ) { +public void setHost( String vhost ) { this.vhost=vhost; } @@ -169,7 +169,7 @@ * * This is equivalent to the worker in jk1. */ -public void setJkGroup(String route ) { +public void setGroup(String route ) { worker=route; } @@ -190,6 +190,7 @@ out.println( #servlet= + getContent( servN )); out.println( #cpath= + cpath ); out.println( #vhost= + vhost ); +out.println(); } Node lcN=getChild( webN, login-config ); @@ -204,8 +205,72 @@ String loginPage=getContent( getChild( n1, form-login-page)); String errPage=getContent( getChild( n1, form-error-page)); -System.out.println(LOGIN: + loginPage ); -System.out.println(ERR: + errPage ); +out.println([url: + vhost + cpath + loginPage + ] ); +out.println( group= + worker ); +out.println(); +out.println([url: + vhost + cpath + errPage + ] ); +out.println( group= + worker ); +out.println(); +} + +System.out.println(Generating mappings for security constraints ); +for( Node mapN=getChild( webN, security-constraint ); + mapN != null; mapN = getNext( mapN )) { +Node wrcN=getChild( mapN, web-resource-collection); + +Vector methods=new Vector(); +for( Node uN=getChild(wrcN, http-method); + uN!=null; uN=getNext( uN )) { +methods.addElement( getContent( uN )); +} + +Vector urls=new Vector(); +for( Node uN=getChild(wrcN, url-pattern); + uN!=null; uN=getNext( uN )) { +urls.addElement( getContent( uN )); +} + +// Not used at the moment +Node acN=getChild( mapN, auth-constraint); +Vector roles=new Vector(); +for( Node rN=getChild(acN, role-name); + rN!=null; rN=getNext( rN )) { +roles.addElement(getContent( rN )); +} +generateConstraints( urls, methods, roles ); +} +} + +// To be included in a VirtualHost section +void generateJk1Mount(Node webN, PrintWriter out) { + +System.out.println(Generating JkMount for servlets ); +for( Node mapN=getChild( webN, servlet-mapping ); + mapN != null; mapN = getNext( mapN ) ) { + +Node servN=getChild( mapN, servlet-name); +if( servN==null ) +servN=getChild( mapN, jsp-file); +Node url=getChild( mapN, url-pattern); + +out.println( JkMount + cpath + getContent(url) + + worker); +} + +Node lcN=getChild( webN, login-config ); +if( lcN!=null ) { +System.out.println(Generating mapping for login-config ); + +Node authMethN=getChild( lcN, auth-method); +String authMeth=getContent( authMethN ); +if( authMeth == null ) authMeth=FORM; + +Node n1=getChild( lcN, form-login-config); +String loginPage=getContent( getChild( n1, form-login-page)); +String errPage=getContent( getChild( n1, form-error-page)); + +out.println(JkMount + cpath + loginPage + + worker ); +out.println(JkMount + cpath + errPage + + worker ); +out.println(); } System.out.println(Generating mappings for security constraints ); @@ -362,6 +427,11 @@ System.out.println(Usage: ); System.out.println( WebXml2Jk [OPTIONS]); System.out.println(); +System.out.println( -docBase DIRThe location of the webapp. Required); +System.out.println( -group GROUPGroup, if you have multiple tomcats with diffrent content. ); +System.out.println(
DO NOT REPLY [Bug 5853] - Unable to get request parameters in the Error page for form based login
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5853. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5853 Unable to get request parameters in the Error page for form based login [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|WONTFIX | --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 18:04 --- Re-opening bug - no explanation found for why it was set to RESOLVED WONTFIX -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/admin/connector connector.jsp
manveen 02/04/30 11:10:48 Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationResources_en.properties ApplicationResources_es.properties webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector AddConnectorAction.java SaveConnectorAction.java webapps/admin/connector connector.jsp Log: Trying to use the new createConnector methods -- testing Revision ChangesPath 1.48 +2 -0 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties Index: ApplicationResources_en.properties === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- ApplicationResources_en.properties29 Apr 2002 01:07:53 - 1.47 +++ ApplicationResources_en.properties30 Apr 2002 18:10:47 - 1.48 @@ -129,6 +129,8 @@ host.wars=Unpack WARs host.aliases=Aliases host.alias.name=Alias Name +error.aliasName.exists=liAlias already exists/li +error.aliasName.required=liAlias name is required/li context.properties=Context Properties context.cookies=Cookies context.cross.context=Cross Context 1.42 +2 -0 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties Index: ApplicationResources_es.properties === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- ApplicationResources_es.properties29 Apr 2002 01:07:53 - 1.41 +++ ApplicationResources_es.properties30 Apr 2002 18:10:47 - 1.42 @@ -130,6 +130,8 @@ host.wars=Desempaquetar WARs host.aliases=Aliases host.alias.name=Alias Nombre +error.aliasName.exists=liAlias ya existe/li +error.aliasName.required=liAlias nombre requiredo/li context.properties=Propiedades del contexto context.cookies=Cookies context.cross.context=Cross Context 1.6 +5 -5 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java Index: AddConnectorAction.java === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AddConnectorAction.java 26 Apr 2002 19:05:12 - 1.5 +++ AddConnectorAction.java 30 Apr 2002 18:10:47 - 1.6 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java,v 1.5 2002/04/26 19:05:12 manveen Exp $ - * $Revision: 1.5 $ - * $Date: 2002/04/26 19:05:12 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java,v 1.6 2002/04/30 18:10:47 manveen Exp $ + * $Revision: 1.6 $ + * $Date: 2002/04/30 18:10:47 $ * * * @@ -82,7 +82,7 @@ * The codeAction/code that sets up emAdd Connector/em transactions. * * @author Manveen Kaur - * @version $Revision: 1.5 $ $Date: 2002/04/26 19:05:12 $ + * @version $Revision: 1.6 $ $Date: 2002/04/30 18:10:47 $ */ public class AddConnectorAction extends Action { @@ -169,7 +169,7 @@ String schemeTypes[]= new String[3]; schemeTypes[0] = HTTP; schemeTypes[1] = HTTPS; -schemeTypes[2] = HTTP(AJP); +schemeTypes[2] = AJP; ArrayList types = new ArrayList(); // the first element in the select list should be the type selected 1.6 +13 -11 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java Index: SaveConnectorAction.java === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- SaveConnectorAction.java 26 Apr 2002 07:11:02 - 1.5 +++ SaveConnectorAction.java 30 Apr 2002 18:10:47 - 1.6 @@ -1,7 +1,7 @@ /* - * $Header:
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans ConnectorMBean.java mbeans-descriptors.xml
amyroh 02/04/30 11:24:08 Modified:catalina/src/share/org/apache/catalina/mbeans ConnectorMBean.java mbeans-descriptors.xml Log: Add protocolHandlerClassName so the admin can tell AJP connector. Minor package error fix. Revision ChangesPath 1.2 +4 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java Index: ConnectorMBean.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ConnectorMBean.java 30 Apr 2002 17:47:26 - 1.1 +++ ConnectorMBean.java 30 Apr 2002 18:24:08 - 1.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java,v 1.1 2002/04/30 17:47:26 amyroh Exp $ - * $Revision: 1.1 $ - * $Date: 2002/04/30 17:47:26 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java,v 1.2 2002/04/30 18:24:08 amyroh Exp $ + * $Revision: 1.2 $ + * $Date: 2002/04/30 18:24:08 $ * * * @@ -61,7 +61,7 @@ * */ -package catalina.src.share.org.apache.catalina.mbeans; +package org.apache.catalina.mbeans; import java.lang.reflect.Method; import javax.management.MBeanException; @@ -76,7 +76,7 @@ * codeorg.apache.coyote.tomcat4.CoyoteConnector/code component./p * * @author Amy Roh - * @version $Revision: 1.1 $ $Date: 2002/04/30 17:47:26 $ + * @version $Revision: 1.2 $ $Date: 2002/04/30 18:24:08 $ */ public class ConnectorMBean extends BaseModelMBean { 1.52 +5 -0 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- mbeans-descriptors.xml30 Apr 2002 17:47:26 - 1.51 +++ mbeans-descriptors.xml30 Apr 2002 18:24:08 - 1.52 @@ -6,7 +6,7 @@ !-- Descriptions of JMX MBeans for Catalina - $Id: mbeans-descriptors.xml,v 1.51 2002/04/30 17:47:26 amyroh Exp $ + $Id: mbeans-descriptors.xml,v 1.52 2002/04/30 18:24:08 amyroh Exp $ -- mbeans-descriptors @@ -192,6 +192,11 @@ attribute name=port description=The port number on which we listen for ajp13 requests type=int/ + +attribute name=protocolHandlerClassName + description=Coyote Protocol handler class name + type=java.lang.String +writeable=false/ attribute name=proxyName description=Ther Server name to which we should pretend requests to this Connector -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
embedded tomcat and JspServlet
I've written an Embedded tomcat (4.0.3) that reads in the standard ${catalina.home}/conf/web.xml. Servlets and .war files work fine. However, when I try to fetch a jsp page, the result comes back with several stack traces to the effect of not being able to find the javax.servlet package and classes. The catalina log contains: jsp: init Internal Error: File /WEB-INF/web.xml not found. Any notions? Thanks, Rich -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 5853] - Unable to get request parameters in the Error page for form based login
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5853. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5853 Unable to get request parameters in the Error page for form based login [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||WONTFIX --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 18:31 --- It was marked WONTFIX because any change along these lines would be nonportable to any other container. Form based login was designed (and specified in the Servlet Spec) in a manner that emulates the user experience of using BASIC authentication: * You request a protected resource * A dialog box pops up asking you for the username and password * (If you type them wrong, the box is redisplayed with an error message) * When you are successfully authenticated, your *original* request is executed unchanged. The only difference with form-based login is that you get to define the UI of the login and error pages. In neither of those pages do you have *any* access to any aspect of the original request that triggered authentication. The server has cached that away so that it can be replayed once you are successfully authenticated (in BASIC it's actually the browser that does this, but the user experience is identical). If that is not sufficient for your requirements, you should use some technique other than form based login for your app. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8674] New: - examples fail due to missing util.HTMLFilter class
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8674. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8674 examples fail due to missing util.HTMLFilter class Summary: examples fail due to missing util.HTMLFilter class Product: Tomcat 4 Version: Nightly Build Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Webapps:Examples AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The jakarta-tomcat-4.0 build from CVS is failing because the webapps/examples are failing to build. There is a reference to an HTMLFilter class in several classes, but this class doesn't appear to be defined anywhere. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8674] - examples fail due to missing util.HTMLFilter class
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8674. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8674 examples fail due to missing util.HTMLFilter class [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 18:47 --- It's there. Check out again the repository. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8674] - examples fail due to missing util.HTMLFilter class
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8674. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8674 examples fail due to missing util.HTMLFilter class --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 18:52 --- I've done cvs update on jakarta-tomcat-4.0 three times after I noticed this. Either it's in some other repository that isn't obvious to me, or it really isn't there, or I'm doing something wrong. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8675] New: - Unable to get Request Querystring parameters using getParameter( )
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8675. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8675 Unable to get Request Querystring parameters using getParameter( ) Summary: Unable to get Request Querystring parameters using getParameter( ) Product: Tomcat 4 Version: 4.0.3 Final Platform: Other OS/Version: Linux Status: NEW Severity: Major Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Using Tomcat 4.0.3: while executing a JSP page requesting parameters from the URL: request.getParameter() returns null but request.getQueryString() returns the correct query string. When started, our server performs the above instructions correctly for a while, but then ends up in a situation where these instructions fail. Once the server get's into this state, it affects all jsp pages simultaneously. The only way to take the server out of this state is by restarting (clearing the work directory does not help). Restarting once may not always be enough. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8674] - examples fail due to missing util.HTMLFilter class
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8674. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8674 examples fail due to missing util.HTMLFilter class --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 18:54 --- Bugzilla is not the right place to ask for help with using CVS. Use cvs update -d. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8675] - Unable to get Request Querystring parameters using getParameter( )
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8675. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8675 Unable to get Request Querystring parameters using getParameter( ) --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 18:58 --- Versions Linux : 2.2.16-22 #1, JVM : Classic VM (J2RE 1.2.2 IBM build cx122-20001026 (JIT enabled: jitc)) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8675] - Unable to get Request Querystring parameters using getParameter( )
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8675. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8675 Unable to get Request Querystring parameters using getParameter( ) --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 18:58 --- I have no idea what could cause this, but Coyote is likely to fix it. Try beta 8. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 5853] - Unable to get request parameters in the Error page for form based login
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5853. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5853 Unable to get request parameters in the Error page for form based login --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 19:00 --- Thanks for clarifying - I was confusing this specific issue, with our more generic querystring problem - re-entered as bug # 8675 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8675 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: embedded tomcat and JspServlet
Richard Unger wrote: jsp: init Internal Error: File /WEB-INF/web.xml not found. I believe this particular error message is generated (by o.a.j.compiler.TldLocationsCache.processWebDotXml) when initializing the default context (which doesn't have a WEB-INF/web.xml). I don't think this causes any problems (nor is it the source of your error) and the message should probably be suppressed. Arvind -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [4.1.0] Anyone testing it ?
i've done some minimal testing. i see the following exception a lot, but that's about it: ServerLifecycleListener: processContainerAddChild: MBeanException java.lang.Exception: ManagedBean is not found with NonLoginAuthenticator at org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:654) at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:361) at org.apache.catalina.mbeans.ServerLifecycleListener.processContainerAddChild(ServerLifecycleListener.java:820) at org.apache.catalina.mbeans.ServerLifecycleListener.containerEvent(ServerLifecycleListener.java:148) at org.apache.catalina.core.ContainerBase.fireContainerEvent(ContainerBase.java:1394) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:829) at org.apache.catalina.core.ContainerBase.access$0(ContainerBase.java:811) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:182) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:571) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:765) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:410) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:872) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1194) at org.apache.catalina.core.StandardHost.start(StandardHost.java:731) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1186) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:339) at org.apache.catalina.core.StandardService.start(StandardService.java:496) at org.apache.catalina.core.StandardServer.start(StandardServer.java:699) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:219) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:279) -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 4:50 AM To: Tomcat Developers List Subject: [4.1.0] Anyone testing it ? Is anyone testing 4.1.0 ? The URL as a reminder: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.0/ Obviously, I expect people voting to rate the build to have tried it ;-) Of particular interest is testing: - AJP 1.3 support - To see if bug 5735 is fixed with the current Coyote connector - Jasper 2 Thanks, Remy -- 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: [4.1.0] Anyone testing it ?
i've done some minimal testing. i see the following exception a lot, but that's about it: The JMX stuff doesn't like you having a custom component defined in your server.xml (you do have one, right ?). So the exception you see indicates the JMX features, including the admin webapp, won't work. If you don't want to see it, you can disable the JMX features by removing the following listener from the server.xml: Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [4.1.0] Anyone testing it ?
i've done some minimal testing. i see the following exception a lot, but that's about it: The JMX stuff doesn't like you having a custom component defined in your server.xml (you do have one, right ?). So the exception you see indicates the JMX features, including the admin webapp, won't work. If you don't want to see it, you can disable the JMX features by removing the following listener from the server.xml: Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Remy what constitutes a custom component? i didn't add anything to server.xml, just uncommented some things and commented out some other things... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [4.1.0] Anyone testing it ?
what constitutes a custom component? i didn't add anything to server.xml, just uncommented some things and commented out some other things... After checking, that valve should be skipped, so this is a bug. You should disable the JMX listener I mentioned in the meantime if you want to do some additional testing. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteConnector.java
remm02/04/30 13:27:37 Modified:coyote/src/java/org/apache/coyote/tomcat4 CoyoteConnector.java Log: - Only start the endpoint in start, to avoid processing requests using a non fully initialized pipeline. Revision ChangesPath 1.12 +12 -12 jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java Index: CoyoteConnector.java === RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- CoyoteConnector.java 26 Apr 2002 20:13:36 - 1.11 +++ CoyoteConnector.java 30 Apr 2002 20:27:37 - 1.12 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v 1.11 2002/04/26 20:13:36 remm Exp $ - * $Revision: 1.11 $ - * $Date: 2002/04/26 20:13:36 $ + * $Header: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v 1.12 2002/04/30 20:27:37 remm Exp $ + * $Revision: 1.12 $ + * $Date: 2002/04/30 20:27:37 $ * * * @@ -112,7 +112,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.11 $ $Date: 2002/04/26 20:13:36 $ + * @version $Revision: 1.12 $ $Date: 2002/04/30 20:27:37 $ */ @@ -991,14 +991,6 @@ + false); } -try { -protocolHandler.init(); -} catch (Exception e) { -throw new LifecycleException -(sm.getString - (coyoteConnector.protocolHandlerInitializationFailed, e)); -} - } @@ -1015,6 +1007,14 @@ (sm.getString(coyoteConnector.alreadyStarted)); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; + +try { +protocolHandler.init(); +} catch (Exception e) { +throw new LifecycleException +(sm.getString + (coyoteConnector.protocolHandlerInitializationFailed, e)); +} } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [4.1.0] Anyone testing it ?
I'll add a MBean for NonLoginAuthenticator. It sholdn't throw exception then. Pls let me know if any other component is missing MBean and throwing exception. I missed that one since it wasn't part of default Catalina start. Amy Kevin Seguin wrote: i've done some minimal testing. i see the following exception a lot, but that's about it: ServerLifecycleListener: processContainerAddChild: MBeanException java.lang.Exception: ManagedBean is not found with NonLoginAuthenticator at org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:654) at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:361) at org.apache.catalina.mbeans.ServerLifecycleListener.processContainerAddChild(ServerLifecycleListener.java:820) at org.apache.catalina.mbeans.ServerLifecycleListener.containerEvent(ServerLifecycleListener.java:148) at org.apache.catalina.core.ContainerBase.fireContainerEvent(ContainerBase.java:1394) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:829) at org.apache.catalina.core.ContainerBase.access$0(ContainerBase.java:811) at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:182) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:571) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:765) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:410) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:872) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1194) at org.apache.catalina.core.StandardHost.start(StandardHost.java:731) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1186) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:339) at org.apache.catalina.core.StandardService.start(StandardService.java:496) at org.apache.catalina.core.StandardServer.start(StandardServer.java:699) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:219) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:279) -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 4:50 AM To: Tomcat Developers List Subject: [4.1.0] Anyone testing it ? Is anyone testing 4.1.0 ? The URL as a reminder: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.0/ Obviously, I expect people voting to rate the build to have tried it ;-) Of particular interest is testing: - AJP 1.3 support - To see if bug 5735 is fixed with the current Coyote connector - Jasper 2 Thanks, Remy -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8024] - Can't include entities in web.xml
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8024. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8024 Can't include entities in web.xml --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 21:00 --- (Is there an easy way to tell exactly what changes went into a fix for a bug? I don't see any way to do that, unless the fix comment informally states what was changed.) As I've built tomcat-4.0 from the latest CVS, I would expect I'm getting the required fix for this. Unfortunately, it appears to have had no effect. When I precompile my JSP pages, it still complains about the file reference. If I use this: !ENTITY webinc PUBLIC webinc file:./webinc.xml I get: XML parsing error on file /WEB-INF/web.xml: java.io.FileNotFoundException: .\webinc.xml (The system cannot find the file specified) I I use this: XML parsing error on file /WEB-INF/web.xml: (line 6, col -1): Relative URI webinc.xml; can not be resolved without a base URI. I've also tried ./webinc.xml and file:webinc.xml, but both give the previous error. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardContext.java
remm02/04/30 14:13:37 Modified:catalina/src/share/org/apache/catalina/core StandardContext.java Log: - Prevent reloading when context is not started. Revision ChangesPath 1.105 +9 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java Index: StandardContext.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v retrieving revision 1.104 retrieving revision 1.105 diff -u -r1.104 -r1.105 --- StandardContext.java 13 Apr 2002 12:36:34 - 1.104 +++ StandardContext.java 30 Apr 2002 21:13:37 - 1.105 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.104 2002/04/13 12:36:34 remm Exp $ - * $Revision: 1.104 $ - * $Date: 2002/04/13 12:36:34 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.105 2002/04/30 21:13:37 remm Exp $ + * $Revision: 1.105 $ + * $Date: 2002/04/30 21:13:37 $ * * * @@ -147,7 +147,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.104 $ $Date: 2002/04/13 12:36:34 $ + * @version $Revision: 1.105 $ $Date: 2002/04/30 21:13:37 $ */ public class StandardContext @@ -2364,6 +2364,11 @@ * property is set to codefalse/code. */ public synchronized void reload() { + +// Validate our current component state +if (!started) +throw new IllegalStateException +(sm.getString(containerBase.notStarted, logName())); // Make sure reloading is enabled // if (!reloadable) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector ConnectorForm.java EditConnectorAction.java SaveConnectorAction.java
manveen 02/04/30 14:38:20 Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector ConnectorForm.java EditConnectorAction.java SaveConnectorAction.java Log: Integrating with new mBean create operations. Revision ChangesPath 1.10 +6 -6 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java Index: ConnectorForm.java === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ConnectorForm.java26 Apr 2002 07:11:01 - 1.9 +++ ConnectorForm.java30 Apr 2002 21:38:20 - 1.10 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java,v 1.9 2002/04/26 07:11:01 manveen Exp $ - * $Revision: 1.9 $ - * $Date: 2002/04/26 07:11:01 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java,v 1.10 2002/04/30 21:38:20 manveen Exp $ + * $Revision: 1.10 $ + * $Date: 2002/04/30 21:38:20 $ * * * @@ -74,7 +74,7 @@ * Form bean for the connector page. * * @author Manveen Kaur - * @version $Revision: 1.9 $ $Date: 2002/04/26 07:11:01 $ + * @version $Revision: 1.10 $ $Date: 2002/04/30 21:38:20 $ */ public final class ConnectorForm extends ActionForm { @@ -459,7 +459,7 @@ } - /** +/** * Return the object name of the service this connector belongs to. */ public String getKeyStoreFileName() { @@ -777,7 +777,7 @@ } /* supported only by Coyote HTTP/1.1 connectors */ -if (!(HTTP(AJP).equalsIgnoreCase(connectorType))) +if (!(AJP.equalsIgnoreCase(connectorType))) numberCheck(proxyPortText, proxyPortText, true, 0, 65535); } 1.5 +22 -16 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java Index: EditConnectorAction.java === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- EditConnectorAction.java 26 Apr 2002 07:04:14 - 1.4 +++ EditConnectorAction.java 30 Apr 2002 21:38:20 - 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java,v 1.4 2002/04/26 07:04:14 manveen Exp $ - * $Revision: 1.4 $ - * $Date: 2002/04/26 07:04:14 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java,v 1.5 2002/04/30 21:38:20 manveen Exp $ + * $Revision: 1.5 $ + * $Date: 2002/04/30 21:38:20 $ * * * @@ -91,7 +91,7 @@ * The codeAction/code that sets up emEdit Connector/em transactions. * * @author Manveen Kaur - * @version $Revision: 1.4 $ $Date: 2002/04/26 07:04:14 $ + * @version $Revision: 1.5 $ $Date: 2002/04/30 21:38:20 $ */ public class EditConnectorAction extends Action { @@ -173,22 +173,29 @@ connectorFm.setDebugLvlVals(Lists.getDebugLevels()); connectorFm.setBooleanVals(Lists.getBooleanValues()); -String scheme = null; String attribute = null; try { // Copy scalar properties // General properties -attribute = className; -String className = +attribute = scheme; +String scheme = (String) mBServer.getAttribute(cname, attribute); +connectorFm.setScheme(scheme); + +attribute = protocolHandlerClassName; +String handlerClassName = (String) mBServer.getAttribute(cname, attribute); -int period = className.lastIndexOf('.'); -String connectorType = className.substring(period + 1); +int period = handlerClassName.lastIndexOf('.'); +String connType = handlerClassName.substring(period + 1); +String connectorType = HTTPS; +if (JkCoyoteHandler.equalsIgnoreCase(connType)) { +connectorType = AJP; +} else if
Re: cvs commit:jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/coreStandardContext.java
on 4/30/02 2:13 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: +if (!started) +throw new IllegalStateException +(sm.getString(containerBase.notStarted, logName())); It drives me nuts that you guys don't even follow the Sun coding spec's. http://java.sun.com/docs/codeconv/html/CodeConventions.doc6.html#449 -jon -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml
amyroh 02/04/30 15:14:08 Modified:catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml Log: Add NonLoginAuthenticator MBean to mbeans-descriptors. Revision ChangesPath 1.53 +36 -1 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- mbeans-descriptors.xml30 Apr 2002 18:24:08 - 1.52 +++ mbeans-descriptors.xml30 Apr 2002 22:14:08 - 1.53 @@ -6,7 +6,7 @@ !-- Descriptions of JMX MBeans for Catalina - $Id: mbeans-descriptors.xml,v 1.52 2002/04/30 18:24:08 amyroh Exp $ + $Id: mbeans-descriptors.xml,v 1.53 2002/04/30 22:14:08 amyroh Exp $ -- mbeans-descriptors @@ -1375,6 +1375,41 @@ description=The comma-delimited set of deny expressions type=java.lang.String/ + /mbean + + + mbean name=NonLoginAuthenticator +className=org.apache.catalina.mbeans.ClassNameMBean + description=An Authenticator and Valve implementation that checks + only security constraints not involving user authentication + domain=Catalina +group=Valve + type=org.apache.catalina.authenticator.NonLoginAuthenticator + +attribute name=algorithm + description=The message digest algorithm to be used when generating +session identifiers + type=java.lang.String/ + +attribute name=cache + description=Should we cache authenticated Principals if the request +is part of an HTTP session? + type=boolean/ + +attribute name=className + description=Fully qualified class name of the managed object + type=java.lang.String +writeable=false/ + +attribute name=debug + description=The debugging detail level for this component + type=int/ + +attribute name=entropy + description=A String initialization parameter used to increase the +entropy of the initialization of our random number +generator + type=java.lang.String/ /mbean -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/ROOT index.jsp
remm02/04/30 15:17:49 Modified:webapps/ROOT index.jsp Log: - Add a link to the Tomcat admin webapp. Revision ChangesPath 1.3 +14 -0 jakarta-tomcat-4.0/webapps/ROOT/index.jsp Index: index.jsp === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/ROOT/index.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- index.jsp 25 Apr 2002 14:14:29 - 1.2 +++ index.jsp 30 Apr 2002 22:17:49 - 1.3 @@ -76,6 +76,20 @@ table width=100% border=1 cellspacing=0 cellpadding=3 bordercolor=#00 tr td bgcolor=#D2A41C bordercolor=#00 align=left nowrap +font face=Verdana size=+1iAdministration/inbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/font +/td +/tr +tr +td bgcolor=#FFDC75 bordercolor=#00 nowrap +a href=adminTomcat Administration/abr +nbsp; +/td +/tr +/table +br +table width=100% border=1 cellspacing=0 cellpadding=3 bordercolor=#00 +tr +td bgcolor=#D2A41C bordercolor=#00 align=left nowrap font face=Verdana size=+1iDocumentation/inbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/font /td /tr -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 8645] - Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8645 Microsoft Services for UNIX v2.0 nfs server has a corrupt last modification date --- Additional Comments From [EMAIL PROTECTED] 2002-04-30 22:23 --- I guess we are off scope, but I don't think it matters - we're trying to resolve you problem, right? First, the real reason why I don't like the patch. A quick search through Tomcat sources reveals that the method lastModified() gets called in a number of different places, from different code and always relies on the fact that the timestamp of the file has changed (correctly). So, you would potentially be fixing a lot more instances. And then there is of course Ant, Velocity and other Jakarta software that would have to do the same to satisfy a buggy piece of software. Sometimes that's the only option (for instance a buggy ZIP implementation in JDK, screwing class reloads from .jar files) since it is core part of the system and cannot be avoided. But this scenario isn't one of those things (although I appreciate that it is important to you). In solution to your problem, why not have the home directories on a Linux box - then you can have a decent SMB and NFS on the same machine. I have searched the web for smbfs + autofs and even found a HOWTO. I agree when you say that it is an unproven concept, but so is Microsoft NFS. Bojan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml
amyroh 02/04/30 15:46:08 Modified:catalina/src/share/org/apache/catalina/mbeans mbeans-descriptors.xml Log: Fix proxyPort type to int. Revision ChangesPath 1.54 +1 -1 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Index: mbeans-descriptors.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- mbeans-descriptors.xml30 Apr 2002 22:14:08 - 1.53 +++ mbeans-descriptors.xml30 Apr 2002 22:46:07 - 1.54 @@ -6,7 +6,7 @@ !-- Descriptions of JMX MBeans for Catalina - $Id: mbeans-descriptors.xml,v 1.53 2002/04/30 22:14:08 amyroh Exp $ + $Id: mbeans-descriptors.xml,v 1.54 2002/04/30 22:46:07 amyroh Exp $ -- mbeans-descriptors @@ -204,7 +204,7 @@ attribute name=proxyPort description=Ther Server port to which we should pretend requests to this Connector - type=java.lang.String/ + type=int/ attribute name=redirectPort description=The redirect port for non-SSL to SSL redirects -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
mod_webapp build problem
Hi, I'm trying to build a rpm for mod_webapp against apache 1.3.23-mod_ssl and apache 2.0.35 on a redhat 7.2 box apache-2.0 failed : See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. -- /etc/httpd2/build/libtool --silent --mode=finish \ /usr/src/redhat/BUILD/mod_webapp-1.0/jakarta-tomcat-connectors-4.0.4-b2-src/webapp/lib make[2]: Leaving directory `/usr/src/redhat/BUILD/mod_webapp-1.0/jakarta-tomcat-connectors-4.0.4-b2-src/webapp/lib' make[1]: Exiting directory lib make[1]: Leaving directory `/usr/src/redhat/BUILD/mod_webapp-1.0/jakarta-tomcat-connectors-4.0.4-b2-src/webapp' make[1]: Entering directory `/usr/src/redhat/BUILD/mod_webapp-1.0/jakarta-tomcat-connectors-4.0.4-b2-src/webapp' make[1]: Entering directory apache-2.0 make[1]: Invoking make build make[2]: Entering directory `/usr/src/redhat/BUILD/mod_webapp-1.0/jakarta-tomcat-connectors-4.0.4-b2-src/webapp/apache-2.0' Compiling and Linking Apache 2.0 WebApp Module /usr/sbin/apxs2 -I../include -c -L ../lib -lwebapp mod_webapp.c /etc/httpd2/build/libtool --silent --mode=compile gcc -O2 -march=i386 -mcpu=i686 -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -pthread -DNO_DBM_REWRITEMAP -I/usr/include/apache2 -I../include -c -o mod_webapp.lo mod_webapp.c touch mod_webapp.slo mod_webapp.c: In function `wam_invoke': mod_webapp.c:482: warning: initialization discards qualifiers from pointer target type /etc/httpd2/build/libtool --silent --mode=link gcc -o mod_webapp.la -rpath /usr/lib/apache2 -module -avoid-version -I../include -L../lib -lwebapp mod_webapp.lo *** Warning: This library needs some functionality provided by -lwebapp. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** Warning: libtool could not satisfy all declared inter-library *** dependencies of module mod_webapp. Therefore, libtool will create *** a static module, that should work as long as the dlopening *** application is linked with the -dlopen flag. make[2]: Leaving directory `/usr/src/redhat/BUILD/mod_webapp-1.0/jakarta-tomcat-connectors-4.0.4-b2-src/webapp/apache-2.0' make[1]: Exiting directory apache-2.0 make[1]: Leaving directory `/usr/src/redhat/BUILD/mod_webapp-1.0/jakarta-tomcat-connectors-4.0.4-b2-src/webapp' my libtool is not too old. libtool --version ltmain.sh (GNU libtool) 1.4 (1.920 2001/04/24 23:26:18) apache 1.3 works : with APR source from Apache 2.0.35 copy What's that libtool problem ? - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [4.1.0] Anyone testing it ?
I'm trying to make a rpm for it but I'm stuck with chicken-eggs problems between TC 4.1.0 and JTC (ditto for latest TC 4.0.4 and JTC). To follow rpm policies I should avoid using pre-built binaries (like commons-logging, coyote, http11). And coyote/http11/jk need tomcat 4 to be built ! I'll have to try some kind of bootstrap action in my rpm, start compiling TC 4.x with binaries, then goes to JTC and rebuild it against newly built TC 4.x, then install these in place of bundled binaries ?(8 - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 11:50 AM To: Tomcat Developers List Subject: [4.1.0] Anyone testing it ? Is anyone testing 4.1.0 ? The URL as a reminder: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/test/v4.1.0/ Obviously, I expect people voting to rate the build to have tried it ;-) Of particular interest is testing: - AJP 1.3 support - To see if bug 5735 is fixed with the current Coyote connector - Jasper 2 Thanks, Remy -- 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: mod_webapp build problem
GOMEZ Henri [EMAIL PROTECTED] wrote: Hi, I'm trying to build a rpm for mod_webapp against apache 1.3.23-mod_ssl and apache 2.0.35 on a redhat 7.2 box apache-2.0 failed : Working on it Henri... I have a whole new kit that I'm going to commit pretty soon, once it's done... Here's a short-hand patch from my machine, I'm breaking few bits and pieces (so right now the 2.0 doesn't even try to compile), but I'm getting a hold on the beast... Pier -- I think that it's extremely foolish to name a server after the current U.S. President. B.W. Fitzpatrick webapp-buildpatch.txt Description: Binary data -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]