Re: memory leaks (Tomcat 5.5.20 and JDK 1.6)
Do you monitor the memory usage over time? Is it steadily increasing? Or does it peak at one moment? Ronald. On Fri Aug 10 20:36:44 CEST 2007 Tomcat Users List users@tomcat.apache.org wrote: Hello Tomcat Users , Our web application uses Tomcat 5.5.20 with Java 1.6. The application's front end is designed in Flex and back end is web servcies deployed on axis. The application id running out of memory in about 2 days. We are optimizing the code and fixing memory leaks . is there a way to find out if Tomcat 5.5.20 has any inherent memory leaks. We are using J profiler and J probe for determining the memory usage of the appliocation during run time. Found this JIRa issue regaring memory leaks in functional tests (Tomcat 5.5.20) http://jira.atlassian.com/browse/JRA-12524?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel Please let me know, if you found any memory leak issues in Tomcat 5.5.20 . I think that 5.5.20 is a stable version of Tomcat, just wanted to know if there are any memory issues in this version. thank you, Suchitha.
Concurrent threads per session (limit = 3 ?)
Hi, if I am using the firefox browser to send requests to a tomcat servlet all new browser tabs belonging to the same session. I am running AJAX requests which block the servlet request thread 60 seconds waiting for a certain event. This leads to the uncomfortable behavior that the fourth request to the same session blocks until one of the other requests return/finishes. It seems to me that the tomcat (v 5.5) limits the number of threads per session to 3. I would like to increase this number to prevent blocking of further requests. How can I adjust this setting ? Greetings Andree Dresdner Bank AG Sitz/Registered Office: Frankfurt am Main, Handelsregister/Commercial Register: Amtsgericht/Local Court, Frankfurt am Main, HRB 14000 Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Michael Diekmann Vorstand/Board of Managing Directors: Herbert Walter (Vorsitzender/Chairman), Andreas Georgi, Franz Herrlein, Stefan Jentzsch, Wulf Meier, Andree Moschner, Klaus Rosenfeld, Otto Steinmetz, Friedrich Woebking This e-mail is confidential and the information contained in it may be privileged. It should not be read, copied or used by anyone other than the intended recipient. If you have received it in error, please contact the sender immediately by telephoning +44 (0)20 7623 8000 or by return email, and delete the e-mail and do not disclose its contents to any person. We believe, but do not warrant, that this e-mail and any attachments are virus free, but you must take full responsibility for virus checking. Please refer to http://www.dresdnerkleinwort.com/disc/email/ and read our e-mail disclaimer statement and monitoring policy.
Re: Concurrent threads per session (limit = 3 ?)
I doubt tomcat limits the number of Threads per session. To get the session id, tomcat need to parse the request, but this parsing occurs in the Http-Thread that handle that network connection. Having that HTTP-thread wait would be, for tomcat, wasting a Thread. On the other hand, it's common courtesy of browser to limit the number of connection per server to a reasonable amount (4 or 8 generally). AJAX request can't escape that limit :) Since you are using firefox, i suggest you take a look at about:config - filter=network.http You might find there useful configuration helps. En l'instant précis du 14/08/07 11:08, Riechert, Andree s'exprimait en ces termes: Hi, if I am using the firefox browser to send requests to a tomcat servlet all new browser tabs belonging to the same session. I am running AJAX requests which block the servlet request thread 60 seconds waiting for a certain event. This leads to the uncomfortable behavior that the fourth request to the same session blocks until one of the other requests return/finishes. It seems to me that the tomcat (v 5.5) limits the number of threads per session to 3. I would like to increase this number to prevent blocking of further requests. How can I adjust this setting ? Greetings Andree Dresdner Bank AG Sitz/Registered Office: Frankfurt am Main, Handelsregister/Commercial Register: Amtsgericht/Local Court, Frankfurt am Main, HRB 14000 Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Michael Diekmann Vorstand/Board of Managing Directors: Herbert Walter (Vorsitzender/Chairman), Andreas Georgi, Franz Herrlein, Stefan Jentzsch, Wulf Meier, Andree Moschner, Klaus Rosenfeld, Otto Steinmetz, Friedrich Woebking This e-mail is confidential and the information contained in it may be privileged. It should not be read, copied or used by anyone other than the intended recipient. If you have received it in error, please contact the sender immediately by telephoning +44 (0)20 7623 8000 or by return email, and delete the e-mail and do not disclose its contents to any person. We believe, but do not warrant, that this e-mail and any attachments are virus free, but you must take full responsibility for virus checking. Please refer to http://www.dresdnerkleinwort.com/disc/email/ and read our e-mail disclaimer statement and monitoring policy. -- http://www.noooxml.org/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Frequent SEVERE: Unable to receive message through TCP channel messages
Hi, In our prod environment we have two tomcat's [ 5.0.27] running on two linux boxes [ RHAS 3.0 update8 ] and using mod_jk2.0 thru apache for accessing the information. very frequently we see the following messages in the catalina.out and there are about 2 instances where tomcat stopped responding and we had to restart. the only errors that we see are the following.. There are INFO which keeps telling us member is disappeared and added and once in a while we have SEVERE messages. Could you let us know, what could be causing this problem? is there any additional configuration that are needed?, This environment is running for almost 18 months in production and off-late [ in the last 6 months] we have seen this happenned twice. I have attached both the error log found in the catalina.out and also the server.xml from both the tomcat. http://www.nabble.com/file/p12142134/catalina-error.out catalina-error.out http://www.nabble.com/file/p12142134/server-app1.xml server-app1.xml http://www.nabble.com/file/p12142134/server-app2.xml server-app2.xml -- View this message in context: http://www.nabble.com/Frequent-%22SEVERE%3A-Unable-to-receive-message-through-TCP-channel%22-messages-tf4266454.html#a12142134 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Frequent SEVERE: Unable to receive message through TCP channel messages
You configured a 3 seconds timeout for your heartbeat. If a node doesn't receive a heartbeat packet for 3 seconds, it assumes the other node is dead and closes the incoming replication connection. If the other node is not really dead, it will try to use this replication connection which will not work any more. Why could this happen: one possible reason are GC pauses. If you've got longer GC pauses, than your membership heartbeat timeout, then you run into such problems. During normal operations you should not observe any memberDisappeared messages. They should only show up, ehen you stop a node or it crashes, or you've got serious network problems with impact on the multicast heartbeat packets. If you decide to increase the membership timeout (which sounds like a good idea), keep in mind, that you need to wait the given time between stopping and restarting a node. Regards, Rainer nageshsrao wrote: Hi, In our prod environment we have two tomcat's [ 5.0.27] running on two linux boxes [ RHAS 3.0 update8 ] and using mod_jk2.0 thru apache for accessing the information. very frequently we see the following messages in the catalina.out and there are about 2 instances where tomcat stopped responding and we had to restart. the only errors that we see are the following.. There are INFO which keeps telling us member is disappeared and added and once in a while we have SEVERE messages. Could you let us know, what could be causing this problem? is there any additional configuration that are needed?, This environment is running for almost 18 months in production and off-late [ in the last 6 months] we have seen this happenned twice. I have attached both the error log found in the catalina.out and also the server.xml from both the tomcat. http://www.nabble.com/file/p12142134/catalina-error.out catalina-error.out http://www.nabble.com/file/p12142134/server-app1.xml server-app1.xml http://www.nabble.com/file/p12142134/server-app2.xml server-app2.xml - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
flush cache manually
Hi there: Can anyone please let me know how I can flush the cache of my tomcat installation, if possible how to do it manually. I am using Tomcat 4.1. best regards and TIA, arian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ClientAbortException / Broken Pipe?!
Folks; still messing around with an error like this: In our system, we offer customers a service to download files using a servlet. Some weeks ago (more or less when I considered switching to tomcat 6.0), the following error frequently started to show up in my log files: ... java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537) at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127) at org.apache.jk.core.MsgContext.action(MsgContext.java:302) at org.apache.coyote.Response.action(Response.java:183) at org.apache.coyote.Response.finish(Response.java:305) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:205) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:619) 14.08.2007 15:38:34 org.apache.jk.common.ChannelSocket processConnection WARNUNG: processCallbacks status 2 ... whereas I see a ClientAbortException caught by my applications exception handling mechanism. So far, I haven't been able to track this down, that's why I am kindly asking you for your skilled advice. What did I do so far trying to get hold of this: - Tomcat runs on a machine in the LAN, fronted by an apache2 httpd. - The error does appear both running tomcat 6.0.13 and 5.5.23. - I initially was using mod_jk 1.2.29 and switched to mod_proxy and Proxy/ProxyReverse setup just to make sure, and the error appears no matter whether using mod_jk or mod_proxy. - Right now, I am using apache2 prefork mpm, played around with different mpms just to be sure it's not an error related to apache2 itself, but this also didn't really change anything. - apache2 logging doesn't show any messages whenever such a ClientAbortException is thrown. - Customers, however, reported that whenever such a situation happened, the files downloaded were either 0k sized or corrupted. And I'm whole-heartedly clueless by now :( Is there anything I forgot to double-check? Using the latest JDK, no tcnative, running Ubuntu Linux 6.06.1. Applied pretty much every solution attempt I could come up with using google, including tweaking the HTTP connector setup in server.xml, removing tcnative, using mod_proxy instead of mod_jk - no success. Does anyone around here have any more ideas on how to get hold of this? Thanks loads in advance and bye, Kristian -- Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/ jab: [EMAIL PROTECTED] * icq: 48874445 * fon: ++49 176 2447 2771 One dreaming alone, it will be only a dream; many dreaming together is the beginning of a new reality. (Hundertwasser) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
undesirable session timeout behaviour
For reasons all my own, I want the timeout period to be quite short - essentially if a (human) user sits around doing nothing for more than 5 minutes, I want to timeout the session. I have configured tomcat to do this, and it works fine. Except. If the user initiates an activity (ok - I'll admit - it's a download) which takes longer than 5 minutes, the session gets timed out every time, since tomcat doesn't monitor activity in general for timeouts; tomcat just monitors user requests. I thought of setting the timeout to some large value at the start of a download, but that would require estimating bandwidth ahead of time (to estimate a good value for timeout). It would be more appealing to have download traffic reset the timeout clock, but I'm open to other insights. Has any body else had this problem, and (even better) created a solution? BugBear - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Concurrent threads per session (limit = 3 ?)
From: Riechert, Andree [mailto:[EMAIL PROTECTED] Subject: Concurrent threads per session (limit = 3 ?) It seems to me that the tomcat (v 5.5) limits the number of threads per session to 3. As David pointed out, it's not Tomcat imposing a limit - it's Firefox complying with the recommended limit in the HTTP RFC. If you want to change it, the pertinent about:config tags are: network.http.max-connections network.http.max-connections-per-server network.http.max-persistent-connections-per-proxy network.http.max-persistent-connections-per-server network.http.pipelining network.http.pipelining.maxrequests network.http.proxy.pipelining - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: character encodingg problem
It does! The following query converts the data correctly to it normal form. I am going to see if Oracle has any suggestions for a conversion at the DB level. This will make life much easier. Thanks, Joe select convert(abstract,'WE8ISO8859P1') from aacr20_dba.ms_supplimentary_details where ms_no = 'CAN-06-2483' -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Monday, August 13, 2007 5:24 PM To: Tomcat Users List Subject: Re: character encodingg problem -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joe, Russo, Joe wrote: Chris, Thank you very much for you response. I am going to try and look at how long it will take to do this type of conversion for 39 databases. Ouch! Perhaps your database supports a query that might be able to do this faster -- that is, without writing a Java program to do it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGwMvl9CaO5/Lv0PARAnwaAJ4z5jE2pKQv9TEN8cR6nigU3mgu2gCgpkTh anFJVL+pk7uiubWenulxzVE= =7teY -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can be mod_webapp used with Tomcat 5.5 (and above)?
Hi All, I just need to know answer to question in subject. I did some investigation and it seems that mod_webapp doesn't run with Tomcat 5.5 (it only runs with 4.0). I come to this conclusion according to: http://tomcat.apache.org/tomcat-5.5-doc/connectors.html http://tomcat.apache.org/tomcat-4.1-doc/config/webap So, am I right? Thanks, Petr - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClientAbortException / Broken Pipe?!
Have you noticed if this affects IE users and Firefox users equally? I ask because there's a known issue (that I've never seen an actual answer to) where IE causes these exceptions frequently with no ill effect to anything (other than the overhead of handling the exception in the VM on the server). I'd bet a box of donuts that it only happens for IE users. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Tue, August 14, 2007 9:57 am, Kristian Rink wrote: Folks; still messing around with an error like this: In our system, we offer customers a service to download files using a servlet. Some weeks ago (more or less when I considered switching to tomcat 6.0), the following error frequently started to show up in my log files: ... java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537) at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127) at org.apache.jk.core.MsgContext.action(MsgContext.java:302) at org.apache.coyote.Response.action(Response.java:183) at org.apache.coyote.Response.finish(Response.java:305) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:205) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:619) 14.08.2007 15:38:34 org.apache.jk.common.ChannelSocket processConnection WARNUNG: processCallbacks status 2 ... whereas I see a ClientAbortException caught by my applications exception handling mechanism. So far, I haven't been able to track this down, that's why I am kindly asking you for your skilled advice. What did I do so far trying to get hold of this: - Tomcat runs on a machine in the LAN, fronted by an apache2 httpd. - The error does appear both running tomcat 6.0.13 and 5.5.23. - I initially was using mod_jk 1.2.29 and switched to mod_proxy and Proxy/ProxyReverse setup just to make sure, and the error appears no matter whether using mod_jk or mod_proxy. - Right now, I am using apache2 prefork mpm, played around with different mpms just to be sure it's not an error related to apache2 itself, but this also didn't really change anything. - apache2 logging doesn't show any messages whenever such a ClientAbortException is thrown. - Customers, however, reported that whenever such a situation happened, the files downloaded were either 0k sized or corrupted. And I'm whole-heartedly clueless by now :( Is there anything I forgot to double-check? Using the latest JDK, no tcnative, running Ubuntu Linux 6.06.1. Applied pretty much every solution attempt I could come up with using google, including tweaking the HTTP connector setup in server.xml, removing tcnative, using mod_proxy instead of mod_jk - no success. Does anyone around here have any more ideas on how to get hold of this? Thanks loads in advance and bye, Kristian -- Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/ jab: [EMAIL PROTECTED] * icq: 48874445 * fon: ++49 176 2447 2771 One dreaming alone, it will be only a dream; many dreaming together is the beginning of a new reality. (Hundertwasser) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Proxy Server
Hi, I am using a Tomcat 5.5.9 server (only for development) on my local pc, within a company network that is using a proxy server. Problem: My application does http requests to a server were a proxy is required, as well as requests to an IP adress were no proxy is required / allowed. I added these 2 lines to my catalina.properties file: http.proxyPort=MYPROXY_PORT http.proxyHost= MYPROXY_URL If I add these lines, the service that requires the proxy works, however the other service does not work - and vice versa. Is there a way to configure Tomcat so that I may use a proxy, but exlude certain URLS, just like you can do in a browser? Thanks in advance, Marcus -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can be mod_webapp used with Tomcat 5.5 (and above)?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Petr, Petr Sumbera wrote: I just need to know answer to question in subject. I did some investigation and it seems that mod_webapp doesn't run with Tomcat 5.5 (it only runs with 4.0). I come to this conclusion according to: mod_webapp is s old. mod_webapp is no longer support by anything. Tomcat doesn't support it, and it is no longer being developed (though the website doesn't reflect that). You should use mod_jk if you want to connect Apache httpd or MS IIS to Tomcat. It is quite easy to use. See http://tomcat.apache.org/connectors-doc/ for more information. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGwc889CaO5/Lv0PARAtI0AJ9K/GjTfdjo4C6V0AShVhQARadDCQCfXC4Y m6210Ll5NmW6DfGF+NdM9qo= =hMD1 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CVE-2007-3382: Handling of cookies containing a ' character
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, Mark Thomas wrote: CVE-2007-3382: Handling of cookies containing a ' character Versions Affected: 5.5.0 to 5.5.24 Since 5.5.24 isn't yet released, will an upcoming 5.5.24 release include a fix for this problem given: Mitigation: Upgrade to 6.0.14 ? Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGwc+29CaO5/Lv0PARAug2AJ98oeF8HRLiXIqqzDEazknml6N/pwCgiNkO +SIMwuOKQWDG0lkT1okzO7I= =6jSG -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Prefix Paths on Servlets
My apologies, I replied to the wrong thread... So I've been able to deploy the servlet and access it with the /it prefix, however, I noticed that when I redeploy my war, my custom it#idm.war context file is also removed. Is there a way to keep that transient between deployments? Or package it with the war? On Aug 13, 2007, at 12:03 PM, Ryan Shelley wrote: My apologies... I'm on Tomcat 5.5. I'll take a look at it and give that a try. Thanks Chuck! On Aug 13, 2007, at 11:59 AM, Caldarale, Charles R wrote: From: Ryan Shelley [mailto:[EMAIL PROTECTED] Subject: Prefix Paths on Servlets However, it's recently been requested that I add a prefix to my servlet. Now it should be http://myhost/it/idm/... Assuming you're running a reasonably modern version of Tomcat (you didn't bother to tell us), then place your idm.war file somewhere other than the Host appBase directory (usually webapps). Then, create a file in conf/Catalina/[host] named it#idm.xml containing a Context element with a docBase attribute pointing to the location of the idm.war file. As long as you haven't hard-coded the path in the html/jsp/java source, you should be o.k. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e- mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CVE-2007-3382: Handling of cookies containing a ' character
Hi Christopher, Christopher Schultz wrote: Versions Affected: 5.5.0 to 5.5.24 Since 5.5.24 isn't yet released, will an upcoming 5.5.24 release include a fix for this problem given: Filip asked about interest in a 5.5.25. The plan at this point in time is to tag a new release at the end of the week. 5.5.24 as a version number was already used (but not released) and we won't reroll a new tarball with a version number, that was already used before. Until now I didn't notice a commited fix for the cookie problem, but Mark or Filip might comment whether there are plans to include a fix in 5.5.25. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClientAbortException / Broken Pipe?!
Do I get the box, if I can write a servlet and describe a procedure by which a Firefox user can produce the exception when calling my servlet? Frank W. Zammetti wrote: Have you noticed if this affects IE users and Firefox users equally? I ask because there's a known issue (that I've never seen an actual answer to) where IE causes these exceptions frequently with no ill effect to anything (other than the overhead of handling the exception in the VM on the server). I'd bet a box of donuts that it only happens for IE users. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClientAbortException / Broken Pipe?!
When I used the phrase I'd bet a box of donuts, what I should have written was ...and if I'm wrong, it won't be the first time :) Frank -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of Practical Ajax Projects With Java Technology (2006, Apress, ISBN 1-59059-695-1) and JavaScript, DOM Scripting and Ajax Projects (2007, Apress, ISBN 1-59059-816-4) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! On Tue, August 14, 2007 1:08 pm, Rainer Jung wrote: Do I get the box, if I can write a servlet and describe a procedure by which a Firefox user can produce the exception when calling my servlet? Frank W. Zammetti wrote: Have you noticed if this affects IE users and Firefox users equally? I ask because there's a known issue (that I've never seen an actual answer to) where IE causes these exceptions frequently with no ill effect to anything (other than the overhead of handling the exception in the VM on the server). I'd bet a box of donuts that it only happens for IE users. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Prefix Paths on Servlets
From: Ryan Shelley [mailto:[EMAIL PROTECTED] Subject: Re: Prefix Paths on Servlets So I've been able to deploy the servlet and access it with the /it prefix, however, I noticed that when I redeploy my war, my custom it#idm.war context file is also removed. You can't use the manager app or any other conventional script I know of to do deployment or redeployment. (Remember, your .war file must be placed outside of the normal webapps directory.) All that's needed to deploy the app is to copy the it#idm.xml file into conf/Catalina/[host] - nothing else should be moved or updated. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NoSuchMethod shutdown error
I just upgraded from 5.5.9 to 5.5.23, and now, when I shut down tomcat, I get these errors. Any idea whats going on? Looks like I have an out of date jar file on the classpath - but as far as I know, these are tomcat only jar files... Thanks INFO: Server startup in 8284 ms Aug 14, 2007 12:30:02 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 Aug 14, 2007 12:30:03 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Aug 14, 2007 12:30:03 PM org.apache.catalina.startup.HostConfig undeployApps WARNING: Error while removing context [/ap] java.lang.NoSuchMethodError: org.apache.commons.modeler.util.IntrospectionUtils.clear()V at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1644) at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1496) at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:734) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4398) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:893) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1180) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1151) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1055) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1067) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448) at org.apache.catalina.core.StandardService.stop(StandardService.java:510) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:734) at org.apache.catalina.startup.Catalina.stop(Catalina.java:602) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:645) Aug 14, 2007 12:30:04 PM org.apache.catalina.startup.HostConfig undeployApps WARNING: Error while removing context [] java.lang.NoSuchMethodError: org.apache.commons.modeler.util.IntrospectionUtils.clear()V at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1644) at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1496) at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:734) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4398) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:893) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1180) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1151) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1055) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1067) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448) at org.apache.catalina.core.StandardService.stop(StandardService.java:510) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:734) at org.apache.catalina.startup.Catalina.stop(Catalina.java:602) at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:645) Aug 14, 2007 12:30:04 PM org.apache.catalina.startup.HostConfig undeployApps WARNING: Error while removing context [/manager] java.lang.NoSuchMethodError: org.apache.commons.modeler.util.IntrospectionUtils.clear()V at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1644) at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1496) at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:734) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4398) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:893) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1180) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1151) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1055) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1067) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448) at org.apache.catalina.core.StandardService.stop(StandardService.java:510) at
smtp server
I am trying to create a simple registration application right now that should send an email to the user after registration. Are there free smtp servers or any that are recommended over others for running on a windows box? I am using Tomcat 5.0 and javamail. TIA - Mike - Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
Re: NoSuchMethod shutdown error
When I was upgrading tomcat, I had a jar file hang around in source control that shouldn't have been there. I had both commons-modeler.jar and commons-modeler-2.0.jar in my server lib folder. All better now, Thanks, Dan On 8/14/07, Martin Gainty [EMAIL PROTECTED] wrote: Dan- did you check your manifest.mf in your $CATALINA_HOME/commons/lib/commons-modeler.jar is at least version 1.1? e.g. Manifest-Version: 1.1 Ant-Version: Apache Ant 1.5.3 Created-By: 1.4.1_01-b01 (Sun Microsystems Inc.) Extension-Name: org.apache.commons.modeler Specification-Vendor: Apache Software Foundation Specification-Version: 1.1 Implementation-Vendor-Id: org.apache Implementation-Vendor: Apache Software Foundation Implementation-Version: 1.1.0 HTH/ M-- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: smtp server
We use Gordano's NTMail. It's not free, but has worked well for us and isn't very expensive for a small number of mailboxes. Mike Peremsky wrote: I am trying to create a simple registration application right now that should send an email to the user after registration. Are there free smtp servers or any that are recommended over others for running on a windows box? I am using Tomcat 5.0 and javamail. TIA - Mike - Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CVE-2007-3382: Handling of cookies containing a ' character
Rainer Jung wrote: Until now I didn't notice a commited fix for the cookie problem, but Mark or Filip might comment whether there are plans to include a fix in 5.5.25. For CVE 3382, the fix appears to be in 5.5.x HEAD (rev 559280 and rev 557468) and 6.0.x HEAD (rev 557467) -- These checkins were committed around July 19th. These checkins may also apply to CVE-3385 but I'm still researching. http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Cookies.java?view=log http://svn.apache.org/viewvc/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/http/Cookies.java?view=log -John - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Proxy Server
The stock answer is to setup mod_proxy under Apache and use Apache to front-end load all your requests (details located here) http://tomcat.apache.org/tomcat-5.5-doc/proxy-howto.html Note that If you have any appreciable amount of static content (watch your jmeter perf nosedive) then you will want to look into implementing mod_jk If you dont want to go thru the complexity of installing yet another system then you can use the tried and true request.getHeader as in String Referer_value = request.getHeader(HTTP_REFERER) and redirect the request according to some criteria if Referer_value == localhost (this request is for my server so process normally) else { String serverURL = request.getParameter(serverURL); String deployuri = request.getParameter(deployuri); String redirectURL = serverURL + deployuri; response.sendRedirect(redirectURL); } If you've installed Tomcat the example code to retrieve headers is located at http://YourComputer:8080/servlets-examples/reqheaders.html Viel Gluck/ Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Tuesday, August 14, 2007 11:21 AM Subject: Proxy Server Hi, I am using a Tomcat 5.5.9 server (only for development) on my local pc, within a company network that is using a proxy server. Problem: My application does http requests to a server were a proxy is required, as well as requests to an IP adress were no proxy is required / allowed. I added these 2 lines to my catalina.properties file: http.proxyPort=MYPROXY_PORT http.proxyHost= MYPROXY_URL If I add these lines, the service that requires the proxy works, however the other service does not work - and vice versa. Is there a way to configure Tomcat so that I may use a proxy, but exlude certain URLS, just like you can do in a browser? Thanks in advance, Marcus -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unsubscribe me please
please unsubscribe - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multiple comet requests
How do you send multiple requests to the same comet servlet? Sending multiple chunks of a single request is fine. My problem occurs after the client ends the chunked transaction by sending 0CRLFCRLF to the server. The comet servlet correctly registers the END event. But then the client subsequently tries to initiate a new chunked request by sending new http headers and a new chunk. The comet servlet receives a BEGIN event, immediately followed by an END event. A READ event is never generated for the new chunk. No ERROR events are registered either. Sequence: 1st request BEGIN READ END 2nd request BEGIN END - why an END event and not a READ? Below are my test client and test comet servlet. Any thoughts on what I'm doing wrong? (I apologize in advance if this is a lack of understanding of http on my part. I have looked at the specs and tried to follow the rules but am still running into problems.) Thanks, Peter - test servlet import java.io.IOException; import java.io.InputStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.CometEvent; import org.apache.catalina.CometProcessor; public class CometTestServlet extends HttpServlet implements CometProcessor { private static final long serialVersionUID = 5472498184127924791L; public void event(CometEvent cometEvent) throws IOException, ServletException { HttpServletRequest request = cometEvent.getHttpServletRequest(); HttpServletResponse response = cometEvent.getHttpServletResponse(); // don't want timeout events cometEvent.setTimeout(100); if (cometEvent.getEventType() == CometEvent.EventType.BEGIN) { log(Begin for session: + request.getSession(true).getId()); } else if (cometEvent.getEventType() == CometEvent.EventType.ERROR) { log(Error for session: + request.getSession(true).getId() + , + cometEvent.getEventSubType()); cometEvent.close(); } else if (cometEvent.getEventType() == CometEvent.EventType.END) { log(End for session: + request.getSession(true).getId()); cometEvent.close(); } else if (cometEvent.getEventType() == CometEvent.EventType.READ) { log(Read for session: + request.getSession(true).getId()); respond(request, response); } } private void respond(HttpServletRequest request, HttpServletResponse response) throws IOException { String clientMessage = read(request); if (clientMessage != null clientMessage.length() 0) { response.getWriter().print(clientMessage); response.getWriter().flush(); } } private String read(HttpServletRequest request) throws IOException { InputStream is = request.getInputStream(); StringBuffer inputBuffer = new StringBuffer(); byte[] buf = new byte[512]; while (is.available() 0) { int n = is.read(buf); // can throw an IOException if (n 0) { inputBuffer.append(new String(buf, 0, n)); log(Read + n + bytes: + new String(buf, 0, n) + for session: + request.getSession(true).getId()); } else if (n 0) { log(comet read error); } } return inputBuffer.toString(); } } /test servlet - test client import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; public class CometTestClient1 { public static final String ENCODING = ISO-8859-1; private Socket socket; private OutputStream out; public static void main(String[] args) throws Exception { CometTestClient1 test = new CometTestClient1(); test.test(); } public CometTestClient1() throws IOException { initConnection(); } private void initConnection() throws IOException { socket = new Socket(127.0.0.1, 80); socket.setKeepAlive(true); out = socket.getOutputStream(); sendHeaders(); } private void sendHeaders() throws IOException { println(GET /CometTest HTTP/1.1); println(Host: 127.0.0.1); println(User-Agent: test); println(Transfer-Encoding: chunked); println(Connection: keep-alive); } private void test() throws IOException { sendChunkedMessage(); try { Thread.sleep(6); } catch (InterruptedException ie) { ie.printStackTrace(); } // doesn't seem to matter if I create a new socket connection or not //initConnection(); sendHeaders(); sendChunkedMessage(); } private void sendChunkedMessage() throws IOException { println(); println(10); print(test data test 1); out.flush();
Removing the port identifier
Is there a way to remove the port number from a https request where the original url looks something like this: https://host_name:8443/ The approach to change the server.xml file (where the connector port is changed from 8443 to 443) is not practical for us. When this is done, Tomcat requires the root user to run. We consider this a security risk. We have considered a port forwarder, but we are unclear whether to install this on the Tomcat server or router. In any event, we are not at all sure this is the best approach. Any advice will be appreciated. Our operating system is Mac OS X. Thanks, Stephen - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing the port identifier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stephen, Stephen Caine wrote: Is there a way to remove the port number from a https request where the original url looks something like this: https://host_name:8443/ If the URL does not contain the port number, then the web browser will fail to make a connection since it will use the default port for the service (443 for HTTPS). The approach to change the server.xml file (where the connector port is changed from 8443 to 443) is not practical for us. When this is done, Tomcat requires the root user to run. We consider this a security risk. Tomcat does not require you to run it as root in order to use port 443. There are various techniques, including using a web server such as Apache httpd to front Tomcat, iptables (or similar) tricks to re-route ports, or using jsvc to gain non-root access to port 443 (and others). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGwizP9CaO5/Lv0PARApHhAJ46d3DI8B8/7RwJm9VPrUNNpPtBXACfVt26 Ybxw/4LYf2+lF4w14NVwMec= =Uhgb -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing the port identifier
On 8/14/07, Stephen Caine [EMAIL PROTECTED] wrote: Is there a way to remove the port number from a https request where the original url looks something like this: https://host_name:8443/ The approach to change the server.xml file (where the connector port is changed from 8443 to 443) is not practical for us. When this is done, Tomcat requires the root user to run. Nope; see the reference to jsvc here: http://tomcat.apache.org/tomcat-6.0-doc/setup.html HTH, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple comet requests
hi Peter, thanks for the example, I am able to reproduce this error, let me take a look and see why it is happening, Filip Peter Warren wrote: How do you send multiple requests to the same comet servlet? Sending multiple chunks of a single request is fine. My problem occurs after the client ends the chunked transaction by sending 0CRLFCRLF to the server. The comet servlet correctly registers the END event. But then the client subsequently tries to initiate a new chunked request by sending new http headers and a new chunk. The comet servlet receives a BEGIN event, immediately followed by an END event. A READ event is never generated for the new chunk. No ERROR events are registered either. Sequence: 1st request BEGIN READ END 2nd request BEGIN END - why an END event and not a READ? Below are my test client and test comet servlet. Any thoughts on what I'm doing wrong? (I apologize in advance if this is a lack of understanding of http on my part. I have looked at the specs and tried to follow the rules but am still running into problems.) Thanks, Peter - test servlet import java.io.IOException; import java.io.InputStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.CometEvent; import org.apache.catalina.CometProcessor; public class CometTestServlet extends HttpServlet implements CometProcessor { private static final long serialVersionUID = 5472498184127924791L; public void event(CometEvent cometEvent) throws IOException, ServletException { HttpServletRequest request = cometEvent.getHttpServletRequest(); HttpServletResponse response = cometEvent.getHttpServletResponse(); // don't want timeout events cometEvent.setTimeout(100); if (cometEvent.getEventType() == CometEvent.EventType.BEGIN) { log(Begin for session: + request.getSession(true).getId()); } else if (cometEvent.getEventType() == CometEvent.EventType.ERROR) { log(Error for session: + request.getSession(true).getId() + , + cometEvent.getEventSubType()); cometEvent.close(); } else if (cometEvent.getEventType() == CometEvent.EventType.END) { log(End for session: + request.getSession(true).getId()); cometEvent.close(); } else if (cometEvent.getEventType() == CometEvent.EventType.READ) { log(Read for session: + request.getSession(true).getId()); respond(request, response); } } private void respond(HttpServletRequest request, HttpServletResponse response) throws IOException { String clientMessage = read(request); if (clientMessage != null clientMessage.length() 0) { response.getWriter().print(clientMessage); response.getWriter().flush(); } } private String read(HttpServletRequest request) throws IOException { InputStream is = request.getInputStream(); StringBuffer inputBuffer = new StringBuffer(); byte[] buf = new byte[512]; while (is.available() 0) { int n = is.read(buf); // can throw an IOException if (n 0) { inputBuffer.append(new String(buf, 0, n)); log(Read + n + bytes: + new String(buf, 0, n) + for session: + request.getSession(true).getId()); } else if (n 0) { log(comet read error); } } return inputBuffer.toString(); } } /test servlet - test client import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; public class CometTestClient1 { public static final String ENCODING = ISO-8859-1; private Socket socket; private OutputStream out; public static void main(String[] args) throws Exception { CometTestClient1 test = new CometTestClient1(); test.test(); } public CometTestClient1() throws IOException { initConnection(); } private void initConnection() throws IOException { socket = new Socket(127.0.0.1, 80); socket.setKeepAlive(true); out = socket.getOutputStream(); sendHeaders(); } private void sendHeaders() throws IOException { println(GET /CometTest HTTP/1.1); println(Host: 127.0.0.1); println(User-Agent: test); println(Transfer-Encoding: chunked); println(Connection: keep-alive); } private void test() throws IOException { sendChunkedMessage(); try { Thread.sleep(6); } catch (InterruptedException ie) { ie.printStackTrace(); } // doesn't seem to matter if I create a new socket connection or not //initConnection(); sendHeaders(); sendChunkedMessage(); }
Re: multiple comet requests
turns out that if the request is comet, the recycling of the input/output filter is not happening. I have fixed this, you can try the tomcat-coyote.jar from http://people.apache.org/~fhanik/tomcat/tomcat-coyote.jar Filip Filip Hanik - Dev Lists wrote: hi Peter, thanks for the example, I am able to reproduce this error, let me take a look and see why it is happening, Filip Peter Warren wrote: How do you send multiple requests to the same comet servlet? Sending multiple chunks of a single request is fine. My problem occurs after the client ends the chunked transaction by sending 0CRLFCRLF to the server. The comet servlet correctly registers the END event. But then the client subsequently tries to initiate a new chunked request by sending new http headers and a new chunk. The comet servlet receives a BEGIN event, immediately followed by an END event. A READ event is never generated for the new chunk. No ERROR events are registered either. Sequence: 1st request BEGIN READ END 2nd request BEGIN END - why an END event and not a READ? Below are my test client and test comet servlet. Any thoughts on what I'm doing wrong? (I apologize in advance if this is a lack of understanding of http on my part. I have looked at the specs and tried to follow the rules but am still running into problems.) Thanks, Peter - test servlet import java.io.IOException; import java.io.InputStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.CometEvent; import org.apache.catalina.CometProcessor; public class CometTestServlet extends HttpServlet implements CometProcessor { private static final long serialVersionUID = 5472498184127924791L; public void event(CometEvent cometEvent) throws IOException, ServletException { HttpServletRequest request = cometEvent.getHttpServletRequest(); HttpServletResponse response = cometEvent.getHttpServletResponse(); // don't want timeout events cometEvent.setTimeout(100); if (cometEvent.getEventType() == CometEvent.EventType.BEGIN) { log(Begin for session: + request.getSession(true).getId()); } else if (cometEvent.getEventType() == CometEvent.EventType.ERROR) { log(Error for session: + request.getSession(true).getId() + , + cometEvent.getEventSubType()); cometEvent.close(); } else if (cometEvent.getEventType() == CometEvent.EventType.END) { log(End for session: + request.getSession(true).getId()); cometEvent.close(); } else if (cometEvent.getEventType() == CometEvent.EventType.READ) { log(Read for session: + request.getSession(true).getId()); respond(request, response); } } private void respond(HttpServletRequest request, HttpServletResponse response) throws IOException { String clientMessage = read(request); if (clientMessage != null clientMessage.length() 0) { response.getWriter().print(clientMessage); response.getWriter().flush(); } } private String read(HttpServletRequest request) throws IOException { InputStream is = request.getInputStream(); StringBuffer inputBuffer = new StringBuffer(); byte[] buf = new byte[512]; while (is.available() 0) { int n = is.read(buf); // can throw an IOException if (n 0) { inputBuffer.append(new String(buf, 0, n)); log(Read + n + bytes: + new String(buf, 0, n) + for session: + request.getSession(true).getId()); } else if (n 0) { log(comet read error); } } return inputBuffer.toString(); } } /test servlet - test client import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; public class CometTestClient1 { public static final String ENCODING = ISO-8859-1; private Socket socket; private OutputStream out; public static void main(String[] args) throws Exception { CometTestClient1 test = new CometTestClient1(); test.test(); } public CometTestClient1() throws IOException { initConnection(); } private void initConnection() throws IOException { socket = new Socket(127.0.0.1, 80); socket.setKeepAlive(true); out = socket.getOutputStream(); sendHeaders(); } private void sendHeaders() throws IOException { println(GET /CometTest HTTP/1.1); println(Host: 127.0.0.1); println(User-Agent: test); println(Transfer-Encoding: chunked); println(Connection: keep-alive); } private void test() throws IOException { sendChunkedMessage(); try {
utf-8 encoding problem
My problem is this: One of my pages with an apostrophe was not displaying properly, so I added to my jsp: %@ page contentType=text/html; charset=UTF-8% When I did that my content displayed correctly, but on form submission it got corrupted. You can view the problem here: http://b.tupari.net/ One page displays correctly, but on submit the value gets mangled. The other page doesn't display correctly, but if you cut and paste into the form from the first page the apostrophe does come out correctly on submit. This happens in both firefox and konqueror. So who is to blame here? The web browsers? Tomcat? Apache? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClientAbortException / Broken Pipe?!
Rainer Jung [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Do I get the box, if I can write a servlet and describe a procedure by which a Firefox user can produce the exception when calling my servlet? I think that something like (haven't actually tried it myself, mostly because I have servers with infinite timeouts): protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType(text/plain); PrintWriter out = response.getWriter(); out.println(Hello World); out.flush(); try { Thread.sleep(timeout); // timeout is = the configured timeout on Apache } catch(InterruptedException iex) { //ignore } } should work. If anyone has a more interesting example, I'd love to see it :). Frank W. Zammetti wrote: Have you noticed if this affects IE users and Firefox users equally? I ask because there's a known issue (that I've never seen an actual answer to) where IE causes these exceptions frequently with no ill effect to anything (other than the overhead of handling the exception in the VM on the server). I'd bet a box of donuts that it only happens for IE users. Yes, it should have no ill effects, since it is happening where Tomcat is telling Apache that it is done with the request, so Apache can reuse it for somebody else. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoSuchMethod shutdown error
also, I noticed that you have some Failed Shutdown of Apache Portable Runtime errors, if you want to make that message go away grab the APR native library for your platform and drop it into %JAVA_HOME%/bin symptoms: on startup something like the following gets printed out: INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path and on shutdown- INFO: Failed shutdown of Apache Portable Runtime Basically, tomcat looks for a native library that lets it do funky stuff related to performance. In development we don't usually care about performance, but if you want to get rid of those messages, then the easiest way is to drop the tomcat native dll onto the system path, the best place being %JAVA_HOME%/bin read about the APR: http://tomcat.apache.org/tomcat-5.5-doc/apr.html I downloaded it here: http://apr.apache.org/download.cgi -- * Matthew Kerle ** IT Consultant* ** * Canberra, Australia* Mobile: +61404 096 863 Email: mailto:[EMAIL PROTECTED] Matthew Kerle mailto:[EMAIL PROTECTED] Web: Matthew Kerle http://threebrightlights.blogspot.com/ Dan Armbrust wrote: When I was upgrading tomcat, I had a jar file hang around in source control that shouldn't have been there. I had both commons-modeler.jar and commons-modeler-2.0.jar in my server lib folder. All better now, Thanks, Dan On 8/14/07, Martin Gainty [EMAIL PROTECTED] wrote: Dan- did you check your manifest.mf in your $CATALINA_HOME/commons/lib/commons-modeler.jar is at least version 1.1? e.g. Manifest-Version: 1.1 Ant-Version: Apache Ant 1.5.3 Created-By: 1.4.1_01-b01 (Sun Microsystems Inc.) Extension-Name: org.apache.commons.modeler Specification-Vendor: Apache Software Foundation Specification-Version: 1.1 Implementation-Vendor-Id: org.apache Implementation-Vendor: Apache Software Foundation Implementation-Version: 1.1.0 HTH/ M-- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple comet requests
Filip, thank you for your very prompt response! I replaced the tomcat-coyote.jar with yours and now get the following exception on startup. Is there another jar that I need to update? Thanks, Peter Aug 14, 2007 9:02:29 PM org.apache.tomcat.util.digester.Digester startElement SEVERE: Begin event threw error java.lang.NoSuchMethodError: org.apache.tomcat.util.IntrospectionUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)V at org.apache.catalina.startup.SetAllPropertiesRule.begin(SetAllPropertiesRule.java:66) at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644) at org.apache.catalina.startup.Catalina.load(Catalina.java:504) at org.apache.catalina.startup.Catalina.load(Catalina.java:538) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412) Filip Hanik - Dev Lists wrote: turns out that if the request is comet, the recycling of the input/output filter is not happening. I have fixed this, you can try the tomcat-coyote.jar from http://people.apache.org/~fhanik/tomcat/tomcat-coyote.jar Filip Filip Hanik - Dev Lists wrote: hi Peter, thanks for the example, I am able to reproduce this error, let me take a look and see why it is happening, Filip Peter Warren wrote: How do you send multiple requests to the same comet servlet? Sending multiple chunks of a single request is fine. My problem occurs after the client ends the chunked transaction by sending 0CRLFCRLF to the server. The comet servlet correctly registers the END event. But then the client subsequently tries to initiate a new chunked request by sending new http headers and a new chunk. The comet servlet receives a BEGIN event, immediately followed by an END event. A READ event is never generated for the new chunk. No ERROR events are registered either. Sequence: 1st request BEGIN READ END 2nd request BEGIN END - why an END event and not a READ? Below are my test client and test comet servlet. Any thoughts on what I'm doing wrong? (I apologize in advance if this is a lack of understanding of http on my part. I have looked at the specs and tried to follow the rules but am still running into problems.) Thanks, Peter - test servlet import java.io.IOException; import java.io.InputStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.CometEvent; import org.apache.catalina.CometProcessor; public class CometTestServlet extends HttpServlet implements CometProcessor { private static final long serialVersionUID = 5472498184127924791L; public void event(CometEvent cometEvent) throws IOException, ServletException { HttpServletRequest request = cometEvent.getHttpServletRequest(); HttpServletResponse response = cometEvent.getHttpServletResponse(); // don't want timeout events cometEvent.setTimeout(100); if (cometEvent.getEventType() == CometEvent.EventType.BEGIN) { log(Begin for session: + request.getSession(true).getId()); } else if (cometEvent.getEventType() == CometEvent.EventType.ERROR) { log(Error for session: + request.getSession(true).getId() + , + cometEvent.getEventSubType()); cometEvent.close(); } else if (cometEvent.getEventType() == CometEvent.EventType.END) { log(End for session: +
Re: Removing the port identifier
the only way to get rid of the port number is to have something listening on :443 (that's the way browsers are, sorry), and then hand requests over to tomcat, so to get what you want something will have to bind to :443 at some point, requiring root privs. What you want is something that will bind to the port as a privileged user and subsequently drop priv's to a limited user. the Apache web server is excellent for this kind of thing. The easiest way to do this would be with apache sitting in front of tomcat with either mod_jk2 or forwarding requests with mod_rewrite. It doesn't really matter where the port forwarder sits, but usually you want to align with existing IT infrastructure and use an existing internal/internet web server to redirect requests to your app. If your company already has apache then this is a cinch, otherwise you'll have to figure out how to reverse-proxy with the web server du jour... Is this close to what you're after? -- * Matthew Kerle ** IT Consultant* ** * Canberra, Australia* Mobile: +61404 096 863 Email: mailto:[EMAIL PROTECTED] Matthew Kerle mailto:[EMAIL PROTECTED] Web: Matthew Kerle http://threebrightlights.blogspot.com/ Stephen Caine wrote: Is there a way to remove the port number from a https request where the original url looks something like this: https://host_name:8443/ The approach to change the server.xml file (where the connector port is changed from 8443 to 443) is not practical for us. When this is done, Tomcat requires the root user to run. We consider this a security risk. We have considered a port forwarder, but we are unclear whether to install this on the Tomcat server or router. In any event, we are not at all sure this is the best approach. Any advice will be appreciated. Our operating system is Mac OS X. Thanks, Stephen - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing the port identifier
oops, sorry I meant mod_proxy, not mod_rewrite... -- * Matthew Kerle ** IT Consultant* ** * Canberra, Australia* Mobile: +61404 096 863 Email: mailto:[EMAIL PROTECTED] Matthew Kerle mailto:[EMAIL PROTECTED] Web: Matthew Kerle http://threebrightlights.blogspot.com/ Matthew Kerle wrote: the only way to get rid of the port number is to have something listening on :443 (that's the way browsers are, sorry), and then hand requests over to tomcat, so to get what you want something will have to bind to :443 at some point, requiring root privs. What you want is something that will bind to the port as a privileged user and subsequently drop priv's to a limited user. the Apache web server is excellent for this kind of thing. The easiest way to do this would be with apache sitting in front of tomcat with either mod_jk2 or forwarding requests with mod_rewrite. It doesn't really matter where the port forwarder sits, but usually you want to align with existing IT infrastructure and use an existing internal/internet web server to redirect requests to your app. If your company already has apache then this is a cinch, otherwise you'll have to figure out how to reverse-proxy with the web server du jour... Is this close to what you're after? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Removing the port identifier
From: Matthew Kerle [mailto:[EMAIL PROTECTED] Subject: Re: Removing the port identifier the Apache web server is excellent for this kind of thing. There are much better ways to run Tomcat on low ports than adding the path length of another web server; several messages have already pointed this out. The easiest way to do this would be with apache sitting in front of tomcat with either mod_jk2 I hope you're not seriously recommending use of a package that's been deprecated for over two years... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removing the port identifier
well spotted, I apologise! the correct connector is mod_jk (1.2). As for running tomcat on low ports, it depends on deployment. if your app needs to sit within a larger site then it makes sense, but if it's standalone then using another method to run on a low port would be a better solution. If the application has a lot of static content then it makes good performance sense to put something in front of it, either apache or squid. but that's probably not an issue in this case...;-p ! -- * Matthew Kerle ** IT Consultant* ** * Canberra, Australia* Mobile: +61404 096 863 Email: mailto:[EMAIL PROTECTED] Matthew Kerle mailto:[EMAIL PROTECTED] Web: Matthew Kerle http://threebrightlights.blogspot.com/ Caldarale, Charles R wrote: From: Matthew Kerle [mailto:[EMAIL PROTECTED] Subject: Re: Removing the port identifier the Apache web server is excellent for this kind of thing. There are much better ways to run Tomcat on low ports than adding the path length of another web server; several messages have already pointed this out. The easiest way to do this would be with apache sitting in front of tomcat with either mod_jk2 I hope you're not seriously recommending use of a package that's been deprecated for over two years... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Removing the port identifier
From: Matthew Kerle [mailto:[EMAIL PROTECTED] Subject: Re: Removing the port identifier If the application has a lot of static content then it makes good performance sense to put something in front of it, either apache or squid. but that's probably not an issue in this case...;-p ! Actually, that's not really true anymore. The current Tomcat without APR is almost as fast as httpd for delivering non-SSL static content, and with APR it's pretty much the same for both non-SSL and SSL traffic (since it's the same code). There are reasons to use httpd in front of Tomcat, but delivering static content isn't one of them. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat performance on static content over SSL/non-SSL
Caldarale, Charles R wrote: From: Matthew Kerle [mailto:[EMAIL PROTECTED] Subject: Re: Removing the port identifier Actually, that's not really true anymore. The current Tomcat without APR is almost as fast as httpd for delivering non-SSL static content, and with APR it's pretty much the same for both non-SSL and SSL traffic (since it's the same code). There are reasons to use httpd in front of Tomcat, but delivering static content isn't one of them. really? that's pretty cool, I didn't know that. do you have any metrics? Apart from integration into a larger site or static content, when would you put httpd in front of tomcat? matt. http://threebrightlights.blogspot.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]