RE: mod_jk2 config
On Fri, 1 Mar 2002, Ignacio J. Ortega wrote: JkMount /uri worker is /uri=worker I like to point out, that just now isapi_redirector ( 3.3 and j-t-c) uses a slightly more complex form of the former syntax, to allow a limited vhost mapping capabilty in isapi_redirector, /vhost/uri=worker You can learn something new everyday... I didn't know that, thanks Nacho, that makes things simpler/cleaner. Let's keep this syntax, with a small change - if the uri is for the 'default' host we'll leave the '/' and make vhost empty: //uri=worker In addition, I need: uri.[property]://uri=worker For example: uri.debug:/my.host.com:8080/examples=TRACE This would turn mod_jk debugging for requests for that particular url. Good, I like this idea of behind able to trace particular requests. Or uri.webapp:/my.host.com:8080/examples=/examples ( or some other mean to specify the context path ) uri.servletName:/my.host.com:8080/examples/HelloW=HelloWorldServlet Could we get these translation from web.xml forwarded by Ajp14 autoconf feature ? With this jk will pass the servlet name to tomcat and eliminate the second mapping, like mod_jserv did. Why not just use : JkAutoMount webapp worker = get all mapping for a particular webapp for a worker or JkAutoMount * worker = get all mapping for all webapp for supported by this worker In that case we could even get the loglevel for this webapp. What about jk-status which should present state of jk connections and informations ? Also are we agree in adding a REQUEST flag to LogLevel to be able to track the query/reply timestamp ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mod_jk2 config
GOMEZ Henri wrote: On Fri, 1 Mar 2002, Ignacio J. Ortega wrote: JkMount /uri worker is /uri=worker I like to point out, that just now isapi_redirector ( 3.3 and j-t-c) uses a slightly more complex form of the former syntax, to allow a limited vhost mapping capabilty in isapi_redirector, /vhost/uri=worker You can learn something new everyday... I didn't know that, thanks Nacho, that makes things simpler/cleaner. Let's keep this syntax, with a small change - if the uri is for the 'default' host we'll leave the '/' and make vhost empty: //uri=worker In addition, I need: uri.[property]://uri=worker For example: uri.debug:/my.host.com:8080/examples=TRACE This would turn mod_jk debugging for requests for that particular url. Good, I like this idea of behind able to trace particular requests. Or uri.webapp:/my.host.com:8080/examples=/examples ( or some other mean to specify the context path ) uri.servletName:/my.host.com:8080/examples/HelloW=HelloWorldServlet Could we get these translation from web.xml forwarded by Ajp14 autoconf feature ? With this jk will pass the servlet name to tomcat and eliminate the second mapping, like mod_jserv did. Why not just use : JkAutoMount webapp worker = get all mapping for a particular webapp for a worker or JkAutoMount * worker = get all mapping for all webapp for supported by this worker In that case we could even get the loglevel for this webapp. What about jk-status which should present state of jk connections and informations ? +1. It must use a template file to prevent having html codes in the source files. Also are we agree in adding a REQUEST flag to LogLevel to be able to track the query/reply timestamp ? +1. It will help to compare different channel performances. -- 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: Start/StopTomcat and ajpid
Ok, so could you confirm the following : to start/stop with ajp12 : startupsh -ajpid /var/spool/tomcat3/ajp12id -ajp12 shutdownsh -ajpid /var/spool/tomcat3/ajp12id -ajp12 to start/stop with ajp13 : startupsh -ajpid /var/spool/tomcat3/ajp13id -ajp13 shutdownsh -ajpid /var/spool/tomcat3/ajp13id -ajp13 Thanks Like Costin, I've got no problem with this as long as you don't remove it from serverxml Ok, but I just want a confirmation of start/stop synthax See upper
RE: mod_jk2 config
With my recent changes, there are few changes in the config. My config is: ( in httpd.conf ) LoadModule jk2_module modules/mod_jk2.so IfModule mod_jk2.c JkSet logLevel debug JkSet worker.ajp13.type ajp13 JkSet worker.ajp13.channel socket JkSet worker.ajp13.port 8009 Great # JkSet worker.ajp13.channel apr # JkSet worker.ajp13.host /tmp/tomcatUnixSocket # JkSet worker.ajp13.channel jni JkSet worker.status.type status good JkSet /examples/* ajp13 good Location /jkstatus JkUriSet worker status /Location So status is a specialized worker used to display the jk state Both styles of uri config work ( == JkMount), uri.PROPERTY is not completely implemented yet. I tested only on apache2 - the apache1.3 module compiles but I didn't test it. If you have some time... I'll try to after various jakarta RPMs. The major change is that 'worker.NAME.type' must be the first thing, and worker.NAME.channel the second. You need this limitation to be able to verify next params ? In addition, worker.list is no longer used - any worker that is declared will be loaded. Good This is similar with server.xml - where each BaseInterceptor, Valve, etc will be loaded if it's not commented out, and the object must be created before setting properties on it. worker.type will create a worker object ( in this case, worker is the interface, ajp13/status/jni is the 'class name' ). Same for channel, which must be instantiated. Ok, seems fine -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
OT - ANN: Open Source JMX Implementation
Hi, MX4J is the new name of the project formerly known as OpenJMX, that is an open source implementation of the JMX(TM) technology. It is currently in beta3 and we will release version 1.0 before JavaOne, under Apache License. MX4J version 1.0 fully implements the JMX 1.0 specification, and bundles several utility MBeans as well as an HTTP Adaptor and RMI Connectors/Adaptors. Check it out at http://mx4j.sourceforge.net Best Regards Simone Bordet mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: OT - ANN: Open Source JMX Implementation
Yes, it's known and used by Tomcat 4.0 for example ;) - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 -Original Message- From: Bordet, Simone [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 2:41 PM To: [EMAIL PROTECTED] Subject: OT - ANN: Open Source JMX Implementation Hi, MX4J is the new name of the project formerly known as OpenJMX, that is an open source implementation of the JMX(TM) technology. It is currently in beta3 and we will release version 1.0 before JavaOne, under Apache License. MX4J version 1.0 fully implements the JMX 1.0 specification, and bundles several utility MBeans as well as an HTTP Adaptor and RMI Connectors/Adaptors. Check it out at http://mx4j.sourceforge.net Best Regards Simone Bordet 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 6846] New: - dispatcher.forward() is confused when using special servlet mapping URLs
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=6846. 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=6846 dispatcher.forward() is confused when using special servlet mapping URLs Summary: dispatcher.forward() is confused when using special servlet mapping URLs Product: Tomcat 4 Version: 4.0.3 Final Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] please have a look at the web application attached to this bug. web.xml defines two servlet mappings: /subdir/ reproduces the bug. /subdir/foobar works as expected. both map to a servlet that does a dispatcher.forward() to an html page (/subdir/hello.html). both mappings should display the html page. unfortunately, the first mapping doesn't. apparently it searches for hello.html at some other place than the /subdir. notice that the mapping contains a trailing slash to make sure that servlet mapping is contained in the subdir. i found no part of the servlet specification that forbids the use of just a directory. it also works as expected under tomcat 3.2 and 3.3. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6846] - dispatcher.forward() is confused when using special servlet mapping URLs
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=6846. 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=6846 dispatcher.forward() is confused when using special servlet mapping URLs --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 14:03 --- Created an attachment (id=1273) web application that demonstrates the bug. just should be able to put this in the webapps directory. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 5647] - AJP13 connector will not pass authentication requests
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=5647. 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=5647 AJP13 connector will not pass authentication requests [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 15:11 --- Are you sure the bug is resolved in Tomcat4.0.2 release for IIS connector as well? I've added very similar bug for AJP13 with IIS (ID: 6219), and it has been marked as a duplicate of this one... But I've downloaded the 4.0.2, along with new filter DLL for IIS, and the problem still exists. Maybe the filter DLL should not include fields, that do not have values, in AJP13 packets? Otherwise, the patch from 6219 should be applied to AJP13Request.java to get this work. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/catalina/src/conf catalina.policy
glenn 02/03/04 07:12:48 Modified:catalina/src/conf catalina.policy Log: Fix example grants fro webapp jar's Revision ChangesPath 1.22 +3 -3 jakarta-tomcat-4.0/catalina/src/conf/catalina.policy Index: catalina.policy === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/catalina.policy,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- catalina.policy 9 Feb 2002 18:31:25 - 1.21 +++ catalina.policy 4 Mar 2002 15:12:48 - 1.22 @@ -8,7 +8,7 @@ // // * Read access to the document root directory // -// $Id: catalina.policy,v 1.21 2002/02/09 18:31:25 remm Exp $ +// $Id: catalina.policy,v 1.22 2002/03/04 15:12:48 glenn Exp $ // @@ -149,11 +149,11 @@ // }; // // The permission granted to your JDBC driver -// grant codeBase file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/- { +// grant codeBase jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/- { // permission java.net.SocketPermission dbhost.mycompany.com:5432, connect; // }; // The permission granted to the scrape taglib -// grant codeBase file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/- { +// grant codeBase jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/- { // permission java.net.SocketPermission *.noaa.gov:80, connect; // }; -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 5647] - AJP13 connector will not pass authentication requests
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=5647. 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=5647 AJP13 connector will not pass authentication requests --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 16:42 --- We did a deep examination, and found that the source of this problem resides inside the IIS DLL code, file: jakarta-tomcat- connectors/jk/native/isapi/jk_isapi_plugin.c : 1) The instance 's' of a structure jk_ws_service_t is inited with a call to: jk_init_ws_service(s), where the member s.remote_user is set to NULL; 2) that instance is passed to InitService method, which contains this line: GETVARIABLE(REMOTE_HOST, s-remote_host, ); The line simply sets the value of s-remote_host to empty string, instead of leaving its NULL. This method affects also other variables. 3) The AJP message is then filled with variables, that were not present in original request, but were substitited empty strings instead of NULLs 4) The AJP13 message parser (in Java), initializes all found variables with no value with empty arrays, resulting later in their conversion to empty Strings instead of null's. That later (in AJP13Request.java) results in empty Principal being set in HttpServletRequest. Solutions: As may be observed in CVS for AJP13Request, the patch was applied to one version only, and has been removed in current version. So, either apply the patch again, or change jk_isapi_plugin.c such that it won't initialize server variables that are not present in original request (just remove the lines from InitService function). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: OT - ANN: Open Source JMX Implementation
Yes, it's known and used by Tomcat 4.0 for example ;) I told Simone to post an annoucement since the project changed its name. It's a great replacement for the JMX RI and its evil license; we'll definitely ship with that :) Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mod_jk2 config
On Mon, 4 Mar 2002, GOMEZ Henri wrote: Location /jkstatus JkUriSet worker status /Location So status is a specialized worker used to display the jk state Yes, jk_worker_status.c It has minimal stuff inside - help needed to add more ! ( eventually cutpastes from mod_jserv :-) I allways missed the status page in jserv - it makes configuration and debugging much easier. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Start/StopTomcat and ajpid
On Mon, 4 Mar 2002, GOMEZ Henri wrote: to start/stop with ajp12 : startup.sh -ajpid /var/spool/tomcat3/ajp12.id -ajp12 shutdown.sh -ajpid /var/spool/tomcat3/ajp12.id -ajp12 to start/stop with ajp13 : startup.sh -ajpid /var/spool/tomcat3/ajp13.id -ajp13 shutdown.sh -ajpid /var/spool/tomcat3/ajp13.id -ajp13 Thanks Like Costin, I've got no problem with this as long as you don't remove it from server.xml. Ok, but I just want a confirmation of start/stop synthax See upper Confirmed :-) -ajp12 is optional ( or it was last time I checked this ), for backward compat. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: mod_jk2 config
On Mon, 4 Mar 2002, GOMEZ Henri wrote: uri.servletName:/my.host.com:8080/examples/HelloW=HelloWorldServlet Could we get these translation from web.xml forwarded by Ajp14 autoconf feature ? We should get these from web.xml - either extracted directly or by extracting the info from tomcat. The information can be passed to jk via ajp14 ( wire ), or properties, or other methods. I don't think we can support ajp14 for the first release of jk2, the goal is to replace the old connector with one with the same features, but better interfaces ( and easier config, faster, etc ). We can add ajp14 later. With this jk will pass the servlet name to tomcat and eliminate the second mapping, like mod_jserv did. Why not just use : JkAutoMount webapp worker = get all mapping for a particular webapp for a worker There are 2 problems: - it requires tomcat to be started before apache - it's very tricky to even describe how this would work in a complex configuration ( multiple tomcats, multiple apache servers, etc). We'll add (back) this after we stabilize the code and release the first version ( and figure out how to do it ). BTW, I was thinking of separating the config protocol from normal ajp - the config is clearly not perf. critical ( no need for a binary protocol ). Instead of extending ajp13, we can have a simple ajp13 request to /jk2/servlet/autoConf?webapp=/examples ( done by a jk2 autoConfig worker ). That would return a normal response, with the body beeing a properties file in the same format as the one generated. The implementation is very simple ( most of the code already exists ), and would allow much easier programming, regular servlets - maybe with some container-specific code, for java ( like the manager or admin ), very little change in the C side. What about jk-status which should present state of jk connections and informations ? It's 'work in progress'. I want to get at least the basic things we had in jserv - especially for lb and worker status, plus some of the 'stop sending requests to this lb worker', 'add/remove a lb worker to the pool'. Also are we agree in adding a REQUEST flag to LogLevel to be able to track the query/reply timestamp ? +1 In addition some mgmt info in all objects - how many requests were served with each worker ( a simple ++ ), total/average time, number of errors, etc. Some may be enabled by default ( counters have minimal impact on perf. ), some with config ( if it requires calling system methods, like get time, etc ). getProperty() in each jk2 object is supposed to allow easy access to this information from the status worker or other means. Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6123] - refreshing problem with jsp:include tag
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=6123. 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=6123 refreshing problem with jsp:include tag [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 18:39 --- I did what you did and everything seemed to work as expected, i.e. the change in border.jsp was reflected in both index.jsp and table.jsp. Are you sure you didn't use a include directive in your index.jsp instead? Please reopen this but if you still have problems. Attach a war file so that I can verify the problme. Thnaks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6196] - jsp:forward should trigger IllegalStateException when buffer flushed
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=6196. 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=6196 jsp:forward should trigger IllegalStateException when buffer flushed [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 18:55 --- I tried your two line program and actually got a nice error message: java.io.IOException: Error: Attempt to clear a buffer that's already been flushed at org.apache.jasper.runtime.JspWriterImpl.clear(JspWriterImpl.java:180) at org.apache.jsp.b6196$jsp._jspService(b6196$jsp.java:67) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) ... The exception came from from the statement out.clear(); which was generated before the actual forward action. I am using the nightly build of the head branch. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6196] - jsp:forward should trigger IllegalStateException when buffer flushed
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=6196. 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=6196 jsp:forward should trigger IllegalStateException when buffer flushed --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 19:20 --- Yes, that's it : it throws java.io.IOException, but should throw IllegalStateException according to the spec. (see JSP Spec par 4.5). JFH -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6858] New: - Easy Significant Performance Improvement
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=6858. 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=6858 Easy Significant Performance Improvement Summary: Easy Significant Performance Improvement Product: Tomcat 4 Version: 4.0.1 Final Platform: All OS/Version: Windows NT/2K Status: NEW Severity: Enhancement Priority: Other Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] We have been doing some profiling of our struts application with tomcat 4.0.1. Our application is tag-heavy (we use tags everywhere). When profiling our application we noticed a significant amount of time was being spent in the creation of BodyContentImpl. (Using OptimizeIt, it reported %55.00 of our total cpu time was being spent in the constructor!!) Looking into this furtherthe generated code for a jsp tag appears to construct these indirectly through pageContext.pushBody() and throw them away after the page is rendered. The BIG problem was that for each BodyContentImpl created, a default char buffer of 8K is created. This is MUCH bigger than it needs to be, at least for our struts applications. Most of our tags only output a few characters. On a hunch, I changed the constructor for BodyContentImpl to allocate the starting buffer at 512 bytes. The results were dramatic! We profiled the application again, the application spent (.74%) of its time in the constructor! Thats a 74X difference. This problem was much more pronounced using Sun's Server Hotspot JVM and turning on the -verbocegc showed us that we were spending a large amount of our time in garbage collects. Some of them were 12+ seconds!!! ouch. Why? I suspect the large volume of garbage is confusing the garbage collector. We reverted back to the orginal 8K buffer and attempted to play with the Hotspot tuning parameters and we got better performance but it STILL took an unacceptable amount of time to garbage collectWe were getting full GCs each time and some of them were still taking 6 secs. Once we added my hack in for 512 byteswe saw normal behavior from the garbage collector: Incremental GCs, most under a second, and a the longest collect was 2 secs. There are two solutions that would fix this problem: a) Pooling : Either pool the BodyContextImpl or the char[] buffers. 0r b) Change the initial buffer size to a more sane value. 512 bytes appeared worked out much better in our application...although our application mainly uses struts and most of the tags output less than 512 bytes. Perhaps 1K might be better? Sorry I don't have the patch utitility readily available, so here is the change that I made: In BodyContentImpl: From this: public class BodyContentImpl extends BodyContent { private char[] cb; protected int bufferSize = Constants.DEFAULT_BUFFER_SIZE; To this: public class BodyContentImpl extends BodyContent { private char[] cb; protected int bufferSize = 512; Thanks Tyler Van Gorder [EMAIL PROTECTED] Landacorp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 4518] - load-on-startup is not working with jsp page.
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=4518. 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=4518 load-on-startup is not working with jsp page. [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | Version|4.0.1 Beta 1|4.0.3 Final --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 20:10 --- It is still not working in the Tomcat 4.0.3 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 4518] - load-on-startup is not working with jsp page.
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=4518. 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=4518 load-on-startup is not working with jsp page. [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 20:26 --- Yes, this is normal, as 4.0.3 = 4.0.2. It is fixed in 4.0.4-b1. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6196] - jsp:forward should trigger IllegalStateException when buffer flushed
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=6196. 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=6196 jsp:forward should trigger IllegalStateException when buffer flushed [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|WORKSFORME | --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 21:27 --- Ooops! I jumped to conclusion without letting my Monday morning coffee take its effect. :) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6709] - Images on protected areas have not Last modified header
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=6709. 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=6709 Images on protected areas have not Last modified header --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 23:28 --- It is a problem for the container to assume that all constrained urls should not be cached by the browser since users sometimes want this behavior in IE. The configurable cache-control option planned by Remy should resolve the issue by allowing users to disable the cache-control header. I was able to get around the problem for now by overwriting the header values in the beginning of my servlet service method since the container has already set the headers before the service method is called. Add the following lines to the beginning of your servlet service method to reenable the browser caching. response.setHeader(Pragma, ); response.setHeader(Cache-Control, ); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6702] - jk_nt_service.exe -i cannot work
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=6702. 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=6702 jk_nt_service.exe -i cannot work --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 23:41 --- This works fine for us here ... Did you at least edit the default wrapper.properties to point to your tomcat and java homes? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6709] - Images on protected areas have not Last modified header
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=6709. 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=6709 Images on protected areas have not Last modified header --- Additional Comments From [EMAIL PROTECTED] 2002-03-04 23:54 --- Regarding Jonathan Pierce's comments. That's what I tried as well. Only, I think you also have to set the expires header as well. That worked for Netscape 6 and Internet Explorer 6, but, not for Netscape 4. i.e. with Netscape 4, if there is an expires header, even if it's blank, it expires the page. Currently, I'm no longer having the problem though (I'm using the 2002-02-28 nightly build). I think Remy put some conditional code in AuthenticatorBase.java so that it only sets those headers if you're not using SSL. i.e. if isSecure() is false. In my case, I am using SSL. So, I'm OK now. Thanks Remy. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 6709] - Images on protected areas have not Last modified header
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=6709. 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=6709 Images on protected areas have not Last modified header --- Additional Comments From [EMAIL PROTECTED] 2002-03-05 00:08 --- I'm using 4.0.4-b1 with SSL and IE browser and I still have the problem unless I add the modification to my servlet that I suggested above. In my case (isSecure is true since I am using the iisapi connector through an SSL connection. I still need the promised configuration option for cache-control to be added. Jonathan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PATCH] change JDBCRealm to add flexibility in table layout
Hi all. I'd like to propose a change to JDBCRealm to allow a little more flexibility in the layout of one's users and roles tables. The current implementation (1.20) assumes the roles table will have a column with the same name and meaning as the username column in the users table. In general, I like to avoid using a column with domain meaning as a primary or foreign key. In particular, doing so makes it difficult to allow a user to change his or her username because that change would then ripple through the db to any other place that uses username as a key, such as the roles table. Instead, my change requires the specification of two additional attributes in server.xml's Realm element when using a JDBCRealm, userPrimaryKeyCol and userForeignKeyCol, but frees one from having to track and propagate username changes. userPrimaryKeyCol is whatever column contains the unique (at least within the user table) identifier of a user; userForeignKeyCol is the column in the roles table that joins to that column. Applications built on the existing implementation of JDBCRealm can continue without a database reorganization. They simply have to specify userPrimaryKeyCol and userForeignKeyCol as having the same value as userNameCol. I tested my changes using Tomcat 4.0.1 and PostgreSQL 7.1.x. I first changed my server.xml to explicitly state that the username column was to be used to join the users and roles tables. Things worked as expected. Then I changed the layout of my db to use different join columns. Again, things worked as expected. Though Tomcat 4.0.1 comes with JDBCRealm 1.19, I didn't have any trouble compiling and running my changes based on 1.20. It appears the only difference between 1.19 and 1.20 is the addition of accessors in the newer version. I generated the patchfile with diff -u version 1.20 my version based on 1.20. thanks john gregg TechArch Consulting Group Minneapolis, MN --- JDBCRealm.java.orig Mon Mar 4 17:26:27 2002 +++ JDBCRealm.java Mon Mar 4 16:25:22 2002 @@ -179,6 +179,18 @@ /** + * The column in userRoleTable that joins it to userTable. + */ +protected String userForeignKeyCol = null; + + +/** + * The column in userTable that joins it to userRoleTable. + */ +protected String userPrimaryKeyCol = null; + + +/** * The string manager for this package. */ protected static final StringManager sm = @@ -297,6 +309,40 @@ } /** + * Returns the column in the user table that joins to the user role table. + * + */ +public String getUserPrimaryKeyCol() { +return userPrimaryKeyCol; +} + +/** + * Sets the column in the user table that joins to the user role table. + * + * @param userPrimaryKeyCol The column name + */ +public void setUserPrimaryKeyCol( String userPrimaryKeyCol ) { +this.userPrimaryKeyCol = userPrimaryKeyCol; +} + +/** + * Returns the column in the user role table that joins to the user table. + * + */ +public String getUserForeignKeyCol() { +return userForeignKeyCol; +} + +/** + * Sets the column in the user role table that joins to the user table. + * + * @param userForeignKeyCol The column name + */ +public void setUserForeignKeyCol( String userForeignKeyCol ) { +this.userForeignKeyCol = userForeignKeyCol; +} + +/** * Return the column in the user table that holds the user's credentials. * */ @@ -441,10 +487,12 @@ // Look up the user's credentials String dbCredentials = null; +String userPrimaryKey = null; PreparedStatement stmt = credentials(dbConnection, username); ResultSet rs = stmt.executeQuery(); while (rs.next()) { dbCredentials = rs.getString(1).trim(); +userPrimaryKey = rs.getString(2).trim(); } rs.close(); if (dbCredentials == null) { @@ -472,7 +520,7 @@ // Accumulate the user's roles ArrayList list = new ArrayList(); -stmt = roles(dbConnection, username); +stmt = roles(dbConnection, userPrimaryKey); rs = stmt.executeQuery(); while (rs.next()) { list.add(rs.getString(1).trim()); @@ -540,6 +588,8 @@ if (preparedCredentials == null) { StringBuffer sb = new StringBuffer(SELECT ); sb.append(userCredCol); +sb.append(, ); +sb.append(userPrimaryKeyCol); sb.append( FROM ); sb.append(userTable); sb.append( WHERE ); @@ -634,14 +684,14 @@ /** * Return a PreparedStatement configured to perform the SELECT required - * to retrieve user roles for the specified username. + * to retrieve user roles for the specified user primary key. * * @param dbConnection The database connection to be used - * @param username Username for which roles
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup ContextConfig.java
craigmcc02/03/04 17:53:12 Modified:catalina/src/share/org/apache/catalina/startup ContextConfig.java Log: Fix a race condition that could cause problems if two contexts are being started simultaneously. The start() method was already synchronized, but this only helps you deal with two attempts to start the *same* app at the same time. The underlying Digester instance would still be incorrectly shared. The symptom was parsing failures on one or both web.xml files -- this would happen rarely during a normal startup when you have lots of virtual hosts, but more often when you hammer on the manager webapp deploying and undeploying applications. Revision ChangesPath 1.59 +129 -134 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java Index: ContextConfig.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- ContextConfig.java20 Feb 2002 03:18:19 - 1.58 +++ ContextConfig.java5 Mar 2002 01:53:11 - 1.59 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v 1.58 2002/02/20 03:18:19 remm Exp $ - * $Revision: 1.58 $ - * $Date: 2002/02/20 03:18:19 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v 1.59 2002/03/05 01:53:11 craigmcc Exp $ + * $Revision: 1.59 $ + * $Date: 2002/03/05 01:53:11 $ * * * @@ -127,7 +127,7 @@ * of that Context, and the associated defined servlets. * * @author Craig R. McClanahan - * @version $Revision: 1.58 $ $Date: 2002/02/20 03:18:19 $ + * @version $Revision: 1.59 $ $Date: 2002/03/05 01:53:11 $ */ public final class ContextConfig @@ -174,14 +174,14 @@ * The codeDigester/code we will use to process tag library * descriptor files. */ -private static Digester tldDigester = null; +private static Digester tldDigester = createTldDigester(); /** * The codeDigester/code we will use to process web application * deployment descriptor files. */ -private static Digester webDigester = null; +private static Digester webDigester = createWebDigester(); // - Properties @@ -261,29 +261,30 @@ } // Process the application web.xml file -try { -Digester digester = createWebDigester(); -digester.setDebug(getDebug()); -synchronized (digester) { -if (context instanceof StandardContext) -((StandardContext) context).setReplaceWelcomeFiles(true); -digester.push(context); -digester.parse(stream); -} -} catch (SAXParseException e) { -log(sm.getString(contextConfig.applicationParse), e); -log(sm.getString(contextConfig.applicationPosition, - + e.getLineNumber(), - + e.getColumnNumber())); -ok = false; -} catch (Exception e) { -log(sm.getString(contextConfig.applicationParse), e); -ok = false; -} finally { +synchronized (webDigester) { try { -stream.close(); -} catch (IOException e) { -log(sm.getString(contextConfig.applicationClose), e); +webDigester.setDebug(getDebug()); +if (context instanceof StandardContext) { +((StandardContext) context).setReplaceWelcomeFiles(true); +} +webDigester.clear(); +webDigester.push(context); +webDigester.parse(stream); +} catch (SAXParseException e) { +log(sm.getString(contextConfig.applicationParse), e); +log(sm.getString(contextConfig.applicationPosition, + + e.getLineNumber(), + + e.getColumnNumber())); +ok = false; +} catch (Exception e) { +log(sm.getString(contextConfig.applicationParse), e); +ok = false; +} finally { +try { +stream.close(); +} catch (IOException e) { +log(sm.getString(contextConfig.applicationClose), e); +} } } @@ -431,22 +432,18
cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config host.xml
craigmcc02/03/04 17:55:03 Modified:catalina/src/share/org/apache/catalina/startup HostConfig.java webapps/tomcat-docs/config host.xml Log: Separate the concepts of autoDeploy of applications in the appBase subdirectory from the concept of liveDeploy (checking for new apps in a background thread while Tomcat is running). These can now be configured separately in the Host element. Default for both properties is true to mirror the previous behavior. Submitted by: Glenn Nielsen [EMAIL PROTECTED] Revision ChangesPath 1.18 +45 -10 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java Index: HostConfig.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- HostConfig.java 1 Mar 2002 03:04:44 - 1.17 +++ HostConfig.java 5 Mar 2002 01:55:02 - 1.18 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v 1.17 2002/03/01 03:04:44 craigmcc Exp $ - * $Revision: 1.17 $ - * $Date: 2002/03/01 03:04:44 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v 1.18 2002/03/05 01:55:02 craigmcc Exp $ + * $Revision: 1.18 $ + * $Date: 2002/03/05 01:55:02 $ * * * @@ -102,7 +102,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.17 $ $Date: 2002/03/01 03:04:44 $ + * @version $Revision: 1.18 $ $Date: 2002/03/05 01:55:02 $ */ public class HostConfig @@ -157,6 +157,13 @@ /** + * Should we monitor the codeappBase/code directory for new + * applications and automatically deploy them? + */ +private boolean liveDeploy = false; + + +/** * The background thread. */ private Thread thread = null; @@ -258,6 +265,28 @@ /** + * Return the live deploy flag for this component. + */ +public boolean isLiveDeploy() { + +return (this.liveDeploy); + +} + + +/** + * Set the live deploy flag for this component. + * + * @param liveDeploy The new live deploy flag + */ +public void setLiveDeploy(boolean liveDeploy) { + +this.liveDeploy = liveDeploy; + +} + + +/** * Return the unpack WARs flag. */ public boolean isUnpackWARs() { @@ -297,6 +326,7 @@ if (hostDebug this.debug) { this.debug = hostDebug; } +setLiveDeploy(((StandardHost) host).getLiveDeploy()); setUnpackWARs(((StandardHost) host).isUnpackWARs()); } } catch (ClassCastException e) { @@ -746,7 +776,13 @@ if (debug = 1) log(sm.getString(hostConfig.start)); -threadStart(); +if (host.getAutoDeploy()) { +deployApps(); +} + +if (isLiveDeploy()) { +threadStart(); +} } @@ -869,15 +905,14 @@ // Loop until the termination semaphore is set while (!threadDone) { +// Wait for our check interval +threadSleep(); + // Deploy apps if the Host allows auto deploying -if (host.getAutoDeploy()) -deployApps(); +deployApps(); // Check for web.xml modification checkWebXmlLastModified(); - -// Wait for our check interval -threadSleep(); } 1.11 +14 -8 jakarta-tomcat-4.0/webapps/tomcat-docs/config/host.xml Index: host.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/host.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- host.xml 2 Mar 2002 16:38:58 - 1.10 +++ host.xml 5 Mar 2002 01:55:03 - 1.11 @@ -126,6 +126,14 @@ will be used by default./p /attribute + attribute name=liveDeploy required=false +pThis flag value indicates if new web applications, dropped in to +the codeappBase/code directory while Tomcat is running, should +be automatically deployed. The flag's value defaults to true. See +a href=#Automatic Application DeploymentAutomatic Application +Deployment/a for more information./p + /attribute + attribute name=unpackWARs
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardHost.java
craigmcc02/03/04 18:01:03 Modified:catalina/src/share/org/apache/catalina/core StandardHost.java Log: Forgot one updated file for the liveDeploy update. Revision ChangesPath 1.25 +40 -5 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java Index: StandardHost.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- StandardHost.java 28 Feb 2002 17:20:56 - 1.24 +++ StandardHost.java 5 Mar 2002 02:01:02 - 1.25 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v 1.24 2002/02/28 17:20:56 glenn Exp $ - * $Revision: 1.24 $ - * $Date: 2002/02/28 17:20:56 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v 1.25 2002/03/05 02:01:02 craigmcc Exp $ + * $Revision: 1.25 $ + * $Date: 2002/03/05 02:01:02 $ * * * @@ -95,7 +95,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.24 $ $Date: 2002/02/28 17:20:56 $ + * @version $Revision: 1.25 $ $Date: 2002/03/05 02:01:02 $ */ public class StandardHost @@ -177,6 +177,12 @@ /** + * The live deploy flag for this Host. + */ +private boolean liveDeploy = true; + + +/** * The Java class name of the default Mapper class for this Container. */ private String mapperClass = @@ -233,7 +239,7 @@ /** * Return the value of the auto deploy flag. If true, it indicates that * this host's child webapps should be discovred and automatically - * deployed. + * deployed at startup time. */ public boolean getAutoDeploy() { @@ -323,6 +329,35 @@ this.contextClass = contextClass; support.firePropertyChange(contextClass, oldContextClass, this.contextClass); + +} + + +/** + * Return the value of the live deploy flag. If true, it indicates that + * a background thread should be started that looks for web application + * context files, WAR files, or unpacked directories being dropped in to + * the codeappBase/code directory, and deploys new ones as they are + * encountered. + */ +public boolean getLiveDeploy() { + +return (this.liveDeploy); + +} + + +/** + * Set the live deploy flag value for this host. + * + * @param liveDeploy The new live deploy flag + */ +public void setLiveDeploy(boolean liveDeploy) { + +boolean oldLiveDeploy = this.liveDeploy; +this.liveDeploy = liveDeploy; +support.firePropertyChange(liveDeploy, oldLiveDeploy, + this.liveDeploy); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]