Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus .
Ich werde ab 08.10.2005 nicht im Büro sein. Ich kehre zurück am 12.10.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Jäkel ([EMAIL PROTECTED]). Herr Jäkelhat die Rufnummer 0571/93425-12) In ganz eiligen Angelegenheiten hinterlassen Sie bitte eine Nachricht auf meiner Mobilbox unter der Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus .
Ich werde ab 05.10.2005 nicht im Büro sein. Ich kehre zurück am 07.10.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Jäkel ([EMAIL PROTECTED]). Herr Jäkelhat die Rufnummer 0571/93425-12) In ganz eiligen Angelegenheiten hinterlassen Sie bitte eine Nachricht auf meiner Mobilbox unter der Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus .
Ich werde ab 22.09.2005 nicht im Büro sein. Ich kehre zurück am 26.09.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Jäkel ([EMAIL PROTECTED]). Herr Jäkelhat die Rufnummer 0571/93425-12) In ganz eiligen Angelegenheiten hinterlassen Sie bitte eine Nachricht auf meiner Mobilbox unter der Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus .
Ich werde ab 16.09.2005 nicht im Büro sein. Ich kehre zurück am 20.09.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Bagehorn ([EMAIL PROTECTED]). Herr Bagehorn hat die Rufnummer 0571/93425-80) In ganz dringenden Fällen hinterlassen Sie bitte eine Nachricht auf meiner Mobilbox unter der Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus .
Ich werde ab 19.08.2005 nicht im Büro sein. Ich kehre zurück am 31.08.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Bagehorn ([EMAIL PROTECTED]). Herr Bagehorn hat die Rufnummer 0571/93425-80) In ganz dringenden Fällen hinterlassen Sie bitte eine Nachricht auf meiner Mobilbox unter der Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus .
Ich werde ab 08.08.2005 nicht im Büro sein. Ich kehre zurück am 10.08.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Bagehorn ([EMAIL PROTECTED]). Herr Bagehorn hat die Rufnummer 0571/93425-80) Alternativ erreichen Sie mich auch über die Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus .
Ich werde ab 29.07.2005 nicht im Büro sein. Ich kehre zurück am 01.08.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Bagehorn ([EMAIL PROTECTED]). Herr Bagehorn hat die Rufnummer 0571/93425-80) Alternativ erreichen Sie mich auch über die Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus .
Ich werde ab 27.07.2005 nicht im Büro sein. Ich kehre zurück am 28.07.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Bagehorn ([EMAIL PROTECTED]). Herr Bagehorn hat die Rufnummer 0571/93425-80) Alternativ erreichen Sie mich auch über die Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus .
Ich werde ab 22.07.2005 nicht im Büro sein. Ich kehre zurück am 26.07.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Bagehorn ([EMAIL PROTECTED]). Herr Bagehorn hat die Rufnummer 0571/93425-80) Alternativ erreichen Sie mich auch über die Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus .
Ich werde ab 25.06.2005 nicht im Büro sein. Ich kehre zurück am 11.07.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Bagehorn ([EMAIL PROTECTED]). Herr Bagehorn hat die Rufnummer 0571/93425-80) Alternativ erreichen Sie mich auch über die Funk-Rufnummer: 0171/99 33 525.
Re: Finding Server URL?
Maybe InetAddress can help you? On 6/23/05, Brad Johanson [EMAIL PROTECTED] wrote: The problem I'm running into is how the singleton can find the root URL/server URL (and port) for the Tomcat server in which it is running (for example, http://167.7.9.95:8080 or http://www.foo-co.com). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jsp:include forwarding from included resource, revisited
Hi, guys! I am bothering you again with my JSP include/forward/redirect problem. I am not able to comment on JSP53 spec, so I thought that since Tomcat is reference implementation of JSP, then you guys may have some influence on JSP standard. To recap, my problem is that I have a resource, included in JSP page. The included resource (in my case a struts action, but can be a servlet) performs forward (or redirect, or redirect and then forward), to a location with actual content (currently, JSP page). The problem I am having is that response stream is closed after my included resource is processed, and the rest part of parent page is not processed. I was pointed to the spec: JSP version 2.4, section 8.4 reads: Before the forward method of the RequestDispatcher interface returns, the response content must be sent and committed, and closed by the servlet container. I want it to be changed to something like this: Before the forward method of the RequestDispatcher interface returns, the response content must be sent and committed, and closed by the servlet container, UNLESS REQUEST TO FORWARD METHOD WAS NOT INCLUDED INTO ANOTHER REQUEST. Here is the reason: I want to be able to create components in JSP using jsp:include. I want to be able to jsp:include serlvets or Struts actions or other request-processing modules, which then would forward to (or redirect to) actual content - a result page, which would become a piece in the main page. I cannot apply clean MVC model within current JSP standard: resource that I include, must generate output itself. This is against good style and brings us back to dark ages of web programming. If anyone from this group had a chance to bring attention of JSR53 members to this issue, I would be glad to hear about the progress. Thanks, Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus.
Ich werde ab 21.05.2005 nicht im Büro sein. Ich kehre zurück am 30.05.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Bagehorn ([EMAIL PROTECTED]). Herr Bagehorn hat die Rufnummer 0571/93425-80) Ab Montag, den 23.05.2005 erreichen Sie mich auch über die Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus.
Ich werde ab 10.05.2005 nicht im Büro sein. Ich kehre zurück am 12.05.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Bagehorn ([EMAIL PROTECTED]). Herr Bagehorn hat die Rufnummer 0571/93425-80) Am Montag und Dienstag, den 02.05- 03.05.2005 erreichen Sie mich auch über die Funk-Rufnummer: 0171/99 33 525.
Michael Bünermann/HBF/Minden/kampa/DE ist außer Haus.
Ich werde ab 04.05.2005 nicht im Büro sein. Ich kehre zurück am 09.05.2005. Ich werde Ihre Nachricht nach meiner Rückkehr beantworten. In dringenden Fällen wenden Sie sich bitte Herrn Bagehorn ([EMAIL PROTECTED]). Herr Bagehorn hat die Rufnummer 0571/93425-80) Am Montag und Dienstag, den 02.05- 03.05.2005 erreichen Sie mich auch über die Funk-Rufnummer: 0171/99 33 525.
newbie help with building Tomcat
Hello, I'm having problems trying to get to the Apache CVS server. I'm using XP Pro. I think my problem my problem is occurring because I am behind a corporate firewall. Can CVS work behind a firewall, through a proxy server? Can someone help me with what settings I need to use. I did create a build.properties file, and put the correct lines to use a proxy server. Why do I need to have access to the CVS server for building Tomcat? I downloaded the source file jakarta-tomcat-5.5.9-src.zip. But it seems that I still need to be able to connect back up to the Apache server for building the source, why? Does the source file not contain all the sources, or is the reason to make sure I have the latest files? Any help provided will be very much appreciated. Thanks, -Mike *** D:\tomcat-buildcvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login Logging in to :pserver:[EMAIL PROTECTED]:2401/home/cvspublic CVS password: Unknown host cvs.apache.org. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Cluster + File Sharing
My post to the user list didn't get any response. I'm thinking the developers might provide a little more feedback. I'm just looking for a sanity check. I'd like to cluster multiple Tomcat instances to share the same file system (a NetApp). I'm thinking something like a master/slaves type architecture where the master deploys wars compiles JSP, etc and the slaves just read and execute. I'm picturing the architecture implemented by the use of two server.xml files (e.g. masterServer.xml and slaveServer.xml). However, before I dig too deep into it, I would just like to get any feedback on the idea. Any info is greatly appreciated; at the least maybe point me to some docs that discuss the idea. Thanks, --Mike M.
RE: Tomcat Cluster + File Sharing
Am I posting this question to the wrong groups or a little too impatient? Any feedback is greatly appreciated. -Original Message- From: Michael Marrotte [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 12, 2005 10:01 AM To: tomcat-dev@jakarta.apache.org Subject: Tomcat Cluster + File Sharing My post to the user list didn't get any response. I'm thinking the developers might provide a little more feedback. I'm just looking for a sanity check. I'd like to cluster multiple Tomcat instances to share the same file system (a NetApp). I'm thinking something like a master/slaves type architecture where the master deploys wars compiles JSP, etc and the slaves just read and execute. I'm picturing the architecture implemented by the use of two server.xml files (e.g. masterServer.xml and slaveServer.xml). However, before I dig too deep into it, I would just like to get any feedback on the idea. Any info is greatly appreciated; at the least maybe point me to some docs that discuss the idea. Thanks, --Mike M. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Indirect jsp:include does not seem to work
Hello all, I have master jsp page, and I try to jsp:include page=/strutsAction.do, which forwards to detail jsp page, but this does not work. On Tomcat 4.x and 5.x the detail page content is included, but further content from the master page is stripped out. According to jsp specs, if I include a resource with jsp:include, its content should be included in the page. Afaik the spec does not specify nesting level. I looked in the code. ApplicationDispatcher correctly identifies the first request to strutsAction.do as Path Based Include. But when struts action forwards to detail jsp, ApplicationDispatcher identifies it as Path Based Forward. doForward() is called instead of doInclude(), and ApplicationDispatcher flushes and closes the response writer. Thus, Jasper cannot write the rest of master page content to writer, and throws org.apache.jasper.JasperException: Stream closed. Without thinking much, I commented out writer flushing in ApplicationDispatcher.doForward(). It seems to work on Tomcat 4.1.31, but failed on Tomcat 5.0. Anyway, I am not sure that I did a right thing and that all buffers are properly being closed now. Would be great if Tomcat devs look into it. Btw, Jetty does not work as I want, too. BUT: I tried to create a proxy JSP page, which is included in main JSP page. This proxy page includes strutsAction.do, which forwards to real JSP page that I want to include (whew!) Jetty works perfectly fine with this proxy JSP page! Also, Resin works fine both with direct including of struts action from main page, and with proxy JSP page. So, I believe that this is a Tomcat bug. Thanks, Michael Jouravlev. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Indirect jsp:include does not work
I found bug #21440 in ASF bug database which looks awful like the one I have. It was entered in July, 2003 and is still not resolved. Tomcat devs considered against attempting to fix this bug (if confirmed it is actually one) in 4.1.x. and that its severity 'minor', since this is a corner case that should not occur often. I am sorry, this is not the corner case. I need this functionality. And considering that my hosting provider uses Tomcat 4.x, I might be able to persuade him to use a patch, if it were available. My provider does not have intentions to switch to Tomcat 5 now (which has this bug too, by the way). Resin works, and Jetty works with a proxy JSP page. So, for development I can use other servlet containers, but I need Tomcat to be patched for production, including 4.x (at least 4.1.x). I tested my app on 4.0.6, 4.1.31 and 5.0.28, it did not work. Thank you, Michael. I have master jsp page, and I try to jsp:include page=/strutsAction.do, which forwards to detail jsp page, but this does not work. On Tomcat 4.x and 5.x the detail page content is included, but further content from the master page is stripped out. According to jsp specs, if I include a resource with jsp:include, its content should be included in the page. Afaik the spec does not specify nesting level. [skipped] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Indirect jsp:include does not seem to work
Here is what I found at: http://java.sun.com/products/jsp/syntax/1.2/syntaxref1214.html#8828 The jsp:include element allows you to include either a static or dynamic resource in a JSP page. The results of including static and dynamic resources are quite different. If the resource is static, its content is included in the calling JSP page. If the resource is dynamic, it acts on a request and sends back a result that is included in the JSP page. When the include action is finished, the JSP container continues processing the remainder of the JSP page. So, what I am doing is perfectly legitimate. I include a dynamic resource (spec does not clarify the type of resource or its nesting level). It should return result, to be included in the main page. And JSP container continues processing the remainder of the JSP page, which Tomcat does not do. It is a bug. Resin works exactly as I expect, and Jetty works too with a proxy JSP page. I have not tried other servers yet. Thank you, Michael. On Apr 1, 2005 10:39 AM, Tim Funk [EMAIL PROTECTED] wrote: You cannot perform a forward inside an include. [Just like you can't set any headers, including cookies, in an include or a host of other things while in an include.] -Tim Michael J. wrote: Hello all, I have master jsp page, and I try to jsp:include page=/strutsAction.do, which forwards to detail jsp page, but this does not work. On Tomcat 4.x and 5.x the detail page content is included, but further content from the master page is stripped out. According to jsp specs, if I include a resource with jsp:include, its content should be included in the page. Afaik the spec does not specify nesting level. I looked in the code. ApplicationDispatcher correctly identifies the first request to strutsAction.do as Path Based Include. But when struts action forwards to detail jsp, ApplicationDispatcher identifies it as Path Based Forward. doForward() is called instead of doInclude(), and ApplicationDispatcher flushes and closes the response writer. Thus, Jasper cannot write the rest of master page content to writer, and throws org.apache.jasper.JasperException: Stream closed. Without thinking much, I commented out writer flushing in ApplicationDispatcher.doForward(). It seems to work on Tomcat 4.1.31, but failed on Tomcat 5.0. Anyway, I am not sure that I did a right thing and that all buffers are properly being closed now. Would be great if Tomcat devs look into it. Btw, Jetty does not work as I want, too. BUT: I tried to create a proxy JSP page, which is included in main JSP page. This proxy page includes strutsAction.do, which forwards to real JSP page that I want to include (whew!) Jetty works perfectly fine with this proxy JSP page! Also, Resin works fine both with direct including of struts action from main page, and with proxy JSP page. So, I believe that this is a Tomcat bug. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Indirect jsp:include does not seem to work
A syntax reference is not the same as a specification. Specifications are (supposedly) more rigorous and more precise in their specification of required behaviour. Tomcat is the reference implementation for the Servlet and JSP specifications. It might be helpful if everybody who is interested in this discussion could please read [spec list skipped] I will read the specs, but I am having a deja vu: California Driver's Handbook is for drivers, who don't know how to drive anyway. It is just a funny comics pamphlet. California Vehicle Code is a real thing for cops, and contains all the proper rules. spec-quote version=2.4 section=8.4 Before the forward method of the RequestDispatcher interface returns, the response content must be sent and committed, and closed by the servlet container. /spec-quote Frankly speaking, as a user I don't care about dispatchers, responses and containers. I just want to include a _resource_, which is allowed according to Sun's quick reference card for JSP 1.2. Ok, Sun apparently is screwed up, mixing the requirements, but it should not be my problem, because its syntax reference card works for me :) I want my problem to be solved. And this works in other containers. I understand that Tomcat has to go by the real spec, not by the comics book. Then, in this case spec should be updated. This functionality is important to me. And currently I cannot implement it on Tomcat without a... er... patch, which I did myself and which can break something else. So I would prefer a real fix from Tomcat pros. The language for the 2.3 spec is similar. Bottom line: Resin is wrong ;-). Wrong or not, it works great for me. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Log rotation
Because it has never been answered yet, at least not in a way I can understand. Or do you mean something else like your getting it repeated. -Original Message- From: Sweet Brandalynn [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 11:58 PM To: tomcat-dev@jakarta.apache.org Subject: Re: Log rotation Why Do I Keep Getting This E Mail? --- [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have read several threads about rotating logs in tomcat, however they don't seem to cover all of the logs nor do they work when running as a windows service. So my question: Is / has anyone considering actually making the loggers in tomcat rotatable and limit number / size of them? Or am I just totally misreading the archives. I do see where the logger / valve combo for access is creating multiple logs yet you can't limit them by size or number. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = :kisses: Brandalynn www.sweetbrandalynn.com __ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Log rotation
Ya, next time I will actually read who sent the email before responding... -Original Message- From: Sue Spence [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 11, 2005 9:51 AM To: Tomcat Developers List Subject: Re: Log rotation Earlier, I wondered if Sweet Brandalynn was trolling for lonely geeks, or just inadvertently found herself* on this list via some sort of cack-handed porno spam harvester/autoresponder malfunction. I have now decided to believe it is the latter, because the idea of a spammer whining about getting email they didn't want to receive is strangely satisfying. *assuming that it's a woman Ash, Michael L wrote: Because it has never been answered yet, at least not in a way I can understand. Or do you mean something else like your getting it repeated. -Original Message- From: Sweet Brandalynn [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 11:58 PM To: tomcat-dev@jakarta.apache.org Subject: Re: Log rotation Why Do I Keep Getting This E Mail? --- [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have read several threads about rotating logs in tomcat, however they don't seem to cover all of the logs nor do they work when running as a windows service. So my question: Is / has anyone considering actually making the loggers in tomcat rotatable and limit number / size of them? Or am I just totally misreading the archives. I do see where the logger / valve combo for access is creating multiple logs yet you can't limit them by size or number. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = :kisses: Brandalynn www.sweetbrandalynn.com __ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Log rotation
I have read several threads about rotating logs in tomcat, however they don't seem to cover all of the logs nor do they work when running as a windows service. So my question: Is / has anyone considering actually making the loggers in tomcat rotatable and limit number / size of them? Or am I just totally misreading the archives. I do see where the logger / valve combo for access is creating multiple logs yet you can't limit them by size or number. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache2 + mod_jk2 on FreeBSD - default socket timeout (bug?)
Hi there, I've got a problem with mod_jk2 and Apache2 under FreeBSD 5.x and I think it is a bug. I configured mod_jk2 for two Tomcat 5.0 servers. If one of these machines is down (unplugging the network cable), mod_jk2 should send all requests to the server that kept running. That is working 90 percent of the time, but sometimes forwarding the request takes about 75 seconds. I found out that this is the default socket timeout of FreeBSD. The problem is that I configured mod-jk2 the way, that it has its own timeout for connecting (see attached workers2.properties). But this value is not recognized. If I decrease the default connect timeout for FreeBSD (by /etc/sysctl.conf), mod_jk2 will use this value and everything is fine. But I don't want to decrease that value, it could cause other problems. So I think it is a bug, that mod_jk2 is not using the timeout values from its workers2.properties in FreeBSD. Btw exactly the same setup for Apache2 and mod_jk2 works fine on Linux. Regards, Michael -- [logger] level=DEBUG [shm] file=/tmp/shmFile # Defines a load balancer named lb. [lb:lb] [workerEnv:] info=Global server options timing=1 # Example socket channel, override port and host. [channel.socket:192.168.1.124:8009] tomcatId=camenzind timeout=1 # Example socket channel, override port and host. [channel.socket:192.168.1.123:8009] tomcatId=haller timeout=1 # define the worker 1 [ajp13:192.168.1.124:8009] channel=channel.socket:192.168.1.124:8009 # define the worker 2 [ajp13:192.168.1.123:8009] channel=channel.socket:192.168.1.123:8009 # Mapping my URI to Tomcats [uri:/myURI*] group=lb [status:] info=Status worker, displays runtime information [uri:/jkstatus/*] info=The Tomcat /jkstatus handler group=status: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.io.tempdir Problems
I hope this is Tomcat related. If not, please accept my apologies, and give me direction. I have removed from my Tomcat 5 (Struts 1.2 using a custom taglib) service the java.io.tempdir setting because when I use the following code: File file = new File(Classpath.WEB_INF + resource+ File.separator + content_type+ File.separator + ttf + File.separator + physicalName); FileInputStream fontStream = new FileInputStream(file); Font font = Font.createFont(Font.TRUETYPE_FONT,fontStream); font = font.deriveFont(attributes); fontStream.close(); I get temp files of around 50 - 150 kilobytes each written to the temp directory. I requested assistance on Tomcat User without an answer. Anyway, I assume that there may be a concurrency issue of somekind. Is that right? Anyone with any assistance out there? Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get context realm from servlet and filter.
Yoav, Re. There's almost no conceivable good use-case for needing the actual Realm object in your webapp., here is one: We receive requests from a dumb Windows client application (no SOAP, simple stupid proprietary XML format in HTTP) that sends a uid/pwd somehwere inside the POST payload, not even as BASIC, and so have to validate that... how would you do that? Agree that container-specific code should be avoided inside applications unless absolutely necessary - and on other containers that's easy, because you can use the JAAS API to authenticate uid/pwd from within a web application, e.g. both WebLogic or WebSphere have built-in JAAS LoginModule implementations which forward to whatever they call a realm. On Tomcat however that JAAS approach is not so far possible. See also my post yesterday Authenticate against realm in web app: JAAS TomcatRealmProxyLoginModule? (WAS: The good way of making JAAS and Realm authentication use the same back-end authentication system?). Thanks, Michael PS: Thanks for code snippet, we'll see if that helps us to write a better TomcatRealmProxyLoginModule, taking a context name as configuration parameter. Shapira, Yoav wrote: Hi, I've posted this a number of times in the past on the list, so you can STFA. To summarize, you'd do something like this (most of these classes are in the org.apache.catalina package): Server server = ServerFactory.getServer(); Service service = server.findService(Catalina); Engine engine = (Engine) service.getContainer(); Host host = (Host) engine.findChild(engine.getDefaultHost()); Context context = (Context) host.findChild(myContext); Realm realm = context.getRealm(); I'm using the default service name of Catalina above: it should match what's in your server.xml. I'm also using myContext as a dummy: obviously that should match your webapp name. And finally, I'm getting the Realm from the context, because that's what you asked for, but in reality the Realm (or another realm) may be associated with the Host or Engine as well. So take the above code and modify it to your needs. As always, I caution you and everyone else to not use Tomcat-specific (or container-specific in general) code unless absolutely necessary. Make your app as portable as possible. There's almost no conceivable good use-case for needing the actual Realm object in your webapp. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Chris Forbis [mailto:[EMAIL PROTECTED] Sent: Thursday, October 14, 2004 11:02 AM To: Tomcat Developers List Subject: Re: How to get context realm from servlet and filter. Quick follow-up to your post. I understand what you are saying. But I am not sure how to get access to the Container, can you point me in the correct direction? Thanks! On Thu, 14 Oct 2004 08:43:23 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, A Realm is associated with a Container, not necessarily a Context, so the method is appropriately placed in the Container interface, a parent of the Context interface. Obviously all this is not part of the Servlet API, so you'll have to write Tomcat-specific code to get it. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Chris Forbis [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 6:24 PM To: tomcat-dev Subject: How to get context realm from servlet and filter. I am trying to get the current contexts realms from a servlet (and maybe a filter). I do not see a getContext().getRealm() method. So I am guessing there is another way to get to this, but I do not see it. Can any one provide some quick direction to me on this. Thank you! Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied
Re: java.io.tempdir Problems
Martin Gainty wrote: Michael createTempFile employs 3 steps algorithm to locate/create tempDir 1) Attempt to retrieve the value of javax.servlet.context.tempdir from the ServletContext 2) If that's not found, attempt to retrieve the value of the init-parameter tempDir 3) If that's not found, default to the system-wide temp directory specified by the system property java.io.tempdir A)what is the value of javax.servlet.context.tempdir from the ServletContext? B)what is the value of the init-parameter tempDir? Martin- - Original Message - From: Michael McGrady [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Thursday, October 14, 2004 3:16 AM Subject: java.io.tempdir Problems I hope this is Tomcat related. If not, please accept my apologies, and give me direction. I have removed from my Tomcat 5 (Struts 1.2 using a custom taglib) service the java.io.tempdir setting because when I use the following code: File file = new File(Classpath.WEB_INF + resource+ File.separator + content_type+ File.separator + ttf + File.separator + physicalName); FileInputStream fontStream = new FileInputStream(file); Font font = Font.createFont(Font.TRUETYPE_FONT,fontStream); font = font.deriveFont(attributes); fontStream.close(); I get temp files of around 50 - 150 kilobytes each written to the temp directory. I requested assistance on Tomcat User without an answer. Anyway, I assume that there may be a concurrency issue of somekind. Is that right? Anyone with any assistance out there? Michael McGrady Martin, First, thanks for responding. Second, the entirety of the startup code setting my java.io.tempdir system property is after this note, but the value of the property is %CATALINA_HOME%\temp. The value of javax.servlet.context.tempdir is C:\crackwillow\work\Catalina\localhost\_ . Following the knowledge I gleaned from your question and specifications, I reset things in a plugin, and I now have the values at runtime of: javax.servlet.context.tempdir = C:\crackwillow\work\Catalina\localhost\_ -Djava.io.tempdir = C:/crackwillow/temp java.io.tempdir = C:/crackwillow/temp Prior to doing this, my values for both -Djava.io.tempdir and java.io.tempdir were null. I have kept the value of the java.io.tempdir in my at C:/crackwillow/temp. When I run the font program as previously indicated (see above), I still get the tmp files that do not go away. Their names are as follows: +~JF3174.tmp and they run consequtively. What do you think is up? Michael McGrady @echo off if %OS% == Windows_NT setlocal rem --- rem NT Service Install/Uninstall script rem rem Options rem installInstall the service using Tomcat5 as service name. remService is installed using default settings. rem remove Remove the service from the System. rem rem name(optional) If the second argument is present it is considered remto be new service name rem rem $Id: service.bat,v 1.1 2003/12/27 18:56:58 mdsh Exp $ rem --- rem Guess CATALINA_HOME if not defined set CURRENT_DIR=%cd% if not %CATALINA_HOME% == goto gotHome set CATALINA_HOME=%cd% if exist %CATALINA_HOME%\bin\tomcat.exe goto okHome rem CD to the upper dir cd .. set CATALINA_HOME=%cd% :gotHome if exist %CATALINA_HOME%\bin\tomcat.exe goto okHome echo The tomcat.exe was not found... echo The CATALINA_HOME environment variable is not defined correctly. echo This environment variable is needed to run this program goto end :okHome set EXECUTABLE=%CATALINA_HOME%\bin\tomcat.exe rem Set default Service name set SERVICE_NAME=Tomcat5 if %1 == goto displayUsage if %2 == goto setServiceName set SERVICE_NAME=%2 :setServiceName if %1 == install goto doInstall if %1 == remove goto doRemove echo Unknown parameter %1 :displayUsage echo echo Usage: service.bat install/remove [service_name] goto end :doRemove rem Remove the service %EXECUTABLE% //DS//%SERVICE_NAME% echo The service '%SERVICE_NAME%' has been removed goto end :doInstall rem Install the service %EXECUTABLE% //IS//%SERVICE_NAME% --DisplayName Apache Tomcat --Description Apache Tomcat Server - http://jakarta.apache.org/tomcat/; %EXECUTABLE% //US//%SERVICE_NAME% --Install %EXECUTABLE% %EXECUTABLE% //US//%SERVICE_NAME% --ImagePath %JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar %EXECUTABLE% //US//%SERVICE_NAME% --Java %JAVA_HOME%\jre\bin\server\jvm.dll %EXECUTABLE% //US//%SERVICE_NAME% --StartupClass org.apache.catalina.startup.Bootstrap;main;start --ShutdownClass org.apache.catalina.startup.Bootstrap;main;stop --Startup auto rem Set extra parameters %EXECUTABLE% //US//%SERVICE_NAME% --JavaOptions
Re: java.io.tempdir Problems
Martin, Perhaps I should add, Martin, that if I set the environment variables for java.io.tempdir and -Djava.io.tempdir in the application but not in Tomcat startup, I don't have the problem. I am a bit confused about whether to use java.io.tempdir or -Djava.io.tempdir. Can you explain a bit about that? Michael McGrady Martin Gainty wrote: Michael createTempFile employs 3 steps algorithm to locate/create tempDir 1) Attempt to retrieve the value of javax.servlet.context.tempdir from the ServletContext 2) If that's not found, attempt to retrieve the value of the init-parameter tempDir 3) If that's not found, default to the system-wide temp directory specified by the system property java.io.tempdir A)what is the value of javax.servlet.context.tempdir from the ServletContext? B)what is the value of the init-parameter tempDir? Martin- - Original Message - From: Michael McGrady [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Thursday, October 14, 2004 3:16 AM Subject: java.io.tempdir Problems I hope this is Tomcat related. If not, please accept my apologies, and give me direction. I have removed from my Tomcat 5 (Struts 1.2 using a custom taglib) service the java.io.tempdir setting because when I use the following code: File file = new File(Classpath.WEB_INF + resource+ File.separator + content_type+ File.separator + ttf + File.separator + physicalName); FileInputStream fontStream = new FileInputStream(file); Font font = Font.createFont(Font.TRUETYPE_FONT,fontStream); font = font.deriveFont(attributes); fontStream.close(); I get temp files of around 50 - 150 kilobytes each written to the temp directory. I requested assistance on Tomcat User without an answer. Anyway, I assume that there may be a concurrency issue of somekind. Is that right? Anyone with any assistance out there? Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.io.tempdir Problems
Hi, Martin, Did something not come through on this email? I am not following this. Martin Gainty wrote: Good Afternoon Michael Perusing the Manual for Jspc at http://64.233.167.104/search?q=cache:pfbfEPvvvHUJ:www.gefionsoftware.com/Lit eWebServer/lws-jsp/ReferenceManual.pdf+TOMCAT+java.io.tempDir+-Djava.io.temp Dirhl=en formal syntax for the JSPC command jspc [options] -webapp web-app-root-dir Where option -d output-dir specifies The -d output-dir specification is the directory specified by the java.io.tempdir system property I see that there are 2 ways to specify java.io.tempdir System Property Anyone else The directory specified by the java.io.tempdirsystem property The directory specified by the java.io.tempdirsystem property The directory specified by the java.io.tempdirsystem property The directory specified by the java.io.tempdir??? Martin - Original Message - From: Michael McGrady [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Thursday, October 14, 2004 11:46 AM Subject: Re: java.io.tempdir Problems Martin, Perhaps I should add, Martin, that if I set the environment variables for java.io.tempdir and -Djava.io.tempdir in the application but not in Tomcat startup, I don't have the problem. I am a bit confused about whether to use java.io.tempdir or -Djava.io.tempdir. Can you explain a bit about that? Michael McGrady Martin Gainty wrote: Michael createTempFile employs 3 steps algorithm to locate/create tempDir 1) Attempt to retrieve the value of javax.servlet.context.tempdir from the ServletContext 2) If that's not found, attempt to retrieve the value of the init-parameter tempDir 3) If that's not found, default to the system-wide temp directory specified by the system property java.io.tempdir A)what is the value of javax.servlet.context.tempdir from the ServletContext? B)what is the value of the init-parameter tempDir? Martin- - Original Message - From: Michael McGrady [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Thursday, October 14, 2004 3:16 AM Subject: java.io.tempdir Problems I hope this is Tomcat related. If not, please accept my apologies, and give me direction. I have removed from my Tomcat 5 (Struts 1.2 using a custom taglib) service the java.io.tempdir setting because when I use the following code: File file = new File(Classpath.WEB_INF + resource+ File.separator + content_type+ File.separator + ttf + File.separator + physicalName); FileInputStream fontStream = new FileInputStream(file); Font font = Font.createFont(Font.TRUETYPE_FONT,fontStream); font = font.deriveFont(attributes); fontStream.close(); I get temp files of around 50 - 150 kilobytes each written to the temp directory. I requested assistance on Tomcat User without an answer. Anyway, I assume that there may be a concurrency issue of somekind. Is that right? Anyone with any assistance out there? Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.io.tempdir Problems
I don't know if this is helpful or not, Martin, but if you attempt System.getenv(java.io.tempdir) [which is deprecated], you get as part of the error message getenv no longer supported, use properties and -D instead: java.io.tempdir. Is that helpful? Does the -D there mean as in -Djava.io.tempdir? Michael Martin Gainty wrote: Good Afternoon Michael Perusing the Manual for Jspc at http://64.233.167.104/search?q=cache:pfbfEPvvvHUJ:www.gefionsoftware.com/Lit eWebServer/lws-jsp/ReferenceManual.pdf+TOMCAT+java.io.tempDir+-Djava.io.temp Dirhl=en formal syntax for the JSPC command jspc [options] -webapp web-app-root-dir Where option -d output-dir specifies The -d output-dir specification is the directory specified by the java.io.tempdir system property I see that there are 2 ways to specify java.io.tempdir System Property Anyone else The directory specified by the java.io.tempdirsystem property The directory specified by the java.io.tempdirsystem property The directory specified by the java.io.tempdirsystem property The directory specified by the java.io.tempdir??? Martin - Original Message - From: Michael McGrady [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Thursday, October 14, 2004 11:46 AM Subject: Re: java.io.tempdir Problems Martin, Perhaps I should add, Martin, that if I set the environment variables for java.io.tempdir and -Djava.io.tempdir in the application but not in Tomcat startup, I don't have the problem. I am a bit confused about whether to use java.io.tempdir or -Djava.io.tempdir. Can you explain a bit about that? Michael McGrady Martin Gainty wrote: Michael createTempFile employs 3 steps algorithm to locate/create tempDir 1) Attempt to retrieve the value of javax.servlet.context.tempdir from the ServletContext 2) If that's not found, attempt to retrieve the value of the init-parameter tempDir 3) If that's not found, default to the system-wide temp directory specified by the system property java.io.tempdir A)what is the value of javax.servlet.context.tempdir from the ServletContext? B)what is the value of the init-parameter tempDir? Martin- - Original Message - From: Michael McGrady [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Thursday, October 14, 2004 3:16 AM Subject: java.io.tempdir Problems I hope this is Tomcat related. If not, please accept my apologies, and give me direction. I have removed from my Tomcat 5 (Struts 1.2 using a custom taglib) service the java.io.tempdir setting because when I use the following code: File file = new File(Classpath.WEB_INF + resource+ File.separator + content_type+ File.separator + ttf + File.separator + physicalName); FileInputStream fontStream = new FileInputStream(file); Font font = Font.createFont(Font.TRUETYPE_FONT,fontStream); font = font.deriveFont(attributes); fontStream.close(); I get temp files of around 50 - 150 kilobytes each written to the temp directory. I requested assistance on Tomcat User without an answer. Anyway, I assume that there may be a concurrency issue of somekind. Is that right? Anyone with any assistance out there? Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Authenticate against realm in web app: JAAS TomcatRealmProxyLoginModule? (WAS: The good way of making JAAS and Realm authentication use the same back-end authentication system?)
Hi, How do you authenticate uid/pwd against a Tomcat realm, from within a web application? We have a half-baked JMX-based solution; but it is not satisfactory because we would have to move JARs around because of classloader issues. Whether the code in the web app does this authentication JAAS-based or another way is somewhat irrelevant, although JAAS would seem natural. The main problem really is: How to find the current Tomcat Realm, from within a custom written (easy; done) JAAS LoginModule? If others agree that this would be nice to have, how can we get something like a TomcatRealmProxyLoginModule into Tomcat? More background below, if interested. Thanks a lot, Michael === Background: On e.g. WebLogic or WebSphere, we can use the JAAS API to authenticate uid/pwd from within a web application, because they both have built-in JAAS LoginModule implementations which forward to whatever they call a realm. This is sometimes very useful. (For BEA there is a weblogic.security.auth.login.UsernamePasswordLoginModule; for WebSphere simply using ClientContainer as Application/LoginModuleName when constructing the LoginContext does the trick, it uses their com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy.) On Tomcat, we have not found a clean way to authenticate uid/pwd against a Tomcat realm, from within a web application; unless we miss the obvious? This is an alternative use of JAAS, different from the JAASRealm included with Tomcat, it's sort of opposite, makes sense? In fact, Tomcat does include one class that may be conceptually vaguely similar to what I am trying to achieve: The JAASMemoryLoginModule... what we are looking for is help for a cleaner and more generic re-implementation of the same idea, so that it works e.g. on top of a JNDIRealm too, or indeed any maybe custom-written Tomcat Realm. A few words on why we'd like to get this Access Tomcat Realm through JAAS API from app JAASMemoryLoginModule-like approach working, instead of the JAASRealm-based one: To e.g. use the JAASRealm with a simple text file, I had to patch com.tagish.auth.FileLogin to be able to use it with Tomcat; to simply do what MemoryRealm already does. To use this with LDAP is a mess as there doesn't seem be a working JAAS LDAP LoginModule (the JNDI-based one included with JDK doesn't work too well, see also earlier posts on this list) - what really works is your Tomcat JNDIRealm. This is why the interest in this approach. Now, granted, I could write a JAAS LoginModule copy/pasting the code from Tomcat JNDIRealm, and then use the JAASRealm... but... agreed the other way around would be nicer? Also easier for deployment; people use to realms, but confused with JAAS. If people on this list think that this other way around is not the way to go for some reason (despite e.g. WebLogic or WebSphere doing it like that; haven't looked at JAAS in JBoss yet, anybody?) please do respond, too. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Class Not Found on Occasion but Class Exists and is Usually Found
I have been given a simple war by Marc Guillemot [EMAIL PROTECTED] which replicates the problem almost every time on my development laptop, which is a Compaq Presario 2500 with Windows XP Home running Tomcat 5.0 with Struts 1.2. With Marc's agreement, I can send that along to you or he can do so, whichever makes sense. Michael McGrady Shapira, Yoav wrote: Hi, Does your CNFE (by the way, is it actually a CNFE or a NoClassDefFoundError -- I think it's the latter, looking at the stack trace, and the distinction is significant) occur when you've reloaded your app? In other words, if instead of reloading you restart Tomcat each time to deploy a new version of your app, does this error go away? I'm asking the above because it might be related to http://issues.apache.org/bugzilla/show_bug.cgi?id=28949, which has been elusive. What Tomcat version are you using? Yoav Shapira Millennium Research Informatics This is very interesting. My experience is almost the same as the bug. I also use frames. It is NOT always the same frame with me. And, I do not use the ImgTag from Struts but have rolled my own. I think that this is very interesting. Something in ImgTag and frames is the problem, apparently. Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple But Irritating problem accesing beans from jsp
useBean instead of userbean? Michael McGrady Dinesh Keesara wrote: the following code is working perfectly: [EMAIL PROTECTED] import=com.dinesh.* % % IdCard myidcard=new IdCard();% % myidcard.setName(HariKiran); myidcard.setRollNo(123); % %=myidcard.getName()% br %=myidcard.getRollNo()% but if i replace it with jsp:usebean tag like this : [EMAIL PROTECTED] import=com.dinesh.* % jsp:usebean id=myidcard class=com.dinesh.IdCard scope=page jsp:setProperty name=myidcard property=rollNo value=123 jsp:setProperty name=myidcard property=name value=Harikiran %=myidcard.getName()% br %=myidcard.getRollNo()% /jsp:usebean i am getting a jsp.error.badaction messsage here is complete stack trace : HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: /idcard1.jsp(5,5) jsp.error.badaction at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126) at org.apache.jasper.compiler.Parser.parseAction(Parser.java:671) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:711) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:687) at java.lang.Thread.run(Thread.java:536) -- Dinesh Keesara M.Tech(Software Engg.) School
Re: Simple But Irritating problem accesing beans from jsp
Sorry, I mean: useBean instead of usebean? (My eyesight is not great. Nerd, you know!) Michael McGrady Dinesh Keesara wrote: the following code is working perfectly: [EMAIL PROTECTED] import=com.dinesh.* % % IdCard myidcard=new IdCard();% % myidcard.setName(HariKiran); myidcard.setRollNo(123); % %=myidcard.getName()% br %=myidcard.getRollNo()% but if i replace it with jsp:usebean tag like this : [EMAIL PROTECTED] import=com.dinesh.* % jsp:usebean id=myidcard class=com.dinesh.IdCard scope=page jsp:setProperty name=myidcard property=rollNo value=123 jsp:setProperty name=myidcard property=name value=Harikiran %=myidcard.getName()% br %=myidcard.getRollNo()% /jsp:usebean i am getting a jsp.error.badaction messsage here is complete stack trace : HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: /idcard1.jsp(5,5) jsp.error.badaction at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126) at org.apache.jasper.compiler.Parser.parseAction(Parser.java:671) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:711) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:687) at java.lang.Thread.run(Thread.java
Updating configuration documentation for StandardManager
I'd like to generate some patches to the doco on configuring managers. Specifically 1) Reference is still made to checkInterval attr 2) No mention is made of maxInactiveInterval attr 3) No mention is made of sessionIdLength attr Questions 1) What do I book out in CVS to find the source xml files for the config doco? I looked in Jakarta-tomcat-site but it didn't contain much. I couldn't see anything else that looked likely. 2) Is only the 5.5 doco being actively updated or should I update the 5.0 stuff as well? Regards Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Should getDuplicates/setDuplicates be part of Manager interface?
Given that support for the duplicates counter is in ManagerBase, shouldn't its accessors be in the Manager Interface? Is there any rationale for not including them? Regards Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is DeltaManager actively being maintained?
In poking around in the manager code today, I noticed that this manager hasn't had a couple of recent changes in ManagerBase ported to it, namely 1) It is still managing its own expired sessions counter 2) It is still doing its own duplicate session detection and adding of jvmroute information. If its still being supported, I'd be happy to generate a patch to fix the above. Regards Michael +61 407 671 480 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
505 Error and Tomcat 5.0
I have tried this question on the user list with no answers. I hope this is not inappropriate. Thanks for any assistance. I am using Tomcat 5.0 and Struts 1.1. I also use a Filter that zips the requests and responses. I am running a chat room on port 80 with a frameset html that auto refreshes in one frame and sends in another frame. When a user with IE tries to chat with me from her office, she gets 505 messages. I have recently changed the code on the pages. I am getting requests when she sends one, but they are old requests, with the same chat lines she sent before. Anyone know what is probably going on here? The Filter I use follows: public class GZIPFilter implements Filter { public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { if (req instanceof HttpServletRequest) { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) res; String ae = request.getHeader(accept-encoding); if (ae != null ae.indexOf(gzip) != -1) { GZIPResponseWrapper wrappedResponse = new GZIPResponseWrapper(response); chain.doFilter(req, wrappedResponse); wrappedResponse.finishResponse(); return; } chain.doFilter(req, res); } } public void init(FilterConfig filterConfig) { // noop } public void destroy() { // noop } } What do you think? Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Apache Jakarta Tomcat 5.0.28 Released
+1 What a deal Tomcat is. It is amazing! Vic wrote: (I know I speak for many) THANK YOU very much. .V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
email archive virus threat
Is it just me or the recent digest email keep attaching with virus? If it not just me, can someone take a look why? Thanks. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Code Too Large for Try Statement in Catalina
I have the following error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:12934: code too large for try statement } catch (Throwable t) { ^ C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:30: code too large for try statement try { ^ C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:17: code too large public void _jspService(HttpServletRequest request, HttpServletResponse response) ^ 3 errors org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340) org.apache.jasper.compiler.Compiler.compile(Compiler.java:352) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:20) Is there anything to do? I need this file to be a JSP file in Struts. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Code Too Large for Try Statement in Catalina
Thanks, Peter, I am using Tomcat 5.0. What do you mean by reorganize my JSP? Can I write the JSP with an include that pulls in the code? What I have is a color pallet which needs to be in one piece and is 338 kb in size. Thanks, again, Michael Peter Lin wrote: the only way is to reorganize your jsp. this is an old issue dating back quite a bit. are you using tomcat4 or 5? if you're using tc4, I would recommend upgrading to tc4.1.x or 5.x. the original jasper generated code which would easily exceed the limit. the newer jasper2 which is used with tc4.1.x and 5.x does a much better job. peter On Thu, 19 Aug 2004 12:28:32 -0700, Michael McGrady [EMAIL PROTECTED] wrote: I have the following error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:12934: code too large for try statement } catch (Throwable t) { ^ C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:30: code too large for try statement try { ^ C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:17: code too large public void _jspService(HttpServletRequest request, HttpServletResponse response) ^ 3 errors org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340) org.apache.jasper.compiler.Compiler.compile(Compiler.java:352) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:20) Is there anything to do? I need this file to be a JSP file in Struts. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Code Too Large for Try Statement in Catalina
Thanks, Tim, The file actually is quite simple. It is a simple form with HTML radio buttons for choosing colors. There are a LOT of colors, but the code is pretty straightforward. I need to get the code into a JSP file so that I can utilize Struts. Michael Tim Funk wrote: 1) don't use compile time includes 2) split your page into multiple files which can use jsp_includes. Any file which needs to be this big is probably extrememly painful to debug. 3) followup to tomcat-user, not tomcat-dev -Tim Michael McGrady wrote: I have the following error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:12934: code too large for try statement } catch (Throwable t) { ^ C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:30: code too large for try statement try { ^ C:\crackwillow\work\Catalina\localhost\_\pallet_jsp.java:17: code too large public void _jspService(HttpServletRequest request, HttpServletResponse response) ^ 3 errors org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340) org.apache.jasper.compiler.Compiler.compile(Compiler.java:352) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) com.crackwillow.filter.GZIPFilter.doFilter(GZIPFilter.java:20) Is there anything to do? I need this file to be a JSP file in Struts. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: capture HTML pages under TOMCAT
You don't have to go inside Tomcat to do such thing. I think you can use some external tools to do this. For example, a free open source tool -- OpenSTA from http://www.opensta.org You can record all traffic to the server, modify your script to do certain session, and play back. --Michael -Original Message- From: xudong [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 8:00 PM To: [EMAIL PROTECTED] Subject: capture HTML pages under TOMCAT hi all, I want to do such a thing: Capture all HTTP request/response according to a specified session id under Tomcat. Then I could find the backgrounds of errors by *play* these pages. I think I have to understand the architecture of Tomcat first, then find the way to add some plugin(maybe change Tomcat's source codes directly). Am I right? But where I could find the related documents about the architecture of Tomcat? Any suggestion will be very important for me. Thanks. best wishes, xudong - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session Management Question
Hi All, This may have been answered elsewhere in the past but I'm struggling to find it if it has - though please point me in the direction of past answers if that's the case. I'm trying to understand how a single instance of Tomcat manages sessions. Is there any pooling/recycling of sesssion objects or are they created/destroyed as required? If they are pooled, is the size of this pool configurable? Also where can I find some good documentation on managing sessions across a cluster or load balanced instances? Does anyone know of a practical limit for the number of concurrent connections Tomcat can cope with on a reasonably out of the box Redhat installation (obviously file descriptor limits aside)? I realise this is more of a user question, but I figure members of this list are more likely to be able to provide me with the level of detail I'm looking for. Any info you can supply would be much appreciated (I also need to find this out with some urgency) Thanks in advance Mike --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.709 / Virus Database: 465 - Release Date: 22/06/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
default charset for text/*
Hello, In our web-app that runs with Tomcat 4.1.29 we set the content-type to text/xml in a servlet that serves an XML file. The XML encoding normally is UTF-8. We observed that special characters show up wrong in the browser. Packet sniffing revealed that Tomcat changed the content-type to text/xml;charset=ISO-8859-1 which was not the case with earlier Tomcat versions. I looked up the bug database and the mailing list for this behaviour and read that Tomcat behaves like this for alle text/* content types where the charset is mising. To fix this I can change the mime-type-definition in web.xml to text/xml;charset=UTF-8 or add this in my servlet. But If my servlet has to serve ISO-8859-1 XML files that would be also wrong. Should I parse the resource prior to serving it in order to determine the encoding? I cannot find the strong requirement to add the default charset in the HTTP spec. I read a discussion in the list that the JSP spec requires it - but also for a servlet? I think the charset is added by the Coyote connector so from the connector's point of view servlets and JSP-servlets are the same. Doesn't it make sense to omit the default charset for XML files because XML files normally should carry their encoding in the header? Then the browser could get the encoding from there as it was done with earlier Tomcat versions. What is your opionion? Best Regards Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
Can someone please unsubscribe me from this list? I have sent about 20 email to unsubscribe and I'm still recieving them. THanks Mike Currie Senior Web Developer New Century Mortgage Direct 949 743 7037 Mobile 949 279 4358 Fax 866 281 0360 This electronic message transmission contains information from New Century which may be confidential or privileged. This information is intended for the use of the individuals or entity named in the message. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this transmission is strictly prohibited. If you have received this electronic transmission in error, please notify us immediately by telephone and delete the message from your system. Thank you. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 8:35 AM To: [EMAIL PROTECTED] Subject: cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml yoavs 2004/07/26 08:34:32 Modified:catalina/src/bin setclasspath.bat webapps/docs changelog.xml Log: Addressed Bugzilla 29826. Revision ChangesPath 1.7 +2 -2 jakarta-tomcat-catalina/catalina/src/bin/setclasspath.bat Index: setclasspath.bat === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/bin/setclasspath.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- setclasspath.bat 12 Feb 2004 21:38:56 - 1.6 +++ setclasspath.bat 26 Jul 2004 15:34:31 - 1.7 @@ -52,6 +52,6 @@ goto end :exit -exit +exit /b 1 :end 1.76 +3 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- changelog.xml 23 Jul 2004 14:13:41 - 1.75 +++ changelog.xml 26 Jul 2004 15:34:31 - 1.76 @@ -29,6 +29,9 @@ fix bug30245/bug: Corrected Connector documentation to list address as a common attribute. (yoavs) /fix + fix +bug29826/bug: Modified setclasspath.bat exit code to 1. (yoavs) + /fix /changelog /subsection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] javax.COMM
Anyone have any info on open source projects with javax.COMM? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[[[[OOOOOOOOTTTTTTTTT} Re: Hin Kan Lee/Prymnewey is out of the office.
Does anyone know if Hin Kan Lee is in today or when he/she will be back? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Byte-Range-Serving of DefaultServlet and Acrobat 6
Hello, I investigated the topic of byte-range-serving from the DefaultServlet with Acrobat 6. I noticed that Tomcat 4.1.30 did not any byte-range-serving with Acrobat 6.0.0. The entire file was sent instead. I compared the HTTP communication with that of Internet Information server where byte-range-serving of PDF files works. Here are my results: 1. HTTP header Acrobat does not request byte-ranges unless the server sends the header Accept-Ranges: bytes. Once I added this header, Acrobat requested byte-ranges. From the HTTP 1.1 spec I read that sending this header is not required, but Acrobat seems to need it. 2. blanks in multi-byte-range-requests After having added the header above, Acrobat sent byte-range-requests. But Acrobat choked. I did a packet filtering and recognized the following status code sent by Tomcat 416 request range not satisfiable. The reason was that Acrobat sent multi-byte-range-request using e.g. the following string 1000-2000, 3000-3010 Notice the blank character. It leads to a parsing exception in line 1300 of the DefaultServlet (Tomcat 4.1.30). If you do a trim() on the rangeDefinition obtained there, this error does not occur. 3. newline before Mime-separator-string After fixing step 2 Acrobat did not choke anymore. However, the pdf file was still served entirely. Further comparison with the IIS communication revealed that ISS writes the mime-separation-string (CATALINA_MIME_BOUNDARY for Tomcat) on a line line, whereas Tomcat does not. After prefixing the println-commands with \n (lines 1910, 1930, 1964, 1984), it finally worked. I wonder if you would consider to change the DefaultServlet. IMO Acrobat is a very important application, and unless it doesn't explicitly violate the HTTP spec Tomcat should support it. Best regards Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.security.NoSuchAlgorithmException in Tomcat
I am using j2se 1.4.2_04. When I attempt to run java.security.KeyPairGenerator.getInstance(DH) in Tomcat, I get a stack trace as follows: java.security.NoSuchAlgorithmException: DH KeyPairGenerator not available java.security.Security.getEngineClassName(Security.java:584) java.security.Security.getEngineClassName(Security.java:595) java.security.Security.getImpl(Security.java:1044) java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:146) org.apache.jsp.TEST_KEYPAIR_jsp._jspService(TEST_KEYPAIR_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) I can run the DH generator from the command line. So, the DH KeyPairGenerator IS available. I have no trouble with Resin 2.1.x. What is up? Come on you guys, give me a hand here. The documentation indicates that I should not be having a problem.
Re: java.security.NoSuchAlgorithmException in Tomcat
When I run Security.getProviders() I do not get SunJCE, even though I have the following in the java.security file: security.provider.1=sun.security.provider.Sun security.provider.2=com.sun.net.ssl.internal.ssl.Provider security.provider.3=com.sun.rsajca.Provider security.provider.4=com.sun.crypto.provider.SunJCE security.provider.5=sun.security.jgss.SunProvider Why is that? When I run from the command line, I do get SunJCE. That is the difference. At 07:26 AM 3/27/2004, you wrote: I am using j2se 1.4.2_04. When I attempt to run java.security.KeyPairGenerator.getInstance(DH) in Tomcat, I get a stack trace as follows: java.security.NoSuchAlgorithmException: DH KeyPairGenerator not available java.security.Security.getEngineClassName(Security.java:584) java.security.Security.getEngineClassName(Security.java:595) java.security.Security.getImpl(Security.java:1044) java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:146) org.apache.jsp.TEST_KEYPAIR_jsp._jspService(TEST_KEYPAIR_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) I can run the DH generator from the command line. So, the DH KeyPairGenerator IS available. I have no trouble with Resin 2.1.x. What is up? Come on you guys, give me a hand here. The documentation indicates that I should not be having a problem.
Re: java.security.NoSuchAlgorithmException in Tomcat SOLUTION
For some reason Tomcat is not seeing the com.sun.crypto.provider package in jre/lib/ext. The work around is to put the SunJCE provider (sunjce_provider.jar) into commons/lib of Tomcat and to then add the provider manually with Security.addProvider(new com.sun.crypto.provider.SunJCE()). Why this is necessary is a quandry to me. If I had a clue why this was happening, I would try to fix it. But, this is not my area of expertise and I am stumped. At 07:26 AM 3/27/2004, you wrote: I am using j2se 1.4.2_04. When I attempt to run java.security.KeyPairGenerator.getInstance(DH) in Tomcat, I get a stack trace as follows: java.security.NoSuchAlgorithmException: DH KeyPairGenerator not available java.security.Security.getEngineClassName(Security.java:584) java.security.Security.getEngineClassName(Security.java:595) java.security.Security.getImpl(Security.java:1044) java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:146) org.apache.jsp.TEST_KEYPAIR_jsp._jspService(TEST_KEYPAIR_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) I can run the DH generator from the command line. So, the DH KeyPairGenerator IS available. I have no trouble with Resin 2.1.x. What is up? Come on you guys, give me a hand here. The documentation indicates that I should not be having a problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.security.NoSuchAlgorithmException in Tomcat SOLUTION
Thanks, Bill. I take it, then, I would add it to: jwsdp-shared\bin\jwsdponsunone.xml(206): value='lt;jvm-options-Djava.endorsed.dirs=${S1AS_HOME}/share/lib/endorsedlt;/jvm-options lt;jvm-options-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParserlt;/jvm-options' under my circumstances? And, would this be: jwsdp-shared\bin\jwsdponsunone.xml(206): value='lt;jvm-options-Djava.endorsed.dirs=${S1AS_HOME}/share/lib/endorsedlt;/jvm-options$JAVA_HOME/jre/lib/ext lt;jvm-options-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParserlt;/jvm-options' ??? Why would extension jars have to be manually configured in Tomcat? Thanks. At 12:23 PM 3/27/2004, Bill Barker wrote: - Original Message - From: Michael McGrady [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Saturday, March 27, 2004 8:46 AM Subject: Re: java.security.NoSuchAlgorithmException in Tomcat SOLUTION For some reason Tomcat is not seeing the com.sun.crypto.provider package in jre/lib/ext. The work around is to put the SunJCE provider (sunjce_provider.jar) into commons/lib of Tomcat and to then add the provider manually with Security.addProvider(new com.sun.crypto.provider.SunJCE()). Why this is necessary is a quandry to me. If I had a clue why this was happening, I would try to fix it. But, this is not my area of expertise and I am stumped. You can either add sunjce_provider.jar to $CATALINA_HOME/common/endorsed, or add $JAVA_HOME/jre/lib/ext to the -Djava.endorsed.dirs in the startup parameters. At 07:26 AM 3/27/2004, you wrote: I am using j2se 1.4.2_04. When I attempt to run java.security.KeyPairGenerator.getInstance(DH) in Tomcat, I get a stack trace as follows: java.security.NoSuchAlgorithmException: DH KeyPairGenerator not available java.security.Security.getEngineClassName(Security.java:584) java.security.Security.getEngineClassName(Security.java:595) java.security.Security.getImpl(Security.java:1044) java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:146) org.apache.jsp.TEST_KEYPAIR_jsp._jspService(TEST_KEYPAIR_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: 204) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) I can run the DH generator from the command line. So, the DH KeyPairGenerator IS available. I have no trouble with Resin 2.1.x. What is up? Come on you guys, give me a hand here. The documentation indicates that I should not be having a problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Content-Type: text/plain; name=disclaimer.txt Content-Disposition: inline; filename=disclaimer.txt Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.411 (Entity 5.404) This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.security.NoSuchAlgorithmException in Tomcat SOLUTION
Hmm, I just noticed that the following is commented out in jwsdp: !-- echo message=Setting xerces SAXParser as org.xml.sax.driver / echo message=And setting java.endorsed.dirs to use xerces and xalan / replace file=${S1AS_HOME}/domains/domain1/server1/config/server.xml value='lt;jvm-options-Djava.endorsed.dirs=${S1AS_HOME}/share/lib/endorsedlt;/jvm-options lt;jvm-options-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParserlt;/jvm-options' replacetoken![CDATA[jvm-options-Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter /jvm-options]]/replacetoken /replace -- Could that be the source of the problem in some sense? At 01:31 PM 3/27/2004, you wrote: Djava.endorsed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Tomcat as top level ASF Project
Lord, the Bible has had nothing but marketing since the beginning, ever since Constantine killed the Christians that disagreed with the robber's synod. Even today the Bible is the most cobbled book on the market, just to meet marketing demands. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Behaviour of load-on-startup=0
I stumbled on what I think is a small difference in Tomcat's behaviour from the Servlet spec. Looking at the code, it seems to affect both Tomcat 4 and 5. In short, the servlet specs (2.3 and 2.4) says that a servlet with load-on-startup value set to 0 should load before those with values of 1 or higher, but Tomcat loads 1+ first, and 0 last. The load-on-startup element indicates that this servlet should be loaded (instantiated and have its init() called) on the startup of the web application. The optional contents of these element must be an integer indicating the order in which the servlet should be loaded. If the value is a negative integer, or the element is not present, the container is free to load the servlet whenever it chooses. If the value is a positive integer or 0, the container must load and initialize the servlet as the application is deployed. The container must guarantee that servlets marked with lower integers are loaded before servlets marked with higher integers. The container may choose the order of loading of servlets with the same load-on-start-up value. Here's the first part of loadOnStartup(Container[]). This code is identical in Tomcat 4.x (StandardContext.java:3398) and 5.x (StandardContext.java:3930). public void loadOnStartup(Container children[]) { // Collect load on startup servlets that need to be initialized TreeMap map = new TreeMap(); for (int i = 0; i children.length; i++) { Wrapper wrapper = (Wrapper) children[i]; int loadOnStartup = wrapper.getLoadOnStartup(); if (loadOnStartup 0) continue; if (loadOnStartup == 0) // Arbitrarily put them last loadOnStartup = Integer.MAX_VALUE; Integer key = new Integer(loadOnStartup); ArrayList list = (ArrayList) map.get(key); if (list == null) { list = new ArrayList(); map.put(key, list); } list.add(wrapper); } ... It appears the problem would be solved by deleting the lines that read: if (loadOnStartup == 0) // Arbitrarily put them last loadOnStartup = Integer.MAX_VALUE; Michael -- Michael Prescott Ingenura Inc. [EMAIL PROTECTED] (416) 686-8576 PGP Public Key: http://www.ingenura.com/keys/MichaelPrescott.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Email account utilization warning.
What is this about? I am sure of one thing, I did not improperly use anything. I don't know what you mean about resign[ing my]account information either. Since there was no attached file, I assume my security picked up an attempt to pass on a virus. Anyone else seeing these? Michael At 01:07 AM 3/8/2004, you wrote: Dear user, the management of Apache.org mailing system wants to let you know that, Your e-mail account will be disabled because of improper using in next three days, if you are still wishing to use it, please, resign your account information. For more information see the attached file. Attached file protected with the password for security reasons. Password is 46855. Kind regards, The Apache.org team http://www.apache.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unknown: TROJAN HORSE?
I never look at these emails I get because I fear they are spoofs. Are they? This was an email that said it came from the list via [EMAIL PROTECTED] and had an attached file called friend.zip. Is this a trojan horse? At 07:02 AM 2/26/2004, you wrote: thats wrong - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REMOVE EMAIL
Look at the bottom of the emails, Trevino, and you will see how to do that. At 07:49 AM 2/17/2004, you wrote: PLEASE REMOVE EMAIL FROM LIST!! [EMAIL PROTECTED] thank you! - Original Message - From: Cynthia Trevino [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED]; CustServ1 [EMAIL PROTECTED] Sent: Tuesday, February 17, 2004 9:47 AM Subject: REMOVE EMAIL PLEASE REMOVE MY EMAIL ADDRESS FROM YOUR LIST!!! - Original Message - From: CustServ1 [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Monday, February 16, 2004 2:53 PM Subject: Re: cvs commit: jakarta-tomcat-connectors/jk/support jk_apr.m4 Dear Customer, Thank you for writing LTD Commodities. We value your business. If you have any questions in the future, please let us know. Sincerely, Bonnie Cawley Internet Customer Service Department www.ltdcommodities.com **Did you know that you can now request an account statement or a copy of your prepaid order online? Visit our web site at www.ltdcommodities.com and click on account information request, which is located on the left side of our homepage** Original Message Follows: - truk2004/02/13 13:38:26 Modified:jk/native2 Makefile.in jk/native2/server/apache13 Makefile.apxs.in jk/support jk_apr.m4 Log: add apxs meta targets and jk2-install-apxs from Guenter Knauf For apache13: Change apr and apr-util to install into build dirs Fixup apxs build and add install target apxs build is the only way to build on OpenBSD right now due to libtool issues. Tested on FreeBSD and OpenBSD so far. Revision ChangesPath 1.5 +16 -1 jakarta-tomcat-connectors/jk/native2/Makefile.in Index: Makefile.in === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/Makefile.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.in 10 Nov 2003 11:05:33 - 1.4 +++ Makefile.in 13 Feb 2004 21:38:26 - 1.5 @@ -4,6 +4,12 @@ clean: @APR_CLEAN@ jk2-clean +build-apxs: @APR_BUILD@ jk2-build-apxs + +clean-apxs: @APR_CLEAN@ jk2-clean-apxs + +install-apxs: jk2-install-apxs + jk2-build: list='@WEBSERVERS@';for i in $$list; do @@ -22,6 +28,15 @@ fi;done; +jk2-install-apxs: + list='@WEBSERVERS@'; + for i in $$list; do + echo Making $$target in $$i; + if test $$i != .; then + (cd $$i $(MAKE) -f Makefile.apxs install) || exit 1; + fi; + done; + jk2-clean: list='@WEBSERVERS@';for i in $$list; do @@ -41,7 +56,7 @@ done; apr-build: - ( cd @APR_DIR@ make cd @APR_UTIL_DIR@ make ) + ( cd @APR_DIR@ make install cd @APR_UTIL_DIR@ make install ) apr-clean: ( cd @APR_DIR@ make clean cd @APR_UTIL_DIR@ make clean ) 1.10 +9 -9 jakarta-tomcat-connectors/jk/native2/server/apache13/Makefile.apxs.in Index: Makefile.apxs.in === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/server/apache13/Makefile. apxs.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Makefile.apxs.in 10 Feb 2004 04:39:51 - 1.9 +++ Makefile.apxs.in 13 Feb 2004 21:38:26 - 1.10 @@ -3,28 +3,28 @@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ JK_DIR := ../.. [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ COMMON_C_FILES := $(wildcard ${JK_DIR}/common/*.c ) [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ C_FILES=jk_service_apache13.c mod_jk2.c [EMAIL PROTECTED]@ [EMAIL PROTECTED]@/apr-config --libs` - -JK=../../common/ -JKINC=../../include/ -JK_INCL=-DUSE_APACHE_MD5 -I ${JK} -I ${JKINC} -DHAVE_MMAP [EMAIL PROTECTED]@/bin/apr-config --link-ld` [EMAIL PROTECTED]@/bin/apu-config --link-ld` ifneq ($(strip $(JAVA_HOME)),) JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS} @HAVE_JNI@ JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L ${JAVA_HOME}/lib/${ARCH}/native_threads endif +JK_CFLAGS=-I ${JK_DIR}/include -DCHUNK_SIZE=4096 -DUSE_APACHE_MD5 ${APR_CFLAGS} -DHAVE_MMAP + all:
[OT] TEST Re: jk2 2.0.4 release plan
Test At 01:56 AM 2/4/2004, you wrote: Bill Barker a écrit : Henri Gomez [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Mike Anderson a écrit : I'll be happy to deliver zips instead of NLMS. for NetWare. Henri (and others) since we are tagging and releasing jk2 can/should we do the same for jk since I know there is added functionality (Ping/Pong and timeouts) there as well? Well, one release at a time, users urge us for jk2 release, jk release could wait some time (Bill ?) Yeah, well, I suppose that now that I'm an all-great-and-powerful PMC member, I could RM a JK release. However, I'd like to get out a TC 3.3.2 before that (so, if anyone else wants to RM JK in the meantime, you've got my +1 :). Also, if Larry wants to jump in to RM 3.3.2, I'll step aside, since he has done such a great job on all of the other 3.3 releases. The rules for 3.3 releases are still old-school. I'll try to get a [PROPOSAL] together by the end of the week. If that's not rejected, then we go to a [VOTE] (which will give me time to clarify if I count PMC members or committers as binding votes). In the unlikely event that we get enough people to care about 3.3 enough to vote (seeing the trouble that Remy has getting people to vote :), then there will be a 3.3.2 release. As cool as it would be to have a 3.3.3 release, I'd probably consider the 3.3.2 release to be an EOL release for the 3.x line. Security releases would still be provided, but not much more. +100 for 3.3.2 release, I'm waiting for about ... months :) If you work on it, I could get jk2 RM job :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Edward Furlong/IE/TLS/PwC is out of the office.
Man, I hope this is a Canadian date. If this is American, we are going to get these for the next seven months. LOL. At 10:30 PM 2/3/2004, [EMAIL PROTECTED] wrote: I will be out of the office starting 02/02/2004 and will not return until 09/02/2004. I will respond to your message when I return. _ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSSE 1.4: 'Want' vs. 'Need' Client Certificate Authentication
Bill, I'm not sure what the best way to submit these are, but here is a first stab at an implementation of this. I was able to successfully test and run this under Tomcat 4.1.29 using the Jakarta-tomcat-connectors source package distributed with 5.0.18 (should be the latest from my understanding). Attached are the patch files for: org.apache.coyote.tomcat4.CoyoteServerSocketFactory org.apache.coyote.tomcat4.CoyoteConnector org.apache.tomcat.util.net.jsse.JSSESocketFactory org.apache.tomcat.util.net.jsse.JSSE13SocketFactory org.apache.tomcat.util.net.jsse.JSSE14SocketFactory Let me know if I'm on the right track... (I haven't done a diff in years, I'm not sure if I did it backwards or not, but I did 'diff new_file original_version'). Thanks, Mike -Original Message- From: Bill Barker [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 2:53 PM To: Tomcat Developers List Subject: Re: JSSE 1.4: 'Want' vs. 'Need' Client Certificate Authentication This has been on my list for awhile (just not very high :). I am leaning in the direction of 1): change the clientAuth parameter to be a String of the form: 'true', 'false', or 'want'. It's the simplest, and cleanest. Getting the PureTLS implementation caught up with the JSSE implementation is another item on my list :). - Original Message - From: Becker, Michael [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 22, 2004 10:38 AM Subject: JSSE 1.4: 'Want' vs. 'Need' Client Certificate Authentication One of the additional features that has been introduced in JSSE 1.4 is the ability to 'want' client certificates instead of 'require'ing them (http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.ht ml#NewMethods). It also appears that this functionality is not available in the PureTLS implementation of the SSL protocol (at least that I could find). This feature could be useful in scenarios where some users have client side certificates and some do not. This would still allow both sets of users to connect to the same host, but using different modes of authentication. Another nice thing that this feature would give us is the ability to provide a friendly You don't have a client certificate and contact this help desk to get your client certificate instead of not allowing any requests to get into the container. Considering the fact that this is only applicable to a JDK 1.4.x VM, is this something that could be built into the current distribution? Here are some options that I came up with to get this functionality in Tomcat. 1. Provide an additional argument to the org.apache.coyote.tomcat4.CoyoteServerSocketFactory in server.xml to 'want' certificate authentication. If the underlying SSL implementation does not support that feature, log an error/warning and revert to 'need' certificate authentication. 2. For the org.apache.tomcat.util.net.jsse.JSSE14* classes, change the functionality to 'want' certificates instead of 'need' them. This gives the application and container the ability to give the user an error if they do not have a certificate instead of closing the socket and making the browser show the 'Page can not be displayed' error. This would change existing behavior and thus could be a really bad thing to do. 3. Make my own modifications and don't incorporate into the default distribution. Regards, Mike Becker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 108a109 protected boolean clientAuth = false; 151c152 configureClientAuth(asock); --- asock.setNeedClientAuth(clientAuth); 365,380d365 * Configure Client authentication for this version of JSSE. The * JSSE included in Java 1.4 supports the 'want' value. Prior * versions of JSSE will treat 'want' as 'false'. * @param socket the SSLServerSocket */ abstract protected void configureClientAuth(SSLServerSocket socket); /** * Configure Client authentication for this version of JSSE. The * JSSE included in Java 1.4 supports the 'want' value. Prior * versions of JSSE will treat 'want' as 'false'. * @param ssocket the SSLSocket */ abstract protected void configureClientAuth(SSLSocket socket); /** 398c383 configureClientAuth(socket); --- socket.setNeedClientAuth(clientAuth); 1203,1204c1203,1206 IntrospectionUtils.setProperty(protocolHandler, clientauth, + ssf.getClientAuth()); --- if (ssf.getClientAuth()) { IntrospectionUtils.setProperty(protocolHandler, clientauth, + ssf.getClientAuth()); } 76,79c76 * set to codetrue/code. Want client authentication if set to * codewant/code. (Note: Only supported in the JSSE included
JSSE 1.4: 'Want' vs. 'Need' Client Certificate Authentication
One of the additional features that has been introduced in JSSE 1.4 is the ability to 'want' client certificates instead of 'require'ing them (http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.ht ml#NewMethods). It also appears that this functionality is not available in the PureTLS implementation of the SSL protocol (at least that I could find). This feature could be useful in scenarios where some users have client side certificates and some do not. This would still allow both sets of users to connect to the same host, but using different modes of authentication. Another nice thing that this feature would give us is the ability to provide a friendly You don't have a client certificate and contact this help desk to get your client certificate instead of not allowing any requests to get into the container. Considering the fact that this is only applicable to a JDK 1.4.x VM, is this something that could be built into the current distribution? Here are some options that I came up with to get this functionality in Tomcat. 1. Provide an additional argument to the org.apache.coyote.tomcat4.CoyoteServerSocketFactory in server.xml to 'want' certificate authentication. If the underlying SSL implementation does not support that feature, log an error/warning and revert to 'need' certificate authentication. 2. For the org.apache.tomcat.util.net.jsse.JSSE14* classes, change the functionality to 'want' certificates instead of 'need' them. This gives the application and container the ability to give the user an error if they do not have a certificate instead of closing the socket and making the browser show the 'Page can not be displayed' error. This would change existing behavior and thus could be a really bad thing to do. 3. Make my own modifications and don't incorporate into the default distribution. Regards, Mike Becker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 5.0.16 will not start
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398) Caused by: java.lang.NullPointerException at org.apache.catalina.startup.Catalina.await(Catalina.java:637) at org.apache.catalina.startup.Catalina.start(Catalina.java:599) ... 6 more -- Greets Michael PS: Sorry for my bad english it is not my favour. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory leak- yeah I know
Title: RE: Memory leak- yeah I know Filip, I spent some time a while back trying to get some reproducibility into memory use in Tomcat (4.1.24) I found that even sitting idle tomcats memory use would increase. Here is my original mail to the tomcat-dev mailing list 4.1.24 secure connector throws a LOT of garbage After I did some more investigations and figured out a fix the following bug was raised http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19264 To reduce the amount of garbage thrown by tomcat I would recommend two things, doing these might help you track down other memory issues. 1 - Use -XmxsomeValuem -XmssomeValuem. The above sizes the heap to whatever value you put in there (note the value is megabytes). I found (at least on the Solaris JVM) that sizing the heap and making the min and max heap sizes the same not only sped up start up but also made the garbage collector behave much better. 2- Set the serverSoTimeout value to 0 in the connector configuration in your server configuration file. This will prevent the sever socket timing out. Which DOES throw garbage, and if it is a secure connector you are using it throws SO much garbage that the garbage collector can not keep up too well. Using just number tip 1 above (as the fix to the bug above wasn't in Tomcat 4.1.x before we needed to go into production. We managed to run at something like 100 TPS for 48 hours with no falling over and no net increase in memory usage. If you need any more information on the above let me know. Michael Yates Software Engineer, Location Center Nortel Networks Wollongong, Australia. -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED]] Sent: Thursday, 15 January 2004 11:09 AM To: Tomcat Developers List Subject: RE: Memory leak- yeah I know Remy, absolutely no intentions of being sarcastic :), if there isn't a leak, that is great, if there is, will fix it. I'm trying to figure it out, I didn't ask anyone else to spend time on it, or even read my email. but if anyone is doing work on this lets work on it together. just got jprobe up and running, once I have ran a few tests, I will experiment with the garbage collection, the memory is slowly growing, its been running for an hour. Filip -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 14, 2004 3:08 PM To: Tomcat Developers List Subject: Re: Memory leak- yeah I know Filip Hanik wrote: Ok, I know that these emails are usually dismissed with the words: Gets us some proof from a profiler, and I will...gimme some time, in the meanwhile, if anyone else wants to play with it. well the story is that during heavy load tests of the session replication my system my VMs always run out of memory. What am I doing different than others, well, during my load tests I am not using keep alive connections to achieve true round robin. I'm doing this by setting method.setHttp11(false) in the Http client. Running the test (attached, instructions below) I am hitting http://localhost:8080/index.jsp (home page) and watching the memory grow and grow and grow. I am using a profiler and having somewhat of a hard time reading the output. I am gonna download a trial of jprobe, see how that works out for me... I will be back with results from that. in the meantime, for those who want to see their memory grow here are the instructions My env: Machine: PIII 1.6Ghz, 512MB Ram OS: Redhat 8 VM: Sun JDK 1.4.2_02 (build 1.4.2_02-b03) Instructions: download the attached client.jar execute: java -cp testclient.jar;commons-httpclient.jar;commons-logging.jar org.apache.catalina.cluster.test.client.MemTestClient http ://192.168.0.103:7080/index.jsp 100 10 1000 false (exchange ; for : on unix) Watching the memory grow using Top, although it shouldn't increase at all. There's ab for that kind of stuff, you know ... No need to waste your time writing some new stuff. Your tone is a bit sarcastic, I think. I'm eagerly awaiting your proofs ;-) Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---BeginMessage--- Title: 4.1.24 secure connector throws a LOT of garbage Hi All, How do I turn on low level Tomcat debugging? Specifically I want to log the output of the PoolTcpEndpoint class within the org.apache.tomcat.util.net package. Tomcat seems to be throwing a LOT of garbage when the secure connector is enabled (in the order of 50K a second). The garbage collector doesn't keep up very well and the heap size grows and grows. It is not a memory leak as such because when I force garbage collection the amount of used memory drops right back to the original base line. I
Multiple applications single signon.
I am having two aplications (Say: 1. AddressBook 2. Balancer) having similar login requirements. For example there is user named john who should have access to both the applications AddressBook Balancer. As of now Tomcat is requesting for login for both the applications separately. Requirement is: Once the user, john, is logged in (authenticated successfully) to one application, he should be automatically authenticated to second application. He should not get login page twice. How do I implement it on tomcat? Any ideas, suggestions greately appreciated. regards, Michael. _ Sign up for FREE email from The financial Super Market at http://www.jrgassociates.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.16 catalina.properties
Hi, 3) According to org/apache/catalina/startup/CatalinaProperties.java, the location of catalina.properties can be specified via the catalina.config option. Shouldn't that be documented in the catalina.properties file? I don't know if this works (it looks like it would, though). Rémy I've tested this option. If you pass in startup -Dcatalina.config=PATH-TO-catalina.properties Tomcat uses the specified properties-file. Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Implementing a custom session manager for reauthentication
I am currently involved in a project using tomcat 4.1.29 and forms-based authentication. I would appreciate some feedback on our approach to one of our requirements and conclusions about the design of the existing code. We have a requirement to implement a reauthentication timeout separate from the session timeout, i.e. after say 5 minutes a user must re-enter their credentials in order to continue with their session, which would have a longer timeout. We've tried doing this in filters without much success, and decided that we needed to extend the container instead. Looking at the authenticator code, it appears that the way to force (re)authentication without loosing the session is to ensure that the session getPrincipal() routine returns null. So we need to somehow set the principal to null on reauthentication timeout. In order to achieve this, one of two approaches came to mind in examining the manager and session code. Our goal was to try and use as much as possible of the existing code and extend cleanly. 1. Develop our own session class that implements this behaviour. We started by considering a delegating instance of StandardSession that would perform the reauthentication check as part of getPrincipal(). However, looking at the session managers available, StandardSession is endemic in the code suggesting that extension of session was not big on the designers radar, particularly given its use in casts and session object creation. 2. Extend the manager of choice and add our own thread to set the principal to null on reauthentication timeout. There's a few hairs on this one a) The existing managers already implement runnable for session timeout, but we figure an inner class will probably do the trick for our thread b) We'll need to implement the lifecycle events to control our thread as well as the superclass thread c) The Session setPrincipal() method is not synchronised, so the possibility exists for race conditions between our thread and other code d) Managers such as StandardManager have hardcoded strings for string resources and the thread name, rather than basing these on the protected name member. Although we can change the name in our subclass constructor, we'd still end up with a thread called StandardManager... even though we're actually using our manager. I'm happy to submit a patch if changing this situation is considered appropriate. We're pursuing 2) at the moment, but would like to get the opinions on the points above from those who know the code base better. Regards Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[PATCH] Tomcat 3.3.1 AccessLogInterceptor
Attached is a patch against the current HEAD revision for AccessLogInterceptor that makes it - log POST and PUT requests - report the number of bytes *received* for POST and PUT I am not sure if the last is the right thing to do. Apache seems to do it from what I found in log files with Google (I don't use Apache myself). And it is what I want for my purpose. But it contradicts the documentation of Apache's access.log file. Anyone knows? Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jasper: TagHandlerPool for each Page and TagHandlerPoolFactory
Hello all. I was just looking over the code generated by Jasper in Tomcat 4.1.27. For my c:url tag, the following code is generated for the page: public baseLayout_jsp() { _jspx_tagPool_c_url_value = new org.apache.jasper.runtime.TagHandlerPool(); } Is there any reason that there is a separate pool created for each page? It would seem like it would be more efficient (i.e. less Tag Objects created) if there was a single pool. After looking at the latest CVS source, it looks like the Jasper generated code may have changed to something more like: public baseLayout_jsp() { _jspx_tagPool_c_url_value = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(config); } It appears that the instantiation code has been moved inside of TagHandlerPool. Unfortunately, there is still no control over the TagHandlerPool instantiation by an outside Tag Pool. I think it would be better to specify a tagpoolFactoryClassName instead of tagpoolClassName. Being able to only specify the tagpoolClassName does not provide as much flexibility (since a new TagpoolHandler is always created with a call to getTagHandlerPool(ServletConfig)). This way, the TagHandlerPoolFactory could decide if it wants to always create new TagHandlerPool Objects (as the current implementation does) or re-use the same TagHandlerPool (which I would like to implement). The Factory would be simple: /* * Implementions should specify a public no-args constructor. */ public interface TagHandlerPoolFactory { TagHandlerPool getTagHandlerPool(config); } A static instance of TagHandlerPoolFactory could be created in TagHandlerPool and used for each call to TagHandlerPool.getTagHandlerPool(ServletConfig). -mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [PROPOSAL] Add Post to the clear list for protected pages
Costin Manolache wrote: Bill Barker wrote: At the moment (with the default settings), Tomcat 4.1.x and higher add HTTP headers to non-SSL protected pages to prevent intermediate proxies from caching them. According to the HTTP/1.1 RFC (and even the HTTP/1.0 RFC), POSTed pages are not allowed to be cached by proxies (for the obvious reasons). I'd like to add request.getMethod().equals(POST) to the list of conditions to *not* add the headers. Not sure I understand :-) The RFC requires that proxies don't cache POST requests. Are you saying we should *not* include the headers, because proxies will not cache anyway ? Or to add the headers ? And what does it has to do with SSL ? (as an interested observer who has been fighting caching problems both with and without SSL for the last couple of days...) Currently tomcat sets no-cache headers (Pragma: no-cache, Cache-Control: no-cache, and an Expires header) IF: The resource is protected (requires authentication) AND The resource is NOT accessed via SSL (since intermediaries won't ache things that are using SSL, I think). This is also neccesary to get internet explorer to behave sanely when serving files that it needs to open in an external program. There's also a flag that disables this behaviour entirely. As you correctly interpreted, Bill's suggestion is that these headers should _not_ be added for POST requests, because intermediaries will not cache these anyway. Disallowing caching has a tendency to cause undesirable behaviour on the client end (at least with IE, which many of us have to support), so my guess is that that is why Bill doesn't want these headers added in this case. Mike Smith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 module for AOLserver
Alexander Leyke wrote: Hi, A question about enhancement adoption process - how long does it typically take for new code to show up in CVS, in nightly builds? What is the verification process for new code? I have posted enhancement request to the mailing list and to Bugzilla (http://issues.apache.org/bugzilla/show_bug.cgi?id=18283). Thanks, Alex Alex, This tends to vary a lot. For features which a lot of people want, or for features that one of the committers is personally interested in, adoption (assuming the code is of appropriate quality - I've seen more than a few patches that have simply been ignored because they're absolutely terrible (I'm not suggesting this is the case for you)) tends to be very fast - within a day or two. For less widely used things like your contribution here, it can take quite a long time sometimes, and perhaps a bit of nagging at one or two of the contributors (though that can, of course, have negative impact as well - don't annoy them too much :-) Taking a large patch, checking it for quality/acceptability, etc. is not a trivial amount of work, so it could be a while until someone has the time to integrate this. Don't despair, though! Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
StandardSession class question
It looks like the StandardSession class, in the 4.x line, uses two variables thisAccessedTime and lastAccessedTime to keep track of the sessions last accessed time. The method access(), which is called in the StandardHostValue class every time a user makes a request, contains the following code: public void access() { this.isNew = false; this.lastAccessedTime = this.thisAccessedTime; this.thisAccessedTime = System.currentTimeMillis(); } The problem is that lastAccessedTime is used to determine if the session has expired. So it takes two clicks by a user to keep their session active. The variable thisAccessedTime is private and not really used except in this method. My question is why is this done? Is there some reason why the thisAccessedTime variable is needed at all? It seems like setting lastAccessedTime equal the System.currentTimeMillis() would work as expected and keep the session alive with only one click. I've made this change and it looks to work. Thanks - Michael Tildahl Aplia Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shutdown.sh does not work when long lasting operations, suchas SQL Queries, are still active!
Tim Funk wrote: Why is a kill done instead of a System.exit()? System.exit() is a cleaner solution, but there are plenty of cases where tomcat won't shut down at all with this solution, so a kill is needed (either as suggested, or manually/externally). For example, I had a bug in a webapp a while ago (the servlet was marked as load-on-startup, so it was starting up before tomcat was fully running) where the servlet was hanging, so tomcat never fully started up. As a result, it wasn't listening on the shutdown socket, so anything requiring in-process intervention such as System.exit() would fail. Perhaps have both? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getRequestURI after forward
Hallo Remy, I have noted that request.getRequestURI in an error page delivers the URI of the request page whereas getRequestURL refers to the originally called resource. This is probably the same (much more general) case described in http://issues.apache.org/bugzilla/show_bug.cgi?id=8409. This bug report was marked as invalid by you with the indication that getRequestURI delivers a path element, which according to section 8.4 in the servlet spec should be altered accordingly when forwarding. I am not quite sure if this interpretation is true. For one thing section 4.4 (request path elements) explicitly lists the methods accessing path elements (getContextPath/ServletPath/PathInfo), but makes no mention of getRequestURI. It does however say: requestURI = contextPath + servletPath + pathInfo Further the corresponding java doc comment (http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html#getRequestURI()) leads the reader to believe that the original request URI is meant. My interpretation would be that requestURI as an abstract concept should be considered a path element that changes with a forward. However, the _method_ getRequestURI should (strangely inconsistent) deliver the pre-forward value. What is your take on this? Grüsse, Michael -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Session de-serialization problem (with patch)
Just a short follup: Will you apply the patch I sent? (Or provide an other solution with the same effect?) If not, please send a response so that we can adapt correspondingly. Grüsse, Michael -Original Message- From: Eriksson, Michael Sent: Monday, December 16, 2002 12:04 PM To: [EMAIL PROTECTED] Cc: Eriksson, Michael Subject: Session de-serialization problem (with patch) Hi, during work on session serialization my colleagues run into a problem with the startup order of the session manager vs listeners/filters. During startup the session manager is started before the listeners and filters. This implies that objects that depend on parts of the application can not be properly deserialized. (Apparently, a re-write to remove such dependencies is not feasible in our case.) Further this behaviour is inconsistent with the reload behaviour, which was previously changed due to http://issues.apache.org/bugzilla/show_bug.cgi?id=3733. We have patched this behaviour (see attachment) to start listeners/filters immediately _befor_ the session manager. This patch solves our problem and does not seem to cause any new issues with our application. However, due to the triviality of the patch, we have not made a thorough examination of the workings of o.a.c.core.StandardContext. Also, the patch is focused on one specific issue. It does not (unless by coincidence) ensure consistency in the reload/start behaviours. The patch is against 4.1.16, since 4.1.17 was released after the patch was written. Sincerely, Michael Eriksson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat id in AccessLogValve and Spread
I would also like to add functionality to the AccessLogValve, and a subclass would be fine for my purposes, but currently, org.apache.catalina.valves.AccessLogValve is declared final, presumably for performance reasons. Is there any chance of changing that? Mike Shapira, Yoav wrote: Howdy, I'm trying to consolidate the access logs for a whole bunch of Tomcats using Spread (www.spread.org) like I do with Apache. The easiest way to do this seems to be to patch org.apache.catalina.valves.AccessLogValve to use Spread and I've done that trivially. Perhaps it would be better to subclass AccessLogValve to add this functionality? Then you could contribute your class to the tomcat project and users of the normal AccessLogValve wouldn't need to know anything (or depend on) Spread. somewhat figure out where it came from, but I run into problems when I have multiple Tomcats load-balanced by mod_jk serving the same virtual hosts. The easiest way then to tell where it came from seems to be to use the jvmRouteId any other, better, more easily obtained, unique identifier I can use? The combination of host name and jvmRouteId is decent. Would %A (local IP address) in the access log work for you? I'm assuming your load-balanced servers have different IP addresses even if they share the virtual hosts. Yoav Shapira Millennium ChemInformatics -- 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]
Tomcat connector (isapi_redirect)
Hi All, I'm adding some custom logic to the isapi_redirect filter but I can't seem to get the project to compile. I'm running DevStudio 6.0. I'm getting errors about SF_NOTIFY_AUTH_COMPLETE and such (basically all the new ISA server stuff)... I can't see what I'm missing / any ISA SDK toolkit to download. Any ideas where I'm going wrong (old header files? need DevStudio .NET?) etc. etc. ?? Michael Evans Visa International EU Tel: 020 7995 5438 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat connector (isapi_redirect)
I've figured out what was missing... If anyone else needs to recompile isapi_redirect.dll then look at the README file and download the latest Windows/IIS SDK. -Original Message- From: Evans, Michael [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 13:50 To: '[EMAIL PROTECTED]' Subject: Tomcat connector (isapi_redirect) Hi All, I'm adding some custom logic to the isapi_redirect filter but I can't seem to get the project to compile. I'm running DevStudio 6.0. I'm getting errors about SF_NOTIFY_AUTH_COMPLETE and such (basically all the new ISA server stuff)... I can't see what I'm missing / any ISA SDK toolkit to download. Any ideas where I'm going wrong (old header files? need DevStudio .NET?) etc. etc. ?? Michael Evans Visa International EU Tel: 020 7995 5438 -- 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]
[PATCH] Add customizable date format for access log filename
Much of the access log filename can be customized in the Valve declaration using prefix and suffix, but the date format used for the filename is hardcoded in the Valve code. Here's a patch that allows the date format to be specified in the Valve definition alongside prefix and suffix. If this patch is accepted, I can put together another patch for the admin webapp. See patch below. Mike Heinrichs Index: AccessLogValve.java === RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java,v retrieving revision 1.15 diff -u -r1.15 AccessLogValve.java --- AccessLogValve.java 22 Nov 2002 20:27:12 - 1.15 +++ AccessLogValve.java 15 Jan 2003 19:19:32 - @@ -325,6 +325,11 @@ private long rotationLastChecked = 0L; +/** + * The access log filename date format + */ +private String dateFormat = -MM-dd; + // - Properties @@ -443,6 +448,28 @@ /** + * Return the date format string used for access log filenames + */ +public String getDateFormat() { + +return (dateFormat); + +} + + +/** + * Set the date format string used for access log filenames + * + * @param dateFormat The new date format + */ +public void setDateFormat(String dateFormat) { + +this.dateFormat = dateFormat; + +} + + +/** * Return the log file suffix. */ public String getSuffix() { @@ -1024,7 +1051,7 @@ if (timeZone.length() 5) timeZone = timeZone.substring(0, 1) + 0 + timeZone.substring(1, timeZone.length()); -dateFormatter = new SimpleDateFormat(-MM-dd); +dateFormatter = new SimpleDateFormat(this.dateFormat); dateFormatter.setTimeZone(tz); dayFormatter = new SimpleDateFormat(dd); dayFormatter.setTimeZone(tz); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] Add customizable date format for access log filename
I see your point. I can see how some might want that feature (hourly log rotation?), but maybe log rotation intervals and date format should be separate concerns. In my case, someone handling our logs prefers '.MM.dd' to '-MM-dd', so I simply wanted date format control. Maybe if the attribute were named something like 'logRotationDateFormat', no one could complain when they put milliseconds in their format :-) Mike Tim Funk wrote: I see a problem with this with respect to log rotation. The way things work now, on every request tomcat checks to see if the log needs rotated. (It actually checks at most, once a second). The way it determines to rotate the log is via the date format. Since the date format is hardcoded to contain just the day information - this is ok. But if a user defines a log date format containing the second (or even worse, the millisecond), then the logs would rotate every second. Which some may consider a feature :) -Tim Michael Heinrichs wrote: Much of the access log filename can be customized in the Valve declaration using prefix and suffix, but the date format used for the filename is hardcoded in the Valve code. Here's a patch that allows the date format to be specified in the Valve definition alongside prefix and suffix. If this patch is accepted, I can put together another patch for the admin webapp. See patch below. Mike Heinrichs Index: AccessLogValve.java === RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java,v retrieving revision 1.15 diff -u -r1.15 AccessLogValve.java --- AccessLogValve.java22 Nov 2002 20:27:12 -1.15 +++ AccessLogValve.java15 Jan 2003 19:19:32 - @@ -325,6 +325,11 @@ private long rotationLastChecked = 0L; +/** + * The access log filename date format + */ +private String dateFormat = -MM-dd; + // - Properties @@ -443,6 +448,28 @@ /** + * Return the date format string used for access log filenames + */ +public String getDateFormat() { + +return (dateFormat); + +} + + +/** + * Set the date format string used for access log filenames + * + * @param dateFormat The new date format + */ +public void setDateFormat(String dateFormat) { + +this.dateFormat = dateFormat; + +} + + +/** * Return the log file suffix. */ public String getSuffix() { @@ -1024,7 +1051,7 @@ if (timeZone.length() 5) timeZone = timeZone.substring(0, 1) + 0 + timeZone.substring(1, timeZone.length()); -dateFormatter = new SimpleDateFormat(-MM-dd); +dateFormatter = new SimpleDateFormat(this.dateFormat); dateFormatter.setTimeZone(tz); dayFormatter = new SimpleDateFormat(dd); dayFormatter.setTimeZone(tz); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Strange Cookie behavior with ie 6 and subdomains
Hi! I found a strange bug in internet explorer cookie handling that could possibile workarounded in tomcat: I have 2 different webapps on 2 different domains (a domain and a subdomain of this domain), e.g.: mydomain.com test.mydomain.com When I enter the first domain, a session cookie for this domain is set. The session then works fine for this domain. Then I view a page from the second domain. IE returns the cookie that was set in the first domain. Tomcat does'nt know that session id in the second context and sets a new cookie. Now the strange thing: The new Cookie is never returned from ie. So the new Session in the second domain is not valid and after each click a new SessionID is generated (i think IE always returns the cookie set in the first domain). A possible solution: If the name of the session cookie would be configurable (per host or per webapp), the hostname could added to that cookie. This would fix this issue on IE. Michael. __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Bis zu 100 MB Speicher bei http://premiummail.yahoo.de -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Strange Cookie behavior with ie 6 and subdomains
Hi! The user _is_ on the correct domain. The problem is, that the browser does not recognize, that test.mydomain.com and mydomain.com are different. BTW: Mozilla doesn't have this bug... On Mon, 13 Jan 2003 08:54:54 -0500, Tim Funk wrote: [ This is more suited for tomcat-user Please post followups to: [EMAIL PROTECTED] ] This is not isolated to IE6 but all browsers. If you are using apache - add the appropriate redirects to your httpd config to force the user to the correct domain. -Tim Michael Wyraz wrote: Hi! I found a strange bug in internet explorer cookie handling that could possibile workarounded in tomcat: I have 2 different webapps on 2 different domains (a domain and a subdomain of this domain), e.g.: mydomain.com test.mydomain.com When I enter the first domain, a session cookie for this domain is set. The session then works fine for this domain. Then I view a page from the second domain. IE returns the cookie that was set in the first domain. Tomcat does'nt know that session id in the second context and sets a new cookie. Now the strange thing: The new Cookie is never returned from ie. So the new Session in the second domain is not valid and after each click a new SessionID is generated (i think IE always returns the cookie set in the first domain). A possible solution: If the name of the session cookie would be configurable (per host or per webapp), the hostname could added to that cookie. This would fix this issue on IE. Michael. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Strange Cookie behavior with ie 6 and subdomains
Hi! I did the test: mozilla returns only one session-id per domain. ie returns both: the id of the parent domain and the new one. So it's not a browser bug. It's a tomcat bug ;-) I think tomcat (HttpProcessor.java?) has to be modified to check all of the session-ids returnd from the browser to find the right one. My personal workaround (until the bug is fixed) is to move the content from mydomain.com to www.mydomain.com. so the cookie does not conflict with the cookie from test.mydomain.com. Could one please add this bug to the bug database since i don't have an account there? Thanks a lot. Michael. On Mon, 13 Jan 2003 09:13:12 -0500, Tim Funk wrote: If a cookie is set for mydomain.com. Then the cookie is also sent to: www.mydomain.com foo.mydomain.com test.mydomain.com If Mozilla is NOT doing that. Then Mozilla has a bug. In reality - what is really happening is you have 2 cookies set: One for test.mydomain.com and one for mydomain.com. It just so happens that Mozilla is sending both cookies in such a way that tomcat gets lucky and picks up the right one for sessionid. IE sends it an incompatiable (but probably correct) way. Who knows what happens if you try using Opera. Write a test page from www.mydomain.com and dump all your request headers and you'll probably see that you are getting sent 2 jsessionid cookies. -Tim [...]
request changes on catalina.sh and setclasspath.sh
(1) I would like to request changes to catalina.sh: - Save PID in a file upon starting Tomcat - Remove the said PID file upon stopping it. Reason for request: This makes it possible to reliably, and programatically to check the existence of the Tomcat java process. ps command is not able to display full command and arguments. It is difficult to tell what the process is, programatically. The diff file: $ diff -c catalina.sh.orig catalina.sh *** catalina.sh.origSun Jan 12 12:15:20 2003 --- catalina.sh Sun Jan 12 12:52:53 2003 *** *** 201,206 --- 201,207 -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ $CATALINA_BASE/logs/catalina.out 21 + echo $! $CATALINA_BASE/logs/catalina.pid else $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ *** *** 209,219 --- 210,222 -Djava.io.tmpdir=$CATALINA_TMPDIR \ org.apache.catalina.startup.Bootstrap $@ start \ $CATALINA_BASE/logs/catalina.out 21 + echo $! $CATALINA_BASE/logs/catalina.pid fi elif [ $1 = stop ] ; then shift + rm -f $CATALINA_BASE/logs/catalina.pid exec $_RUNJAVA $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH \ -Dcatalina.base=$CATALINA_BASE \ (2) Remove the check for javac and jdb in setclasspath.sh. I do not see they are needed. JRE distribution do not have these two binaries. The diff: *** setclasspath.sh.origSun Jan 12 21:16:28 2003 --- setclasspath.sh Sun Jan 12 21:16:54 2003 *** *** 10,16 echo This environment variable is needed to run this program exit 1 fi ! if [ ! -r $JAVA_HOME/bin/java -o ! -r $JAVA_HOME/bin/jdb -o ! -r $JAVA_HOME/bin/javac ]; then echo The JAVA_HOME environment variable is not defined correctly echo This environment variable is needed to run this program exit 1 --- 10,16 echo This environment variable is needed to run this program exit 1 fi ! if [ ! -r $JAVA_HOME/bin/java ]; then echo The JAVA_HOME environment variable is not defined correctly echo This environment variable is needed to run this program exit 1 -- Michael Wang * http://www.unixlabplus.com/ * [EMAIL PROTECTED] Why pay $35 for a domain only if you can get domain and hosting at http://www.name2host.com/? name2host user: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PATCH] Re: ThreadPool
Costin Manolache wrote: You're probably right that addThread() doesn't need to be public - but I don't think it hurts too much either. It does when you're trying to refactor a class. It forces you to ask whether the interface really is used, or can you rearrange like you want to. Usually I grep the sources to determine that, but when you're using reflection/introspection (e.g., JMX), then there's no telling. You have to take an educated guess and hope that you don't break things. It also prevents the byte code compiler from doing complete, inlined optimization when a member is non-private. Also: MonitorRunnable, now that it has a start() method (for JMX, I presume) has no restriction on running more than one thread. This undercuts the meaning of interval, and makes stop() poorly defined. IMO MonitorRunnable, the session expiration thread ( one per ctx ) and the reloading thread ( one per ctx again ) What classes are you referring to specifically? StandardManager WebappLoader? should all go away and be replaced by a single mechanism. Maybe the JMX timer ? I'd hate to think what would happen if someone stopped the timer service. Also, using the event-driven approach to trigger maintenance activities in foreground threads would be quirky coding, and may not even be appropriate in classes that don't always have executing code. So I'd opt for java.util.Timer. It requires J2SE 1.3+...is that a problem? Here's what it looks like: * Replace MonitorRunnable with java.util.Timer. * The Timer thread is always daemonized; I couldn't understand why MonitorRunnable would conditionally do so based on ThreadPool. * Unlike the start/stop() MonitorRunnable i/f--which I assumed was for activating the new wait() interval--the Timer can never be stopped w/o shutting down the ThreadPool. Index: ThreadPool.java === RCS file: /home/cvspublic/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java,v retrieving revision 1.6 diff -u -r1.6 ThreadPool.java --- ThreadPool.java 24 Dec 2002 17:02:54 - 1.6 +++ ThreadPool.java 28 Dec 2002 08:29:12 - @@ -90,6 +90,34 @@ */ protected MonitorRunnable monitor; +/** + * Timer for scheduling maintenance runs. + * A lock on this variable should be considered to apply to + * {@link #maintenanceInterval} as well. + */ +private Timer maintenanceTimer = null; + +/** Milliseconds between maintenance runs */ + +private long maintenanceInterval = WORK_WAIT_TIMEOUT; + +/** + * Maintenance task to remove idle codeControlRunnable/codes + */ +private class MaintenanceTask extends TimerTask +{ + public void run() + { + try { + checkSpareControllers(); + } + catch (Throwable t) { + log.error( maintenance task exception (continuing task anyway): + t +); + // don't cancel(), keep trying + } + } +} + /* * Max number of threads that you can open in the pool. @@ -158,12 +186,39 @@ openThreads(minSpareThreads); monitor = new MonitorRunnable(this); + startMaintenanceTimer(); +} + + +/** + * Sets the time interval between maintenance runs. + * Silently enforces a minimum (currently 10 milliseconds). + * Also re-creates the maintenance thread. + */ +public void setMaintenanceInterval( long milliseconds ) +{ + if (milliseconds 10) milliseconds = 10; + + synchronized (maintenanceTimer) { + maintenanceInterval = milliseconds; + startMaintenanceTimer(); + } } -public MonitorRunnable getMonitor() { -return monitor; + +/** (Re)start the maintenance timer. */ + +private void startMaintenanceTimer() +{ + synchronized (maintenanceTimer) { + if (maintenanceTimer != null) maintenanceTimer.cancel(); + maintenanceTimer = new Timer( true ); + maintenanceTimer.schedule( new MaintenanceTask(), 0, + maintenanceInterval ); + } } + public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; } @@ -319,8 +374,14 @@ public synchronized void shutdown() { if(!stopThePool) { stopThePool = true; -monitor.terminate(); -monitor = null; + + synchronized (maintenanceTimer) { + if (maintenanceTimer != null) { + maintenanceTimer.cancel(); + maintenanceTimer = null; + } + } + for(int i = 0 ; i (currentThreadCount - currentThreadsBusy - 1) ; i++) { try { pool[i].terminate(); @@ -443,66 +504,6 @@ //loghelper.flush(); } -/** - * Periodically execute an
Re: [PATCH] Re: ThreadPool
Umm...that last patch won't compile, I forgot to remove a line. Knew I was forgetting to do something. :-[ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] Re: ThreadPool
Remy Maucherat wrote: Also: MonitorRunnable, now that it has a start() method (for JMX, I presume) has no restriction on running more than one thread. This undercuts the meaning of interval, and makes stop() poorly defined. I would like it if this was fixing any issue the above (which hasn't made it into a release yet) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [PATCH] Re: ThreadPool
Remy Maucherat wrote: Although refactoring the monitor timer code is relatively safe, the thread pool as a whole is a critical piece of code in Tomcat 4.1.x (= you should test things extensively after making a change). Since your patch doesn't build, I'll have to assume you didn't try to *run* with it either ;-) I know, I know. I intended to build *and* test it. I don't know why I pushed send. I shouldn't be up this late. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: implement ThreadPool with GenericObjectPool?
Costin Manolache wrote: Can you list any benefits on doing that ? The usual: code that's also used and tested by other projects; code that more people are familiar with; not further reinventing code. Any missing feature we'll gain ? More-flexible idle object cleanup; a timeout option on blocking when the pool is exhausted. (Can't say whether you've been missing these.) ThreadPool seems to work fine. Two days ago, I thought the code was sketchy. Now that I look closely at the version diffs, I see that the code that I considered most sketchy was just committed in 1.5. I have no specific bug to point to, thus my original question--I want to know what the more experienced maintainers think of ThreadPool. It appears that you thought that there were problems surrounding the code, judging from the debugging feature (JMX support) you're adding. And Remy thought about refactoring it a few weeks ago. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PATCH] Re: implement ThreadPool with GenericObjectPool?
Costin Manolache wrote: The main reason I'm cautious - this is a very critical piece of code. I also value stability (and more than performance). I'm tired of backing out and waiting to upgrade TC releases. (4.1.16 works for me, BTW.) the debugging feature (JMX support) you're adding. JMX is not a debugging feature - it's monitoring/control. It would allow people to see how many threads are used, to eventually stop threads or change the parameters dynamically. I know what JMX itself is--I'm going by the check-in comment: I want to add JMX support and make calls to store the state of the thread, i.e. what is the thread doing. This would allow people to debug hunged threads and allow more control. Perhaps I misunderstood this to mean debugging of the TC code, rather than the servlet's. In any case, ThreadPool will at least need this patch, since removeThread() is never called. I also can't imagine why addThread() and removeThread() would need to be more than private, given their role. Other liberal access modifiers abound. Also: MonitorRunnable, now that it has a start() method (for JMX, I presume) has no restriction on running more than one thread. This undercuts the meaning of interval, and makes stop() poorly defined. Index: ThreadPool.java === RCS file: /home/cvspublic/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java,v retrieving revision 1.5 diff -u -r1.5 ThreadPool.java --- ThreadPool.java 19 Dec 2002 05:45:42 - 1.5 +++ ThreadPool.java 24 Dec 2002 05:08:09 - @@ -560,7 +560,7 @@ } public void run() { - + try { while(true) { try { /* Wait for work. */ @@ -626,6 +626,9 @@ p.log.error(Unexpected exception, ie); } } + } finally { + p.removeThread( Thread.currentThread() ); + } } /** Run a task -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
subclass ThreadPool from GenericObjectPool?
Has anyone considered subclassing ThreadPool from commons-pool's GenericObjectPool? I'd be willing to work on it. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[PATCH] PoolTcpEndpoint.java (was: Thread priority)
Now that you've attracted my attention to this file I couldn't figure what the point of this code was: if (running) { if(null!= serverSocket) { if(factory==null){ accepted = serverSocket.accept(); } else { accepted = factory.acceptSocket(serverSocket); } ---if(!running) { ---if(null != accepted) { ---accepted.close(); // rude, but unlikely! ---accepted = null; ---} ---} if( factory != null accepted != null) factory.initSocket( accepted ); } } since it could never be executed, until I realized that you must have meant this: Index: PoolTcpEndpoint.java === RCS file: /home/cvspublic/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java,v retrieving revision 1.9 diff -u -r1.9 PoolTcpEndpoint.java --- PoolTcpEndpoint.java19 Dec 2002 05:31:46 - 1.9 +++ PoolTcpEndpoint.java19 Dec 2002 08:20:21 - @@ -120,7 +120,7 @@ private ServerSocket serverSocket; ThreadPoolRunnable listener; -private boolean running = false; +private volatile boolean running = false; private boolean initialized = false; static final int debug=0; While you're in there, some clean-up would be nice, too: @@ -338,27 +338,21 @@ // Private methods Socket acceptSocket() { + if (!running || serverSocket == null) return null; + Socket accepted = null; try { - if (running) { - if(null!= serverSocket) { - if(factory==null){ - accepted = serverSocket.accept(); - } - else { - accepted = factory.acceptSocket(serverSocket); - } - if(!running) { - if(null != accepted) { + accepted = (factory == null) ? + serverSocket.accept() : + factory.acceptSocket( serverSocket ); + + if (!running accepted != null) { accepted.close(); // rude, but unlikely! accepted = null; - } - } + } if( factory != null accepted != null) factory.initSocket( accepted ); - } - } } catch(InterruptedIOException iioe) { // normal part -- should happen regularly so -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: MOVE method processing of WebdavServlet
Yokota Takehiko wrote: Hi, all. There is a question about WebdavServlet in Tomcat4.1.12. I tried to send MOVE request to WebdavServlet and I expected that a file was moved, but it was copied and deleted. I think org.apache.catalina.servlets.WebdavServlet#doMove() should move resource instead of copying and deleting. (Or first try to move, and then copy and delete if it failed). What do you think this idea is? The webdav spec says that a MOVE should be treated as a COPY followed by a DELETE. It's difficult to precisely maintain these semantics without actually _doing_ a copy then a delete (though in the fairly limited catalina webdav servlet it shouldn't be too hard). There's no compelling reason to make this change. Mike -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Thread priority
Michael Smith wrote: Remy Maucherat wrote: I was wondering about how expensive the Thread.setPriority method is, and to which extent it does what it advetises. The extent to which it has an effect is very much platform (and probably JVM) dependent. It's also dependent on the permissions a user has - on many (all?) unix systems, only root may set a process or thread to higher than normal priority [...] I suspect that this will mean that your suggested use of these calls will [...] have no effect [...] on most common JVM implementations. [...] it's pretty unlikely to make any noticable difference in performance. That may be true for Linux--which only has setpriority(2) available to the common user--but Solaris and Windows JVMs can conceivably support raising the Java Thread priority. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Session de-serialization problem (with patch)
Hi, during work on session serialization my colleagues run into a problem with the startup order of the session manager vs listeners/filters. During startup the session manager is started before the listeners and filters. This implies that objects that depend on parts of the application can not be properly deserialized. (Apparently, a re-write to remove such dependencies is not feasible in our case.) Further this behaviour is inconsistent with the reload behaviour, which was previously changed due to http://issues.apache.org/bugzilla/show_bug.cgi?id=3733. We have patched this behaviour (see attachment) to start listeners/filters immediately _befor_ the session manager. This patch solves our problem and does not seem to cause any new issues with our application. However, due to the triviality of the patch, we have not made a thorough examination of the workings of o.a.c.core.StandardContext. Also, the patch is focused on one specific issue. It does not (unless by coincidence) ensure consistency in the reload/start behaviours. The patch is against 4.1.16, since 4.1.17 was released after the patch was written. Sincerely, Michael Eriksson --- StandardContext.java2002-12-16 11:31:45.0 +0100 +++ +jakarta-tomcat-4.1.16-src/catalina/src/share/org/apache/catalina/core/StandardContext.java + 2002-12-16 11:33:47.0 +0100 @@ -3566,15 +3566,7 @@ // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(START_EVENT, null); -// Configure and call application event listeners and filters -if (!listenerStart()) -ok = false; -if (ok) { -if (!filterStart()) -ok = false; -} - -if (ok (manager != null) (manager instanceof Lifecycle)) +if ((manager != null) (manager instanceof Lifecycle)) ((Lifecycle) manager).start(); } finally { @@ -3601,6 +3593,16 @@ postWelcomeFiles(); } +// Configure and call application event listeners and filters +if (ok) { +if (!listenerStart()) +ok = false; +} +if (ok) { +if (!filterStart()) +ok = false; +} + // Load and initialize all load on startup servlets if (ok) loadOnStartup(findChildren()); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Thread priority
Remy Maucherat wrote: I was wondering about how expensive the Thread.setPriority method is, and to which extent it does what it advetises. I don't think it's expensive at all. And it certainly has an effect. The point would be to assign the minimum priority to background reloading threads, as well as set the priority of the thread accepting on the server socket to the maximum while is it accepting, and then switch back to normal priority once the accept is done. You should save the priority and switch back to it. You can't assume that your initial priority is NORM_PRIORITY. I assume--since you're asking this and you know TC--that TC doesn't have it's own internal thread scheduler. Else you'd have to consider the interaction with that algorithm, too. That would prevent the only thread accepting on the server socket from being starved by the OS scheduler. One of the unequivocally good uses for setting priority. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]