RE: System hangs after 2-3 hours of use
I had (on linux rh 6 and 7). What's the exact problem with mod_jk and ajp12 ? Couldn't you switch to tomcat 3.2.3 and ajp13 ? Exactly the same configuration here in dev and prod. Redhat 6.x, TC 3.2.3/3.3 and mod_jk / ajp13 Never go any problems then we have to switch to ajp13 (not in a rush though, mod_jserv is working fine now) Never thought about that option actually. We used the default ajp (in our case indeed ajp12) which was with the distribution. (from the conf-auto). Let's say our experience was horrible with it ;-) I can remember a big discussion on tomcat-user however with a lot of people having the same problems (I unsubscribed at a certain moment, so I lost if it ever got fixed). Problems with ajp13 ? It's the reference today and all the effort are against mod_jk/ajp13 duo. I don't see bugs using ajp13. They could have had the same bug.. So it was safer to swith back to mod_jserv.. What happens after a certain amount of time is that libhttpd.ep is at 50% (times 4, we have 2 cpu's in the production server..). It still served requests, but It was like having my Sinclair ZX 81 running windows NT -(( (that is really bad..). It never crashed when people were using the shops created with our toolkit (just a little session stuff), but happened when people were changing or creating shops (my guess is the upload forms that would mess up the system..). What's libhttpd.ep ? Don't you said you're running Linux Redhat ? In that case process name is httpd. part of the pstree (also looks like that with mod_jk ajp12. |-libhttpd.ep---10*[libhttpd.ep] Maby someone made a strange build of httpd, don't see the libhttpd.ep on my machine (apache 1.3.20) Searched for some old mod_jk errors and here they are some entries.. : [jk_ajp12_worker.c (596)]: ajpv12_handle_response, error writing back to server (and then a lot of times..) and some of these : [jk_ajp12_worker.c (463)]: In ajpv12_handle_request, failed to write to the cont ainer [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = 6 Did you restart tomcat at some time ? As much as possible, but since it is hosting a lot of sites, it is not always possible. If you want I can zip up our logfile and send it to your private mail ;-)) Yes you could but ajp12 IS CLEARLY DEPRECATED today. Only used to shutdown Tomcat. Maby a note on the jakarta site to say that it is absolutely adviced to switch to ajp13,because of some bugs ;-). If you have no intention to fix the ajp12, sending the zip file is not much of use I think. If I have the problem om ajp13, I will notify you right away ;-) Mvgr, Martin van den Bemt
RE: System hangs after 2-3 hours of use
Exactly the same configuration here in dev and prod. Redhat 6.x, TC 3.2.3/3.3 and mod_jk / ajp13 Never go any problems then we have to switch to ajp13 (not in a rush though, mod_jserv is working fine now) Yep the old duo. They could have had the same bug.. So it was safer to swith back to mod_jserv.. If you encounter mod_jk/ajp13 bug, we'll try to fix it. Just make sure to use the latest Tomcat 3.2.3. What's libhttpd.ep ? Don't you said you're running Linux Redhat ? In that case process name is httpd. part of the pstree (also looks like that with mod_jk ajp12. |-libhttpd.ep---10*[libhttpd.ep] Maby someone made a strange build of httpd, don't see the libhttpd.ep on my machine (apache 1.3.20) Strange built should investigated as usually with DSO modules If you want I can zip up our logfile and send it to your private mail ;-)) Yes you could but ajp12 IS CLEARLY DEPRECATED today. Only used to shutdown Tomcat. Maby a note on the jakarta site to say that it is absolutely adviced to switch to ajp13,because of some bugs ;-). It's not absolutely adviced to switch to ajp13, but if mod_jserv/ajp12 was a stable configuration, mod_jk is better suited for ajp13 that ajp12. Just because mod_jk was really designed to use persistant connections like ajp13 and more effort was done on mod_jk with ajp13. If you have no intention to fix the ajp12, sending the zip file is not much of use I think. There is other person on the list which could help you since still using ajp12. You're right, I prefer spend time to fix ajp13 and start ajp14 rather than fixing a deprecated protocol like ajp12 which is clearly slower, didn't support SSL, more consuming in I/O bandwidth If I have the problem om ajp13, I will notify you right away ;-) And I'll fix it
Re: Problem with mod_jk 1.2.0 (latest CVS snapshot)
GOMEZ Henri wrote: Good information, and could send us a strace ? This may sound strange to all you Apache experts, but how do I do that? How do I run strace on a detached process? strace httpd -f (follow forks) Thanks for the tip. The log file (bziped) is attached. Bojan strace.log.bz2
Re: Problem with mod_jk 1.2.0 (latest CVS snapshot)
Bojan Smojver wrote: GOMEZ Henri wrote: Good information, and could send us a strace ? This may sound strange to all you Apache experts, but how do I do that? How do I run strace on a detached process? strace httpd -f (follow forks) Thanks for the tip. The log file (bziped) is attached. Bojan Name: strace.log.bz2 strace.log.bz2Type: unspecified type (application/octet-stream) Encoding: base64 +++ 15329 ... rt_sigaction resumed {0x814df6c, [], SA_INTERRUPT|0x400}, 8) = 015329 getsockname(8, {sin_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr(10.0.0.20)}}, [16]) = 0 15329 setsockopt(8, IPPROTO_TCP1, [1], 4) = 0 15329 brk(0x8347000)= 0x8347000 15329 brk(0x834a000)= 0x834a000 15329 read(8, GET /about.html HTTP/1.0\r\nIf-Mod..., 4096) = 436 15329 rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}, 8) = 0 15329 time(NULL)= 995959824 15329 gettimeofday({995959824, 346428}, NULL) = 0 15329 --- SIGSEGV (Segmentation fault) --- 15329 chdir(/etc/httpd) = 0 15329 rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0 15329 getpid() = 15329 15329 kill(15329, SIGSEGV) = 0 15329 sigreturn() = ? (mask now []) 15329 --- SIGSEGV (Segmentation fault) --- +++ That the core?
Re: Problem with mod_jk 1.2.0 (latest CVS snapshot)
jean-frederic clere wrote: Bojan Smojver wrote: GOMEZ Henri wrote: Good information, and could send us a strace ? This may sound strange to all you Apache experts, but how do I do that? How do I run strace on a detached process? strace httpd -f (follow forks) Thanks for the tip. The log file (bziped) is attached. Bojan Name: strace.log.bz2 strace.log.bz2Type: unspecified type (application/octet-stream) Encoding: base64 +++ 15329 ... rt_sigaction resumed {0x814df6c, [], SA_INTERRUPT|0x400}, 8) = 015329 getsockname(8, {sin_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr(10.0.0.20)}}, [16]) = 0 15329 setsockopt(8, IPPROTO_TCP1, [1], 4) = 0 15329 brk(0x8347000)= 0x8347000 15329 brk(0x834a000)= 0x834a000 15329 read(8, GET /about.html HTTP/1.0\r\nIf-Mod..., 4096) = 436 15329 rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}, 8) = 0 15329 time(NULL)= 995959824 15329 gettimeofday({995959824, 346428}, NULL) = 0 15329 --- SIGSEGV (Segmentation fault) --- 15329 chdir(/etc/httpd) = 0 15329 rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0 15329 getpid() = 15329 15329 kill(15329, SIGSEGV) = 0 15329 sigreturn() = ? (mask now []) 15329 --- SIGSEGV (Segmentation fault) --- +++ That the core? Don't quite follow (my C debugging skills are so rusty you can call them non-existent)... Bojan
tomcat download
Iam unable 2 download the binaries source code of tomcat Can anyone help me When I click on the link from where I've to download it gives retry window adinfinitum Thanx _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Problem with mod_jk 1.2.0 (latest CVS snapshot)
Good information, and could send us a strace ? This may sound strange to all you Apache experts, but how do I do that? How do I run strace on a detached process? strace httpd -f (follow forks) Thanks for the tip. The log file (bziped) is attached. I didn't locate the core !
Cookieless session management by URL rewritting
Is there any way to configure Tomcat 3.2.2 so that it automatically rewrites URLs by adding Session ID (SID) on them? I'm using Oracle XSQL Servlet, Apache 1.3.20 with mod_jk as NT service on Windows 2000 Server. I can't use encodeURL because I develop no servlets. One solution could be a RequestInterceptor class with noCookies attribute set to "true".
RE: Cookieless session management by URL rewritting
I don't know any "automatic" approach. How can Tomcat know which URL is supposed to rewrite? It has no knowledge of the format of the response. If you need to modify the response, at least you need access to HttpServletResponse. If I understand right, RequestInterceptor with noCookies only means that response.encodeURL() will not use cookie, the rewriting URL is the only option when it's called. Li -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 12:03 PM To: '[EMAIL PROTECTED]' Subject: Cookieless session management by URL rewritting Is there any way to configure Tomcat 3.2.2 so that it automatically rewrites URLs by adding Session ID (SID) on them? I'm using Oracle XSQL Servlet, Apache 1.3.20 with mod_jk as NT service on Windows 2000 Server. I can't use encodeURL because I develop no servlets. One solution could be a RequestInterceptor class with noCookies attribute set to "true".
Error when createing tomcat from source
Hi when I try to compile tomcat from source I get a NoClassDefFoundException for org.apache.tomcat.util.xml.ObjectCreate. Looking in the Source of XmlMapper there is an inner class defined called ObjectCreate - but no public class ObjectCreate which should recide in an own File called ObjectCreate.java. Looking at the binary distribution I find a class ObjectCreate in the jar archive - so for me there are two possibillities what happened: - some java compiler will generate an ObjectCreate class from the inner class definition which from my opinion is against the java specifications - perhaps you have forgotten to distribute an own java file for this ObjectCreate class. Could you please tell me if I am using a wrong compiler or if there is missing a source file. Yours sincerely Torsten Glunde
Separating Service code from Tomcat 4.0
Since it can be used by different projects (not only Tomcat), I wanted to separate the Service code into a new CVS repository (jakarta-service). How about it? Pier
Re: Separating Service code from Tomcat 4.0
On Tue, 24 Jul 2001, Pier P. Fumagalli wrote: Since it can be used by different projects (not only Tomcat), I wanted to separate the Service code into a new CVS repository (jakarta-service). How about it? Under the management of which subproject? How about putting it in commons, if it's really as general purpose as it sounds? Pier Craig
Re: Separating Service code from Tomcat 4.0
Pier P. Fumagalli wrote: Since it can be used by different projects (not only Tomcat), I wanted to separate the Service code into a new CVS repository (jakarta-service). How about it? +1 Pier
cvs commit: jakarta-tomcat-connectors/jk/native README.configure
jfclere 01/07/24 09:38:44 Modified:jk/native README.configure Log: Add a line to tell to configure apache before configuring mod_jk, otherwise the file ap_config.h is not found by the configure of mod_jk. Revision ChangesPath 1.7 +1 -0 jakarta-tomcat-connectors/jk/native/README.configure Index: README.configure === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/README.configure,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- README.configure 2001/07/23 08:59:30 1.6 +++ README.configure 2001/07/24 16:38:44 1.7 @@ -49,6 +49,7 @@ (2.0 and 1.3) * --with-apache=DIR DIR is the path where apache sources are located. + The apache sources should have been configured before configuring mod_jk. DIR is something like: /home/apache/apache_1.3.19 It builds a static Apache module. --enable-EAPI
Re: Separating Service code from Tomcat 4.0
On Tue, 24 Jul 2001, jean-frederic clere wrote: Pier P. Fumagalli wrote: Craig R. McClanahan at [EMAIL PROTECTED] wrote: On Tue, 24 Jul 2001, Pier P. Fumagalli wrote: Since it can be used by different projects (not only Tomcat), I wanted to separate the Service code into a new CVS repository (jakarta-service). How about it? Under the management of which subproject? For now, still Tomcat... My only concern is that also the build process isn't integrated, as most of it is Java code, while Service is native... How about putting it in commons, if it's really as general purpose as it sounds? Dunno, I don't know that much about commons to really say... From what I know, also commons is 100% Java... So far, commons is 100% Java, but I don't believe they (really we, cause I'm a committer there :-) would be opposed to a commonly useful project that has native code components. jakarta-tomcat-connectors is a place where C and Java are mixed ;-) What about jakarta-tomcat-connectors/service? Except for the fact that it's not a connector, and has nothing really to do with Tomcat :-) If we stay under Tomcat auspices, I'd vote for jakarta-tomcat-service instead. Pier Craig
Re: Separating Service code from Tomcat 4.0
Craig R. McClanahan at [EMAIL PROTECTED] wrote: So far, commons is 100% Java, but I don't believe they (really we, cause I'm a committer there :-) would be opposed to a commonly useful project that has native code components. Dunno... jakarta-tomcat-connectors is a place where C and Java are mixed ;-) What about jakarta-tomcat-connectors/service? Except for the fact that it's not a connector, and has nothing really to do with Tomcat :-) Exactly... If we stay under Tomcat auspices, I'd vote for jakarta-tomcat-service instead. I'd say, let's stick it with Tomcat until we don't have a proof-of-concept that it works, and then we can decide... I like jakarta-tomcat-service. Pier
Is there a bug in Tomcat 4.0 - MY JSP PAGES Does not get Refreshed every time I make changes to them -
Hi All, I am using Tomcat 4.0 and my jsp pages do not get refreshed i.e. the JSP engine does not check to see if the JSP has been changed at all. All I need to do is remove the class files from the work directory and then I can see the new changes. I request if any, can help me understand if I need to add any to my web.xml or to the server.xml to tell the JSP Engine to check for updated or changed JSP's every time. I used Tomcat 3.2 and have no problems with the similar situation. Thanks for your help in Advance. Praveen Moturu
Re: Is there a bug in Tomcat 4.0 - MY JSP PAGES Does not get Refreshed every time I make changes to them -
This bug existed in beta 5, and was fixed shortly thereafter in a nightly build. It's also fixed in beta 6. If you're still experiencing problems with beta 6, please file a bug report: http://nagoya.apache.org/bugzilla/ Craig McClanahan On Tue, 24 Jul 2001, Praveen Moturu wrote: Hi All, I am using Tomcat 4.0 and my jsp pages do not get refreshed i.e. the JSP engine does not check to see if the JSP has been changed at all. All I need to do is remove the class files from the work directory and then I can see the new changes. I request if any, can help me understand if I need to add any to my web.xml or to the server.xml to tell the JSP Engine to check for updated or changed JSP's every time. I used Tomcat 3.2 and have no problems with the similar situation. Thanks for your help in Advance. Praveen Moturu
Re: Separating Service code from Tomcat 4.0
Pier P. Fumagalli at [EMAIL PROTECTED] wrote: I'd say, let's stick it with Tomcat until we don't have a proof-of-concept that it works, and then we can decide... I like jakarta-tomcat-service. Request-for-vote: Can I go ahead and open the new CVS repo? Pier Print and detach the following portion, then mail it over to me at: Pier Somewhere in London United Kingdom And don't forget to put a STAMP :) --- [ ] +1 - Do it, and I can help [ ] +0 - Do it, but I can't help [ ] -0 - Do it, even if [ ] -1 - Don't do it, because My comments:
Strange looping behaviour in B6
I have a web application under development that's using tag libraries. In my WEB-INF/lib directory I have a bunch of .jar files. I also have a bunch of .jar.old files (I've renamed the old jars rather than replace them). If I leave the .jar.old files in the lib directory TC4B6 goes into a reloading loop for that context. My server.xml looks like this Context path=/course docBase=c:/webapps/coursesapp debug=9 reloadable=true Logger className=org.apache.catalina.logger.SystemOutLogger timestamp=true/ Loader checkInterval=3 / /Context and the context is getting reloaded every 3 seconds without me doing anything. If I take the .jar.old files out the behaviour stops! If you can't repro this I'll happily send you the entire webapp (it's big) and/or work on reproing this on a simpler scale, Kevin Jones DevelopMentor www.develop.com
Form based logon problems in T4B6
I can't get form based logon to work reliably in Beta6 (in fact I've had problems for a while) I have a webapp (called course) and a sub directory (gjava) which is protected. I'm using form based logon with the username and password in tomcat-users.xml. i) If I try and access a resource in \course\gjava I get the logon page, if I enter a valid username and password everything works. ii) If I try and access a resource in \course\gjava I get the logon page, if I enter an invalid username and password I get the logon page again - *not* the error page. iii) If I try and access a resource in \course\gjava I get the logon page, if I enter a valid username and password everything works. But if I hit the back button and then enter an invalid username/password I get redirected here http://localhost/course/gjava/j_security_check and get a 404 error iv) If I try and access a resource in \course\gjava I get the logon page, if I enter an invalid username and password I get the logon page again - *not* the error page. If I now enter the correct password I get the error page, Kevin Jones DevelopMentor www.develop.com
Re: Strange looping behaviour in B6
I have a web application under development that's using tag libraries. In my WEB-INF/lib directory I have a bunch of .jar files. I also have a bunch of .jar.old files (I've renamed the old jars rather than replace them). If I leave the .jar.old files in the lib directory TC4B6 goes into a reloading loop for that context. My server.xml looks like this Context path=/course docBase=c:/webapps/coursesapp debug=9 reloadable=true Logger className=org.apache.catalina.logger.SystemOutLogger timestamp=true/ Loader checkInterval=3 / /Context and the context is getting reloaded every 3 seconds without me doing anything. If I take the .jar.old files out the behaviour stops! If you can't repro this I'll happily send you the entire webapp (it's big) and/or work on reproing this on a simpler scale, It has been fixed since b6. Remy
cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspUtil.java
craigmcc01/07/24 15:39:48 Modified:jasper/src/share/org/apache/jasper/compiler JspUtil.java Log: Correct the XML quoted value for the double quote character from quote; (incorrect) to quot; (correct). PR: Bugzilla #2722. Submitted by: Prasad Subramanian [EMAIL PROTECTED] Revision ChangesPath 1.13 +4 -4 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java Index: JspUtil.java === RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- JspUtil.java 2001/07/23 23:45:37 1.12 +++ JspUtil.java 2001/07/24 22:39:48 1.13 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java,v 1.12 2001/07/23 23:45:37 craigmcc Exp $ - * $Revision: 1.12 $ - * $Date: 2001/07/23 23:45:37 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java,v 1.13 2001/07/24 22:39:48 craigmcc Exp $ + * $Revision: 1.13 $ + * $Date: 2001/07/24 22:39:48 $ * * * @@ -380,7 +380,7 @@ } else if (c == '') { sb.append(amp;); } else if (c == '') { -sb.append(quote;); +sb.append(quot;); } else { sb.append(c); }
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources ProxyDirContext.java
remm01/07/24 15:41:05 Modified:catalina/src/share/org/apache/naming/resources ProxyDirContext.java Log: - Add a cachingAllowed flag to enable / disable caching dynamically. Revision ChangesPath 1.5 +27 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java Index: ProxyDirContext.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ProxyDirContext.java 2001/05/16 05:57:44 1.4 +++ ProxyDirContext.java 2001/07/24 22:41:05 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v 1.4 2001/05/16 05:57:44 remm Exp $ - * $Revision: 1.4 $ - * $Date: 2001/05/16 05:57:44 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v 1.5 2001/07/24 22:41:05 remm Exp $ + * $Revision: 1.5 $ + * $Date: 2001/07/24 22:41:05 $ * * * @@ -84,7 +84,7 @@ * Proxy Directory Context implementation. * * @author Remy Maucherat - * @version $Revision: 1.4 $ $Date: 2001/05/16 05:57:44 $ + * @version $Revision: 1.5 $ $Date: 2001/07/24 22:41:05 $ */ public class ProxyDirContext implements DirContext { @@ -165,6 +165,12 @@ protected int cacheTTL = 5000; // 5s +/** + * Caching allowed flag. + */ +protected boolean cachingAllowed = true; + + // - Public Methods @@ -195,6 +201,22 @@ } +/** + * Is caching allowed ? + */ +public boolean isCachingAllowed() { +return cachingAllowed; +} + + +/** + * Set caching allowed flag. + */ +public void setCachingAllowed(boolean cachingAllowed) { +this.cachingAllowed = cachingAllowed; +} + + // Context Methods @@ -1321,7 +1343,7 @@ * Lookup in cache. */ protected CacheEntry cacheLookup(String name) { -if (cache == null) +if (!cachingAllowed || (cache == null)) return (null); CacheEntry cacheEntry = (CacheEntry) cache.get(name); if (cacheEntry == null) {
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Embedded.java
pier01/07/24 15:48:32 Modified:catalina/src/share/org/apache/catalina/startup Embedded.java Log: Updated the Embedded server to pick up the changes in the modifications we made during the weekend. Now also Embedded calls initialize() in the Connector interface at the right times, and binds appropriately to the configured port. Revision ChangesPath 1.10 +10 -6 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java Index: Embedded.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Embedded.java 2001/07/22 20:25:13 1.9 +++ Embedded.java 2001/07/24 22:48:31 1.10 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v 1.9 2001/07/22 20:25:13 pier Exp $ - * $Revision: 1.9 $ - * $Date: 2001/07/22 20:25:13 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v 1.10 2001/07/24 22:48:31 pier Exp $ + * $Revision: 1.10 $ + * $Date: 2001/07/24 22:48:31 $ * * * @@ -148,7 +148,7 @@ * /pre * * @author Craig R. McClanahan - * @version $Revision: 1.9 $ $Date: 2001/07/22 20:25:13 $ + * @version $Revision: 1.10 $ $Date: 2001/07/24 22:48:31 $ */ public class Embedded implements Lifecycle { @@ -431,9 +431,12 @@ connectors = results; // Start this Connector if necessary -if (started (connector instanceof Lifecycle)) { +if (started) { try { -((Lifecycle) connector).start(); +connector.initialize(); +if (connector instanceof Lifecycle) { +((Lifecycle) connector).start(); +} } catch (LifecycleException e) { logger.log(Connector.start, e); } @@ -939,6 +942,7 @@ // Start our defined Connectors second for (int i = 0; i connectors.length; i++) { +connectors[i].initialize(); if (connectors[i] instanceof Lifecycle) ((Lifecycle) connectors[i]).start(); }
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardContext.java
remm01/07/24 15:51:43 Modified:catalina/src/share/org/apache/catalina/core StandardContext.java Log: - Fix for #2710 - getNamingContextName returns incorrect name. Patch submitted by Vishy Kasar vishy at borland.com Revision ChangesPath 1.70 +30 -17 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.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- StandardContext.java 2001/07/22 20:25:08 1.69 +++ StandardContext.java 2001/07/24 22:51:43 1.70 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.69 2001/07/22 20:25:08 pier Exp $ - * $Revision: 1.69 $ - * $Date: 2001/07/22 20:25:08 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.70 2001/07/24 22:51:43 remm Exp $ + * $Revision: 1.70 $ + * $Date: 2001/07/24 22:51:43 $ * * * @@ -73,6 +73,7 @@ import java.util.Iterator; import java.util.TreeMap; import java.util.Hashtable; +import java.util.Stack; import java.util.Enumeration; import java.util.StringTokenizer; import javax.servlet.FilterConfig; @@ -141,7 +142,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.69 $ $Date: 2001/07/22 20:25:08 $ + * @version $Revision: 1.70 $ $Date: 2001/07/24 22:51:43 $ */ public class StandardContext @@ -473,6 +474,12 @@ private boolean filesystemBased = false; +/** + * Name of the associated naming context. + */ +private String namingContextName = null; + + // - Context Properties @@ -3672,19 +3679,25 @@ * Get naming context full name. */ private String getNamingContextName() { -Container parent = getParent(); -if (parent != null) { -StringBuffer buf = new StringBuffer(); -buf.append(/).append(parent.getName()).append(getName()); -parent = parent.getParent(); -while (parent != null) { -buf.append(/).append(parent.getName()); -parent = parent.getParent(); -} -return buf.toString(); -} else { -return getName(); -} + if (namingContextName == null) { + Container parent = getParent(); + if (parent == null) { + namingContextName = getName(); + } else { + Stack stk = new Stack(); + StringBuffer buff = new StringBuffer(); + while (parent != null) { + stk.push(parent.getName()); + parent = parent.getParent(); + } + while (!stk.empty()) { + buff.append(/ + stk.pop()); + } + buff.append(getName()); + namingContextName = buff.toString(); + } + } + return namingContextName; }
Re: Problem with mod_jk 1.2.0 (latest CVS snapshot)
GOMEZ Henri wrote: Good information, and could send us a strace ? This may sound strange to all you Apache experts, but how do I do that? How do I run strace on a detached process? strace httpd -f (follow forks) Thanks for the tip. The log file (bziped) is attached. I didn't locate the core ! Just realised that the core I have was compiled without -g option. VERY useful. I also wanted to replicate the core dump with the httpd that was compiled with -g, but that didn't work. Now I'm starting to think that the core file I had was a result of a different crash (I was experimenting with a lot of stuff and Apache would sometimes spit the dummy). So, how do I get to you something you can use? I've seen the Apache debugging document (http://dev.apache.org/debugging.html) and forceful core dumping techniques, but I couldn't find truss for Linux. Or maybe I should use something else? What are your suggestions? Bojan
Re: Separating Service code from Tomcat 4.0
On Tue, 24 Jul 2001, Pier P. Fumagalli wrote: Pier P. Fumagalli at [EMAIL PROTECTED] wrote: I'd say, let's stick it with Tomcat until we don't have a proof-of-concept that it works, and then we can decide... I like jakarta-tomcat-service. Request-for-vote: Can I go ahead and open the new CVS repo? Pier Print and detach the following portion, then mail it over to me at: Pier Somewhere in London United Kingdom And don't forget to put a STAMP :) --- [X] +1 - Do it, and I can help [ ] +0 - Do it, but I can't help [ ] -0 - Do it, even if [ ] -1 - Don't do it, because My comments: Craig
Re: Form based logon problems in T4B6
Sounds like a bug introduced when the functionality was modified recently, to do redirects instead of forwards. Could you do me a favor and file a bug report so it gets tracked? Thanks, Craig On Tue, 24 Jul 2001, Kevin Jones wrote: I can't get form based logon to work reliably in Beta6 (in fact I've had problems for a while) I have a webapp (called course) and a sub directory (gjava) which is protected. I'm using form based logon with the username and password in tomcat-users.xml. i) If I try and access a resource in \course\gjava I get the logon page, if I enter a valid username and password everything works. ii) If I try and access a resource in \course\gjava I get the logon page, if I enter an invalid username and password I get the logon page again - *not* the error page. iii) If I try and access a resource in \course\gjava I get the logon page, if I enter a valid username and password everything works. But if I hit the back button and then enter an invalid username/password I get redirected here http://localhost/course/gjava/j_security_check and get a 404 error iv) If I try and access a resource in \course\gjava I get the logon page, if I enter an invalid username and password I get the logon page again - *not* the error page. If I now enter the correct password I get the error page, Kevin Jones DevelopMentor www.develop.com
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves AccessLogValve.java
craigmcc01/07/24 16:21:09 Modified:catalina/src/share/org/apache/catalina/valves AccessLogValve.java Log: Include the query string (if any) in the access log output, in a manner consistent with logging done by web servers like Apache. PR: Bugzilla #2763 Submitted by: [EMAIL PROTECTED] Revision ChangesPath 1.8 +21 -6 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java Index: AccessLogValve.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- AccessLogValve.java 2001/07/22 20:25:15 1.7 +++ AccessLogValve.java 2001/07/24 23:21:09 1.8 @@ -126,7 +126,7 @@ * * @author Craig R. McClanahan * @author Jason Brittain - * @version $Revision: 1.7 $ $Date: 2001/07/22 20:25:15 $ + * @version $Revision: 1.8 $ $Date: 2001/07/24 23:21:09 $ */ public final class AccessLogValve @@ -488,6 +488,10 @@ result.append(hreq.getMethod()); result.append(space); result.append(hreq.getRequestURI()); +if (hreq.getQueryString() != null) { +result.append('?'); +result.append(hreq.getQueryString()); +} result.append(space); result.append(hreq.getProtocol()); result.append(\ ); @@ -677,11 +681,22 @@ else value = ; } else if (pattern == 'r') { -if (hreq != null) -value = hreq.getMethod() + space + hreq.getRequestURI() -+ space + hreq.getProtocol(); -else -value = - - + req.getProtocol(); +StringBuffer sb = new StringBuffer(); +if (hreq != null) { +sb.append(hreq.getMethod()); +sb.append(space); +sb.append(hreq.getRequestURI()); +if (hreq.getQueryString() != null) { +sb.append('?'); +sb.append(hreq.getQueryString()); +} +sb.append(space); +sb.append(hreq.getProtocol()); +} else { +sb.append(- - ); +sb.append(req.getProtocol()); +} +value = sb.toString(); } else if (pattern == 's') { if (hres != null) value = + ((HttpResponse) response).getStatus();
Re: Separating Service code from Tomcat 4.0
[ ] +1 - Do it, and I can help [X] +0 - Do it, but I can't help [ ] -0 - Do it, even if [ ] -1 - Don't do it, because My comments: Haven't even looked at it but I trust Pier :-) Mike Anderson
JSPC and Ant
Does the Ant project have plans to support a jspc/jspc build tag? Is JSPC friendly enough? That would rock. Steve
Re: Separating Service code from Tomcat 4.0
[ ] +1 - Do it, and I can help [ ] +0 - Do it, but I can't help [X] -0 - Do it, even if that would make the build process (even) more complex. [ ] -1 - Don't do it, because Remy
Re: Separating Service code from Tomcat 4.0
Remy Maucherat at [EMAIL PROTECTED] wrote: Do it, even if that would make the build process (even) more complex. I believe this can be achieved by simply copying the few interfaces over to jakarta-tomcat-4.0. Once those have been defined, they shouldn't change. While the actual big work is on the C code, which is the real thing we want to develop... And that part is completely separated from Tomcat, and its build process... Pier
RE: Problem with mod_jk 1.2.0 (latest CVS snapshot)
Just realised that the core I have was compiled without -g option. VERY useful. I also wanted to replicate the core dump with the httpd that was compiled with -g, but that didn't work. Now I'm starting to think that the core file I had was a result of a different crash (I was experimenting with a lot of stuff and Apache would sometimes spit the dummy). So, how do I get to you something you can use? I've seen the Apache debugging document (http://dev.apache.org/debugging.html) and forceful core dumping techniques, but I couldn't find truss for Linux. Or maybe I should use something else? What are your suggestions? Ask to Apache specialist in new-http list, may be JF Clere could forward your question to them ?
Re: Separating Service code from Tomcat 4.0
Pier P. Fumagalli wrote: Pier P. Fumagalli at [EMAIL PROTECTED] wrote: I'd say, let's stick it with Tomcat until we don't have a proof-of-concept that it works, and then we can decide... I like jakarta-tomcat-service. Request-for-vote: Can I go ahead and open the new CVS repo? Pier Print and detach the following portion, then mail it over to me at: Pier Somewhere in London United Kingdom And don't forget to put a STAMP :) --- [X] +1 - Do it, and I can help [ ] +0 - Do it, but I can't help [X] -0 - Do it, even ifI hate MS. [ ] -1 - Don't do it, because My comments: Assuming you're talking about the NT/2000 service codes. Joe //
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator FormAuthenticator.java
craigmcc01/07/24 17:09:34 Modified:catalina/src/share/org/apache/catalina/authenticator FormAuthenticator.java Log: When processing a form-based login, and redirecting back to the originally requested resource, include any query string that was part of the original request in the URL to which the redirect occurs. In that way, request parameters that were specified as part of the original request will not be lost. PR: Bugzilla #2768 Submitted by: Vincente Salvador [EMAIL PROTECTED] Revision ChangesPath 1.12 +14 -9 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java Index: FormAuthenticator.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- FormAuthenticator.java2001/07/22 20:09:19 1.11 +++ FormAuthenticator.java2001/07/25 00:09:34 1.12 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v 1.11 2001/07/22 20:09:19 pier Exp $ - * $Revision: 1.11 $ - * $Date: 2001/07/22 20:09:19 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/authenticator/FormAuthenticator.java,v 1.12 2001/07/25 00:09:34 craigmcc Exp $ + * $Revision: 1.12 $ + * $Date: 2001/07/25 00:09:34 $ * * * @@ -88,7 +88,7 @@ * Authentication, as described in the Servlet API Specification, Version 2.2. * * @author Craig R. McClanahan - * @version $Revision: 1.11 $ $Date: 2001/07/22 20:09:19 $ + * @version $Revision: 1.12 $ $Date: 2001/07/25 00:09:34 $ */ public final class FormAuthenticator @@ -230,7 +230,7 @@ // Redirect the user to the original request URI (which will cause // the original request to be restored) -requestURI = savedRequestURI(session); +requestURI = savedRequestURL(session); if (debug = 1) log(Redirecting to ' + requestURI + '); hres.sendRedirect(hres.encodeRedirectURL(requestURI)); @@ -397,18 +397,23 @@ /** - * Return the request URI from the saved request. + * Return the request URI (with the corresponding query string, if any) + * from the saved request so that we can redirect to it. * * @param session Our current session */ -private String savedRequestURI(Session session) { +private String savedRequestURL(Session session) { SavedRequest saved = (SavedRequest) session.getSession().getAttribute(Constants.FORM_KEY); if (saved == null) return (null); -else -return (saved.getRequestURI()); +StringBuffer sb = new StringBuffer(saved.getRequestURI()); +if (saved.getQueryString() != null) { +sb.append('?'); +sb.append(saved.getQueryString()); +} +return (sb.toString()); }
Re: Form based logon problems in T4B6
Kevin, As I was fixing Bugzilla #2768 (form based login was losing the query string when redirecting back to the original page), I tried out your scenario using the examples app included with Tomcat: http://localhost:8080/examples/jsp/security/protected/index.jsp and it seemed to work correctly. I'd be very interested in a test case that fails on tonight's nightly build (20010725). Craig On Tue, 24 Jul 2001, Kevin Jones wrote: I can't get form based logon to work reliably in Beta6 (in fact I've had problems for a while) I have a webapp (called course) and a sub directory (gjava) which is protected. I'm using form based logon with the username and password in tomcat-users.xml. i) If I try and access a resource in \course\gjava I get the logon page, if I enter a valid username and password everything works. ii) If I try and access a resource in \course\gjava I get the logon page, if I enter an invalid username and password I get the logon page again - *not* the error page. iii) If I try and access a resource in \course\gjava I get the logon page, if I enter a valid username and password everything works. But if I hit the back button and then enter an invalid username/password I get redirected here http://localhost/course/gjava/j_security_check and get a 404 error iv) If I try and access a resource in \course\gjava I get the logon page, if I enter an invalid username and password I get the logon page again - *not* the error page. If I now enter the correct password I get the error page, Kevin Jones DevelopMentor www.develop.com
RE: Separating Service code from Tomcat 4.0
Pier P. Fumagalli wrote: Since it can be used by different projects (not only Tomcat), I wanted to separate the Service code into a new CVS repository (jakarta-service). How about it? Ok for jakarta-service. And I agree with Pier that since it's not only related to tomcat, shouldn't go under jakarta-tomcat-service. Should we have all developpment started by a tomcat commiter under the jakarta-tomcat responsability. I'm +1 for jakarta-service and -1 for jakarta-tomcat-service
Re: Separating Service code from Tomcat 4.0
Joe Flowers at [EMAIL PROTECTED] wrote: [X] +1 - Do it, and I can help [ ] +0 - Do it, but I can't help [X] -0 - Do it, even ifI hate MS. [ ] -1 - Don't do it, because My comments: Assuming you're talking about the NT/2000 service codes. Yes, that's another reason why I'm proposing the split. I am integrating your Service code with my Service code (so we're going to be both very happy campers), and I would actually request your commit status on the jakarta-tomcat-service CVS module... You're the author of that code, and I would be _so_happy_ to see you on board... Especially for the design of a new Service API... :) Pier
Re: Separating Service code from Tomcat 4.0
Remy Maucherat at [EMAIL PROTECTED] wrote: Do it, even if that would make the build process (even) more complex. I believe this can be achieved by simply copying the few interfaces over to jakarta-tomcat-4.0. Once those have been defined, they shouldn't change. While the actual big work is on the C code, which is the real thing we want to develop... And that part is completely separated from Tomcat, and its build process... Ok. +1 then. Remy
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets WebdavServlet.java
remm01/07/24 18:07:26 Modified:catalina/src/share/org/apache/catalina/servlets WebdavServlet.java Log: - An instance of DocumentBuilderFactory is not thread safe, so we cannot keep a reference to one in the servlet instance. Revision ChangesPath 1.23 +23 -26 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java Index: WebdavServlet.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- WebdavServlet.java2001/07/24 01:30:59 1.22 +++ WebdavServlet.java2001/07/25 01:07:25 1.23 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v 1.22 2001/07/24 01:30:59 remm Exp $ - * $Revision: 1.22 $ - * $Date: 2001/07/24 01:30:59 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v 1.23 2001/07/25 01:07:25 remm Exp $ + * $Revision: 1.23 $ + * $Date: 2001/07/25 01:07:25 $ * * * @@ -126,7 +126,7 @@ * are handled by the DefaultServlet. * * @author Remy Maucherat - * @version $Revision: 1.22 $ $Date: 2001/07/24 01:30:59 $ + * @version $Revision: 1.23 $ $Date: 2001/07/25 01:07:25 $ */ public class WebdavServlet @@ -216,12 +216,6 @@ /** - * JAXP Document builder factory. - */ -private DocumentBuilderFactory documentBuilderFactory; - - -/** * Repository of the locks put on single resources. * p * Key : path br @@ -276,8 +270,6 @@ ; } -documentBuilderFactory = DocumentBuilderFactory.newInstance(); - } @@ -285,6 +277,23 @@ /** + * Return JAXP document builder instance. + */ +protected DocumentBuilder getDocumentBuilder() +throws ServletException { +DocumentBuilder documentBuilder = null; +try { +documentBuilder = +DocumentBuilderFactory.newInstance().newDocumentBuilder(); +} catch(ParserConfigurationException e) { +throw new ServletException +(sm.getString(webdavservlet.jaxpfailed)); +} +return documentBuilder; +} + + +/** * Handles the special WebDAV methods. */ protected void service(HttpServletRequest req, HttpServletResponse resp) @@ -434,13 +443,7 @@ Node propNode = null; -DocumentBuilder documentBuilder = null; -try { -documentBuilder = documentBuilderFactory.newDocumentBuilder(); -} catch(ParserConfigurationException e) { -throw new ServletException -(sm.getString(webdavservlet.jaxpfailed)); -} +DocumentBuilder documentBuilder = getDocumentBuilder(); try { Document document = documentBuilder.parse @@ -896,13 +899,7 @@ Node lockInfoNode = null; -DocumentBuilder documentBuilder = null; -try { -documentBuilder = documentBuilderFactory.newDocumentBuilder(); -} catch(ParserConfigurationException e) { -throw new ServletException -(sm.getString(webdavservlet.jaxpfailed)); -} +DocumentBuilder documentBuilder = getDocumentBuilder(); try { Document document = documentBuilder.parse(new InputSource
cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspParseEventListener.java StoredCharDataGenerator.java
craigmcc01/07/24 18:08:13 Modified:jasper/src/share/org/apache/jasper/compiler JspParseEventListener.java StoredCharDataGenerator.java Log: Correct the pathname of the file in which the template text is stored when the largefile initialization parameter (of the JSP servlet) is set to true. In addition, modify the generated code to account for the fact that java.io.* is no longer implicitly imported. PR: Bugzilla #2748 Submitted by: Vincente Salvador [EMAIL PROTECTED] Revision ChangesPath 1.33 +4 -4 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java Index: JspParseEventListener.java === RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- JspParseEventListener.java2001/07/13 01:50:55 1.32 +++ JspParseEventListener.java2001/07/25 01:08:13 1.33 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v 1.32 2001/07/13 01:50:55 remm Exp $ - * $Revision: 1.32 $ - * $Date: 2001/07/13 01:50:55 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v 1.33 2001/07/25 01:08:13 craigmcc Exp $ + * $Revision: 1.33 $ + * $Date: 2001/07/25 01:08:13 $ * * * @@ -182,7 +182,7 @@ // FIXME: Is this good enough? (I'm just taking the easy way out - akv) if (ctxt.getOptions().getLargeFile()) -dataFile = ctxt.getOutputDir() + File.separatorChar + +dataFile = ctxt.getOutputDir() + ctxt.getServletClassName() + .dat; } 1.2 +8 -8 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/StoredCharDataGenerator.java Index: StoredCharDataGenerator.java === RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/StoredCharDataGenerator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- StoredCharDataGenerator.java 2000/08/12 00:52:08 1.1 +++ StoredCharDataGenerator.java 2001/07/25 01:08:13 1.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/StoredCharDataGenerator.java,v 1.1 2000/08/12 00:52:08 pierred Exp $ - * $Revision: 1.1 $ - * $Date: 2000/08/12 00:52:08 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/StoredCharDataGenerator.java,v 1.2 2001/07/25 01:08:13 craigmcc Exp $ + * $Revision: 1.2 $ + * $Date: 2001/07/25 01:08:13 $ * * * @@ -97,23 +97,23 @@ private final void generateInit(ServletWriter writer) { if (stringId == 0) { String name = writer.quoteString(fileName); -writer.println(ObjectInputStream oin = null;); +writer.println(java.io.ObjectInputStream oin = null;); writer.println(int numStrings = 0;); writer.println(try {); writer.pushIndent(); -writer.println(FileInputStream fin = new FileInputStream(+name+);); -writer.println(oin = new ObjectInputStream(fin);); +writer.println(java.io.FileInputStream fin = new java.io.FileInputStream(+name+);); +writer.println(oin = new java.io.ObjectInputStream(fin);); writer.println(_jspx_html_data = (char[][]) oin.readObject();); writer.popIndent(); writer.println(} catch (Exception ex) {); writer.pushIndent(); -writer.println(throw new JasperException(\Unable to open data file\);); +writer.println(throw new org.apache.jasper.runtime.JspException(\Unable to open data file\);); writer.popIndent(); writer.println(} finally {); writer.pushIndent(); writer.println(if (oin != null)); writer.pushIndent(); -writer.println(try { oin.close(); } catch (IOException ignore) { }); +writer.println(try { oin.close(); } catch (java.io.IOException ignore) { }); writer.popIndent(); writer.popIndent(); writer.println(});
cvs commit: jakarta-tomcat-connectors/webapp/java WarpConnector.java
pier01/07/24 18:28:06 Modified:webapp/java WarpConnector.java Log: Pick up changes from the jakarta-tomcat-4.0 repository for the Connector interface changes. NOTE - This will break compatibility with pre-beta-6 versions of Tomcat 4.0. Revision ChangesPath 1.17 +32 -22jakarta-tomcat-connectors/webapp/java/WarpConnector.java Index: WarpConnector.java === RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpConnector.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- WarpConnector.java2001/07/19 23:45:30 1.16 +++ WarpConnector.java2001/07/25 01:28:06 1.17 @@ -130,6 +130,8 @@ /** The lifecycle event support for this component. */ private LifecycleSupport lifecycle=new LifecycleSupport(this); +/** The initialized flag. */ +private boolean initialized=false; /** The started flag. */ private boolean started=false; @@ -431,11 +433,41 @@ } /** + * Initialize this connector (create ServerSocket here!) + */ +public void initialize() +throws LifecycleException { +if (initialized) +throw new LifecycleException(Already initialized); +this.initialized=true; + +// Get a hold on a server socket +try { +ServerSocketFactory fact=this.getFactory(); +int port=this.getPort(); +int accc=this.getAcceptCount(); + +if (this.getAddress()==null) { +this.server=fact.createSocket(port,accc); +} else { +InetAddress addr=InetAddress.getByName(this.getAddress()); +this.server=fact.createSocket(port,accc,addr); +} +} catch (IOException e) { +throw new LifecycleException(Error creating server socket,e); +} +} + +/** * Start accepting connections by this codeConnector/code. */ public void start() throws LifecycleException { if (started) throw new LifecycleException(Already started); +// Can't get a hold of a server socket +if (this.server==null) +throw new LifecycleException(Server socket not created); + lifecycle.fireLifecycleEvent(START_EVENT, null); this.started = true; @@ -515,28 +547,6 @@ * Start accepting WARP requests from the network. */ public void run() { -// Get a hold on a server socket -try { -ServerSocketFactory fact=this.getFactory(); -int port=this.getPort(); -int accc=this.getAcceptCount(); - -if (this.getAddress()==null) { -this.server=fact.createSocket(port,accc); -} else { -InetAddress addr=InetAddress.getByName(this.getAddress()); -this.server=fact.createSocket(port,accc,addr); -} -} catch (IOException e) { -logger.log(Error creating server socket,e); -} - -// Can't get a hold of a server socket -if (this.server==null) { -logger.log(Unable to create server socket); -return; -} - // Start accepting connections try { while (this.isStarted()) {
cvs commit: jakarta-tomcat-connectors/webapp/java WarpConnector.java
pier01/07/24 18:29:59 Modified:webapp/java WarpConnector.java Log: This should restore compatibility of the WARP connector with B6 and previous versions of Tomcat. Revision ChangesPath 1.18 +1 -0 jakarta-tomcat-connectors/webapp/java/WarpConnector.java Index: WarpConnector.java === RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpConnector.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- WarpConnector.java2001/07/25 01:28:06 1.17 +++ WarpConnector.java2001/07/25 01:29:59 1.18 @@ -462,6 +462,7 @@ * Start accepting connections by this codeConnector/code. */ public void start() throws LifecycleException { +if (!initialized) this.initialize(); if (started) throw new LifecycleException(Already started); // Can't get a hold of a server socket
cvs commit: jakarta-tomcat-connectors/webapp/java WarpConfigurationHandler.java WarpConnection.java WarpPacket.java WarpRequest.java WarpRequestHandler.java WarpResponse.java
pier01/07/24 18:30:47 Modified:webapp/java WarpConfigurationHandler.java WarpConnection.java WarpPacket.java WarpRequest.java WarpRequestHandler.java WarpResponse.java Log: Trimming lines and expanding tabs. Revision ChangesPath 1.10 +6 -6 jakarta-tomcat-connectors/webapp/java/WarpConfigurationHandler.java Index: WarpConfigurationHandler.java === RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpConfigurationHandler.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- WarpConfigurationHandler.java 2001/07/19 23:36:56 1.9 +++ WarpConfigurationHandler.java 2001/07/25 01:30:46 1.10 @@ -90,9 +90,9 @@ connection.send(packet); // Loop for configuration packets -while (true) { +while (true) { connection.recv(packet); - + switch (packet.getType()) { case Constants.TYPE_CONF_DEPLOY: { @@ -103,7 +103,7 @@ Context context=null; packet.reset(); -if (Constants.DEBUG) +if (Constants.DEBUG) logger.log(Deploying web application \+appl+\ + under http://+host+:+port+path+;); try { @@ -151,9 +151,9 @@ return(false); } } -} +} } - + /** Deploy a web application */ private Context deploy(WarpConnection connection, WarpLogger logger, String applName, String hostName, String applPath) @@ -178,7 +178,7 @@ } // TODO: Set up mapping mechanism for performance - + if (applPath.endsWith(/)) applPath=applPath.substring(0,applPath.length()-1); 1.18 +2 -2 jakarta-tomcat-connectors/webapp/java/WarpConnection.java Index: WarpConnection.java === RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpConnection.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- WarpConnection.java 2001/07/20 02:31:07 1.17 +++ WarpConnection.java 2001/07/25 01:30:46 1.18 @@ -244,13 +244,13 @@ int ret=0; while (true) { ret=this.input.read(packet.buffer,off,packet.size-off); -if (ret==-1) +if (ret==-1) throw new IOException(Premature packet payload end); off+=ret; if(off==packet.size) break; } } - + if (Constants.DEBUG) { String typ=Integer.toHexString(packet.getType()); logger.debug( TYPE=+typ+ LENGTH=+packet.size); 1.13 +1 -1 jakarta-tomcat-connectors/webapp/java/WarpPacket.java Index: WarpPacket.java === RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpPacket.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- WarpPacket.java 2001/07/19 23:45:30 1.12 +++ WarpPacket.java 2001/07/25 01:30:46 1.13 @@ -223,7 +223,7 @@ throw new RuntimeException(Unsupported encoding UTF-8); } } - + public String dump() { StringBuffer buf=new StringBuffer(DATA=); for (int x=0; xthis.size; x++) { 1.8 +3 -3 jakarta-tomcat-connectors/webapp/java/WarpRequest.java Index: WarpRequest.java === RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpRequest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- WarpRequest.java 2001/07/20 02:32:12 1.7 +++ WarpRequest.java 2001/07/25 01:30:46 1.8 @@ -62,15 +62,15 @@ public class WarpRequest extends HttpRequestBase { private Host host=null; - + public WarpRequest() { super(); } - + public void setHost(Host host) { this.host=host; } - + public Host getHost() { return(this.host); } 1.11 +4 -4 jakarta-tomcat-connectors/webapp/java/WarpRequestHandler.java Index: WarpRequestHandler.java === RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpRequestHandler.java,v retrieving revision 1.10 retrieving
Re: Separating Service code from Tomcat 4.0
GOMEZ Henri at [EMAIL PROTECTED] wrote: Ok for jakarta-service. And I agree with Pier that since it's not only related to tomcat, shouldn't go under jakarta-tomcat-service. Should we have all developpment started by a tomcat commiter under the jakarta-tomcat responsability. I'm +1 for jakarta-service and -1 for jakarta-tomcat-service Well, creating a new top-level project requires an action from the PMC, and for brevity, that's what I would like to avoid right now... I believe that jakarta-tomcat-service is OK for now, and that when we get to a decently sized critical mass, we can spin it off as its own subproject, with mailing lists, committers and all that crap... So, although it's not directly related to Tomcat, and it'll be actually better to have it as a different thing, I'd rather start it spin it off under the auspices of the current Tomcat project, if it's ok for the others. Pier
cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler XmlOutputter.java
craigmcc01/07/24 18:49:10 Modified:jasper/src/share/org/apache/jasper/compiler XmlOutputter.java Log: Correctly escape occurrences of ]] in XML output inside a CDATA section. PR: Bugzilla #2704 Submitted by: Shawn Bayern [EMAIL PROTECTED] Revision ChangesPath 1.15 +25 -4 jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java Index: XmlOutputter.java === RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- XmlOutputter.java 2001/05/22 21:43:32 1.14 +++ XmlOutputter.java 2001/07/25 01:49:10 1.15 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v 1.14 2001/05/22 21:43:32 horwat Exp $ - * $Revision: 1.14 $ - * $Date: 2001/05/22 21:43:32 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v 1.15 2001/07/25 01:49:10 craigmcc Exp $ + * $Revision: 1.15 $ + * $Date: 2001/07/25 01:49:10 $ * * * @@ -159,7 +159,7 @@ */ void append(char[] text) { sb.append(![CDATA[\n); -sb.append(text); +sb.append(filter(text)); sb.append(]]\n); } @@ -234,6 +234,27 @@ void append(String tag) { sb.append(/).append(tag).append(\n); } + +/** + * Filter text that is destined for a CDATA section so that occurrences + * of ']]' within the text are properly escaped. + * + * @param text Text to be filtered + */ +char[] filter(char[] text) { +String s = new String(text); +while (true) { +int n = s.indexOf(]]); +if (n 0) +break; +StringBuffer sb = new StringBuffer(s.substring(0, n)); +sb.append(]]gt;); +sb.append(s.substring(n + 3)); +s = sb.toString(); +} +return (s.toCharArray()); +} + //* // Outputting the XML stream
Re: Separating Service code from Tomcat 4.0
Pier P. Fumagalli at [EMAIL PROTECTED] wrote: Joe Flowers at [EMAIL PROTECTED] wrote: [X] +1 - Do it, and I can help [ ] +0 - Do it, but I can't help [X] -0 - Do it, even ifI hate MS. [ ] -1 - Don't do it, because My comments: Assuming you're talking about the NT/2000 service codes. Yes, that's another reason why I'm proposing the split. I am integrating your Service code with my Service code (so we're going to be both very happy campers), and I would actually request your commit status on the jakarta-tomcat-service CVS module... You're the author of that code, and I would be _so_happy_ to see you on board... Especially for the design of a new Service API... :) ME BIG DOPE :) :) :) There are TWO Win32 Service implementations... I thought Joe and Elijah were working on the same code :) :) :) But THEY'RE NOT! (Sometimes I'm just so fuckin' stupid! :) On a very rough analysis, Elijah's JavaService is better as it uses JNI, but on the other hand, Joe's TomcatService is better because the sources are way simpler, even though it uses the batch files... I'll dig into those further :) Pier