Re: IIS 6.0 / JK1.2.25 / Tomcat 5.5.20 - Service temporary unavailable
Hi Rainer, Thanks for jumping in again.. Rainer Jung-3 wrote: When using big heaps, you need to take extra effort to get your GC settings right. Do you have GC-Logs? What are the JVM options you use to start Tomcat? The JVM options: -Dcatalina.base=D:\tomcat -Dcatalina.home=D:\tomcat -Djava.endorsed.dirs=D:\tomcat\common\endorsed -Djava.io.tmpdir=D:\tomcat\temp -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory -Dcom.sun.management.jmxremote -XX:MaxPermSize=512m -Xloggc:D:\logs\gc\tomcat-gc.log -XX:+PrintGCDetails -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled Today's GC log: http://www.nabble.com/file/p20951581/20081211_tomcat-gc.zip 20081211_tomcat-gc.zip Rainer Jung-3 wrote: The attached thread dumps do not belong to Tomcat. They are from the Gauss VIP Content Server. I know that. The whole system is based on the Livelink WCMS Content Management System (formerly Gauss VIP). These thread dumps were all I had, so that's why I included them. Rainer Jung-3 wrote: First of all I assume you are talking about the event starting at 07:09? The initial problems are Timeouts (Winsock 10060). So again we need to find out, why things took to long on the backend. Thread Dumps would be a good start ... Rainer Jung-3 wrote: - Check without APR This seems impossible to do, I had once removed the APR, and the system got REALLY unstable under a normal day's load. I'm quite hesitant to try this again, as you may understand. Regards, Jesse. -- View this message in context: http://www.nabble.com/IIS-6.0---JK1.2.25---Tomcat-5.5.20---%22Service-temporary-unavailable%22-tp18238896p20951581.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: AW: java.io.IOException: Stream closed
Hi, sorry for the long delay - I needed some time away from tomcat and XML ;) The client is XCelsius (an MS Excel extension that can be used to access webservices and read XML files from web resources). As far as I can tell, the XML-Beans generated code works well - even if The stream is closed after reading, this should be no problem as the next request will submit a new stream, right? I will rework the servlet to use a reader, I let you know if that fixes the Problem. Thanks for your suggestions, Stefan -Ursprüngliche Nachricht- Von: Christopher Schultz [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 5. Dezember 2008 17:43 An: Tomcat Users List Betreff: Re: AW: AW: java.io.IOException: Stream closed -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stefan, Schuster Stefan wrote: The code reading the stream is generated by XMLBeans. Is there something that I should not do with the stream? For example closing it or something like that? You shouldn't have to do anything like that. ERROR inDoc = DataDocument.Factory.parse(is, xmlOptions); END_OF_ERROR Looks reasonable to me. Does DataDocument.Factory.parse() do anything weird like close the stream and then try to read from it again? Your problem is probably caused by one of two things: 1. Some code stupidly closes the input stream, then tries reading from it later 2. The client didn't send enough data I wonder if there's a character encoding problem, here. You are using an InputStream from the request and not a Reader, so the Content-Type encoding from the request is being ignored. If the XML processing instruction includes an encoding parameter, this might be okay, but I've seen XML documents saying one type of encoding while the actual encoding is something else (whoops!). What client are you using to submit this data to the servlet? Also, what Connector are you using in Tomcat? AJP? HTTP? Nio? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkk5WhMACgkQ9CaO5/Lv0PCfSwCfef6s6a3meZROUFiJsGBEgSgx zbgAn1bOUSVVikoGJLNy3Dvgot0bHCoR =rJcd -END PGP SIGNATURE- - 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: service.bat install failure (Windows, v 6.0.18)
Am 11.12.2008 05:19, schrieb Caldarale, Charles R: From: andrew [mailto:[EMAIL PROTECTED] Subject: Re: service.bat install failure (Windows, v 6.0.18) I did a completely clean extract of the 6.0.18 tar.gz archive I usually use the .zip for Windows, but it should be the same thing. I think you (Andrew) should use the zip on Windows, because a lot of file have platform specific line endings in the tar.gz resp. .zip. For example the config files should differ. It depends on the tools you use, whether that is transparent or an annoyance. Regards, Rainer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IIS 6.0 / JK1.2.25 / Tomcat 5.5.20 - Service temporary unavailable
Am 11.12.2008 09:43, schrieb Jesse Klaasse: Rainer Jung-3 wrote: When using big heaps, you need to take extra effort to get your GC settings right. Do you have GC-Logs? What are the JVM options you use to start Tomcat? The JVM options: -Dcatalina.base=D:\tomcat -Dcatalina.home=D:\tomcat -Djava.endorsed.dirs=D:\tomcat\common\endorsed -Djava.io.tmpdir=D:\tomcat\temp -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory -Dcom.sun.management.jmxremote -XX:MaxPermSize=512m -Xloggc:D:\logs\gc\tomcat-gc.log -XX:+PrintGCDetails -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled OK, so you are using CMS, good. Today's GC log: http://www.nabble.com/file/p20951581/20081211_tomcat-gc.zip 20081211_tomcat-gc.zip Does that file contain any situation, were you had problems? I'm asking because the date in the file name suggests it's younger than the problem event you noticed. If it contains a problem: the time stamps are relativ to JVM start, so at what time was the problem, and when did you start the JVM (or in short: which offset do we have to look at?). I don't want to dig into it, if it is just an example file, but not directly related to an observed problem. Starting with 1.6.0_07 there is a -XX:+PrintGCDateStamps that adds absolute timestamps, but unfortunately it isn't available in 1.5 and earlier versions. Rainer Jung-3 wrote: - Check without APR This seems impossible to do, I had once removed the APR, and the system got REALLY unstable under a normal day's load. I'm quite hesitant to try this again, as you may understand. OK. So let's hope you manage to collect Thread Dumps of Tomcat next time. Regards, Rainer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat caching of static resources?
As a heretic post in this forum, which usually tends to recommend the opposite : what about putting an Apache with mod_cache in front of your Tomcat server ? Carefully set up, that would do what you want. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HTTP 400 Error when trying to check Tomcat installation
Hi Folks, After installing Tomcat and trying to check that it is working OK, I get the HTTP 400 error message. I am running Windows XP Professional version 2002 SP 3 with all updates applied. I am running Internet Explorer v 7.0.5730.11. I have installed Java JDK 1.6.0_11 with the JRE from the same download. I installed Tomcat 6.x Core from its zip into C:\tomcat. I set the environment variable JAVA_HOME to point to the JDK 1.6.0_11 directory (C:\Program Files\Java\jdk1.6.0_11). The JRE is installed at C:\Program Files\Java\Jre6. I copied the servlet-api.jar to the JDK directory\jre\lib\ext. I edited the c:\tomcat\conf\context.xml file to have Context reloadable=true. I edited the c:\tomcat\conf\web.exl file to un-comment the invoker entrie for servlet and servlet_mappings. I checked all these by loading the files into IE and the entries were exactly as described in the tomcat documentation. I created the classes sub directory as c:\tomcat\webapps\ROOT\WEB-INF\classes. Prior to doing all the above, I had cleaned my system by removing all previous version of Java and tomcat. I also ran Norton 360 Registry cleanup to try to make sure that there were no random or odd registry entries. I hard rebooted the PC and then started the Java and tomcat installations. When I start up tomcat in the command window, it appears to be successfully loaded reporting that it is using port 8080. All of the above is standard and in line with the documentation. BUT when I try to test the installation using the examples that come with tomcat using the URL http://localhost:8080/ I get the HTTP 400 Bad Request message. This tells me that IE was able to connect to the web server but the web page could not be found because of a problem with the address. I have tried loading my servlet into the tomcat classes directory but get the same message. I have tried adding various tomcat directories to the URL (e.g. examples) but get the same message. If I stop tomcat and try the URL, I get a different IE error that recognises that there is no web server running. I did this to check whether I had another webserver also running in the background. The Tomcat documentation on trouble shooting does not mention this error and clearly states that there are only 3 things that can go wrong with the installation: 1. Port 8080 is being used by another process, in which case Yomcat won't start. 2. An Out of Environment Space error that affects Windows 95, 98 and ME. 3. The localhost isn't found because one is behind a proxy. None of these would seem to apply to my situation. Can anyone, please, provide some insight into how I can overcome this problem. Ta much best regards, Pete -- View this message in context: http://www.nabble.com/HTTP-400-Error-when-trying-to-check-Tomcat-installation-tp20953242p20953242.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP 400 Error when trying to check Tomcat installation
Did you try to access the manager application at http://localhost:8080/manager/html? If that works your tomcat is running fine. I suggest you read up on building and packaging java web applications. You can deploy your .war files using this manager application. On Thu, Dec 11, 2008 at 11:51, BoyePeter [EMAIL PROTECTED] wrote: Hi Folks, After installing Tomcat and trying to check that it is working OK, I get the HTTP 400 error message. I am running Windows XP Professional version 2002 SP 3 with all updates applied. I am running Internet Explorer v 7.0.5730.11. I have installed Java JDK 1.6.0_11 with the JRE from the same download. I installed Tomcat 6.x Core from its zip into C:\tomcat. I set the environment variable JAVA_HOME to point to the JDK 1.6.0_11 directory (C:\Program Files\Java\jdk1.6.0_11). The JRE is installed at C:\Program Files\Java\Jre6. I copied the servlet-api.jar to the JDK directory\jre\lib\ext. I edited the c:\tomcat\conf\context.xml file to have Context reloadable=true. I edited the c:\tomcat\conf\web.exl file to un-comment the invoker entrie for servlet and servlet_mappings. I checked all these by loading the files into IE and the entries were exactly as described in the tomcat documentation. I created the classes sub directory as c:\tomcat\webapps\ROOT\WEB-INF\classes. Prior to doing all the above, I had cleaned my system by removing all previous version of Java and tomcat. I also ran Norton 360 Registry cleanup to try to make sure that there were no random or odd registry entries. I hard rebooted the PC and then started the Java and tomcat installations. When I start up tomcat in the command window, it appears to be successfully loaded reporting that it is using port 8080. All of the above is standard and in line with the documentation. BUT when I try to test the installation using the examples that come with tomcat using the URL http://localhost:8080/ I get the HTTP 400 Bad Request message. This tells me that IE was able to connect to the web server but the web page could not be found because of a problem with the address. I have tried loading my servlet into the tomcat classes directory but get the same message. I have tried adding various tomcat directories to the URL (e.g. examples) but get the same message. If I stop tomcat and try the URL, I get a different IE error that recognises that there is no web server running. I did this to check whether I had another webserver also running in the background. The Tomcat documentation on trouble shooting does not mention this error and clearly states that there are only 3 things that can go wrong with the installation: 1. Port 8080 is being used by another process, in which case Yomcat won't start. 2. An Out of Environment Space error that affects Windows 95, 98 and ME. 3. The localhost isn't found because one is behind a proxy. None of these would seem to apply to my situation. Can anyone, please, provide some insight into how I can overcome this problem. Ta much best regards, Pete -- View this message in context: http://www.nabble.com/HTTP-400-Error-when-trying-to-check-Tomcat-installation-tp20953242p20953242.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: Tomcat caching of static resources?
Thanks Chuck for that. Perhaps my use of words was a little misleading. I guess what i was trying to say was that the response returned by Tomcat i.e expiry date etc was not conductive to caching for clients. In terms of headers, i dont want to cache 'pages as the data is very transient. What i did want however was for Tomcat to serve the static resources with a header that doesn't expire in 1970. The line 'can Tomcat cache resources' was i guess trying to establish if Tomcat could treat them in a similar way to Resin, in that you can specify in the web.xml elements to provide the kind of solution i'm looking for but yes, ultimately it affects what header information is 'stamped' on the response. What are you doing to control the headers? What headers are being used for the large .js files? Nothing, this is perhaps my problem, i (or at least think) know how to specify headers on a page level but when it comes to specifying on static resources i'm not sure how this all fits in? i cant believe there isn't a standard Tomcat configuration for this? For what? Caching static resources on the server end doesn't alter the amount of network traffic generated. Sorry, 'cant believe' is perhaps a little strong, born from end of day frustrations :) I'll rephrase'it would be nice :), if i could specify header expiry on a static asset similar to the way Resin does. Now, maybe this comment still doesn't make sense so i'll step back a little. I have a dynamic website, that uses a lot of javascript js files which seem to be downloaded for every page call, i'd like this to stop :D. Thanks again for your response, its certainly helping me focus the problem :) Caldarale, Charles R wrote: From: David Smith [mailto:[EMAIL PROTECTED] Subject: Tomcat caching of static resources? is it possible to cache static images and .js files in Tomcat? Think about what you just asked for: how would caching static resources in the server avoid them being downloaded by the browser? It's the browser that must cache the information to avoid the redundant downloads. When i look at the browser cache it looks like the browser is downloading all page assets for every call, including some very large .js files. As stated in one of the (correct) responses to the article you referenced: So the first thing is to get control of the cache headers. Without them, the cache can not know what to do. What are you doing to control the headers? What headers are being used for the large .js files? but the solution didn't resolve the problem (especially if deploying via war files) The original author of the article is clearly unfamiliar with Tomcat, caching, and security (e.g., not knowing where a context.xml file goes, and erroneously stating it doesn't work with a .war file). i cant believe there isn't a standard Tomcat configuration for this? For what? Caching static resources on the server end doesn't alter the amount of network traffic generated. - 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 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tomcat-caching-of-static-resources--tp20932874p20953909.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat caching of static resources?
Bill, On Thu, Dec 11, 2008 at 4:15 AM, Bill Barker [EMAIL PROTECTED] wrote: The article is referring to the fact that Tomcat adds cache headers by default to any page protected by a security-constraint to prevent someone else from stealing it from an intermediate proxy. The default settings are extremely aggressive, resulting in regular posts on this list of the form My secured pdf file can't be displayed in IE. If you read on in those articles, you'll find that this is not a problem due to headers send by Tomcat but due to a bug with the SSL-implementation in IE http://support.microsoft.com/?scid=kb%3Ben-us%3B323308x=11y=11 There are some workarounds for this problem (if you don't want users to patch their registry), which require a modification of the headers being sent, however, I believe you're mixing up the cause of this problem (= bug in IE) with a possible workaround (header-modification by Tomcat). Cheers Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat caching of static resources?
I agree that i dont think the 'in memory' Tomcat solutions is what i'm currently after, its very much a Tomcat 'heading stamp' issue i think. Interesting point you raise though regarding pushing the statics to an external server. Not ideal from a deployment perspective but that would certainly solve it :). Interesting points you raise too regarding the reasoning behind the 'default expiry' date, makes a lot of sense but just a little frustrating for simple static page assets. Bill Barker-2 wrote: Caldarale, Charles R [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] From: David Smith [mailto:[EMAIL PROTECTED] Subject: Tomcat caching of static resources? is it possible to cache static images and .js files in Tomcat? Think about what you just asked for: how would caching static resources in the server avoid them being downloaded by the browser? It's the browser that must cache the information to avoid the redundant downloads. There are settings in Tomcat that control server-side caching of static resources (i.e. Tomcat serves up an in-memory copy of frequently requested static resources). I really can't recommend this for large .js files on a production server however. If you must do this, check out the Tomcat docs for configuring a Resources .../ element. However, the OP is probably better off enabling the sendfile options on either the NIO or APR Connector. When i look at the browser cache it looks like the browser is downloading all page assets for every call, including some very large .js files. As stated in one of the (correct) responses to the article you referenced: So the first thing is to get control of the cache headers. Without them, the cache can not know what to do. What are you doing to control the headers? What headers are being used for the large .js files? The article is referring to the fact that Tomcat adds cache headers by default to any page protected by a security-constraint to prevent someone else from stealing it from an intermediate proxy. The default settings are extremely aggressive, resulting in regular posts on this list of the form My secured pdf file can't be displayed in IE. If the article applies to the OP, it may just be easier to move the .js files to a non-secured location. If you take the advice in the article, then you are telling Tomcat that the webapp programmer is taking full control of the cache headers, so you are on your own in terms of security. but the solution didn't resolve the problem (especially if deploying via war files) The original author of the article is clearly unfamiliar with Tomcat, caching, and security (e.g., not knowing where a context.xml file goes, and erroneously stating it doesn't work with a .war file). i cant believe there isn't a standard Tomcat configuration for this? For what? Caching static resources on the server end doesn't alter the amount of network traffic generated. - 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 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tomcat-caching-of-static-resources--tp20932874p20954097.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat caching of static resources?
The problem however is that i'm using a remote shared host. Whilst this gives me quite a lot of configuration potential i doubt it would allow me to setup Apache and adaptors etc. In a 'real production environment' this would very much be a preferred choice. awarnier wrote: As a heretic post in this forum, which usually tends to recommend the opposite : what about putting an Apache with mod_cache in front of your Tomcat server ? Carefully set up, that would do what you want. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tomcat-caching-of-static-resources--tp20932874p20954139.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat caching of static resources?
same applies on Firefox though, there may well be issues in IE as always but i'm not convinced this is the core problem here. Gregor Schneider wrote: Bill, On Thu, Dec 11, 2008 at 4:15 AM, Bill Barker [EMAIL PROTECTED] wrote: The article is referring to the fact that Tomcat adds cache headers by default to any page protected by a security-constraint to prevent someone else from stealing it from an intermediate proxy. The default settings are extremely aggressive, resulting in regular posts on this list of the form My secured pdf file can't be displayed in IE. If you read on in those articles, you'll find that this is not a problem due to headers send by Tomcat but due to a bug with the SSL-implementation in IE http://support.microsoft.com/?scid=kb%3Ben-us%3B323308x=11y=11 There are some workarounds for this problem (if you don't want users to patch their registry), which require a modification of the headers being sent, however, I believe you're mixing up the cause of this problem (= bug in IE) with a possible workaround (header-modification by Tomcat). Cheers Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tomcat-caching-of-static-resources--tp20932874p20954165.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP 400 Error when trying to check Tomcat installation
Hi, Thanks for the reply and have just tried your suggestion. A dialogue box has appeared asking for a user name and password and saying that the server localhost at Tomcat Manager Application requires a username and password. I did set up a user name and password for Tomcat and so assume that this has been set by the Tomcat developers at Apache. This would seem to indicate that Tomcat is working ok but doesn't yet help me to use it. Thanks for the suggestion that I should read up on building and packaging web applications and this is what I am doing by using the Java for Dummies book and the Skillsoft online training course. It was the Java for Dummies book that recommended Tomcat so that I could test out my Java servlets and I have followed the instructions in that book and the Tomcat documentation to install Tomcat and to store my initial very simple servlet. But, as my initial post indicated, the instructions on how to use Tomcat and to test that it is working, do not seem to be correct. Your answer my test has, I think, indicate that Tomcat has been installed correctly but I still don't know how to use it. Further help and advice would be much appreciated. Best Regards, Pete Kees de Kooter wrote: Did you try to access the manager application at http://localhost:8080/manager/html? If that works your tomcat is running fine. I suggest you read up on building and packaging java web applications. You can deploy your .war files using this manager application. On Thu, Dec 11, 2008 at 11:51, BoyePeter [EMAIL PROTECTED] wrote: Hi Folks, After installing Tomcat and trying to check that it is working OK, I get the HTTP 400 error message. I am running Windows XP Professional version 2002 SP 3 with all updates applied. I am running Internet Explorer v 7.0.5730.11. I have installed Java JDK 1.6.0_11 with the JRE from the same download. I installed Tomcat 6.x Core from its zip into C:\tomcat. I set the environment variable JAVA_HOME to point to the JDK 1.6.0_11 directory (C:\Program Files\Java\jdk1.6.0_11). The JRE is installed at C:\Program Files\Java\Jre6. I copied the servlet-api.jar to the JDK directory\jre\lib\ext. I edited the c:\tomcat\conf\context.xml file to have Context reloadable=true. I edited the c:\tomcat\conf\web.exl file to un-comment the invoker entrie for servlet and servlet_mappings. I checked all these by loading the files into IE and the entries were exactly as described in the tomcat documentation. I created the classes sub directory as c:\tomcat\webapps\ROOT\WEB-INF\classes. Prior to doing all the above, I had cleaned my system by removing all previous version of Java and tomcat. I also ran Norton 360 Registry cleanup to try to make sure that there were no random or odd registry entries. I hard rebooted the PC and then started the Java and tomcat installations. When I start up tomcat in the command window, it appears to be successfully loaded reporting that it is using port 8080. All of the above is standard and in line with the documentation. BUT when I try to test the installation using the examples that come with tomcat using the URL http://localhost:8080/ I get the HTTP 400 Bad Request message. This tells me that IE was able to connect to the web server but the web page could not be found because of a problem with the address. I have tried loading my servlet into the tomcat classes directory but get the same message. I have tried adding various tomcat directories to the URL (e.g. examples) but get the same message. If I stop tomcat and try the URL, I get a different IE error that recognises that there is no web server running. I did this to check whether I had another webserver also running in the background. The Tomcat documentation on trouble shooting does not mention this error and clearly states that there are only 3 things that can go wrong with the installation: 1. Port 8080 is being used by another process, in which case Yomcat won't start. 2. An Out of Environment Space error that affects Windows 95, 98 and ME. 3. The localhost isn't found because one is behind a proxy. None of these would seem to apply to my situation. Can anyone, please, provide some insight into how I can overcome this problem. Ta much best regards, Pete -- View this message in context: http://www.nabble.com/HTTP-400-Error-when-trying-to-check-Tomcat-installation-tp20953242p20953242.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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] -- View this message in context:
Re: Tomcat caching of static resources?
Sorry, I don't remember of your pages are protected or not (even the static ones I mean). But anyway, you might want to have a look at this : http://www.tuckey.org/urlrewrite/ Manual for 3.2, and scroll down to the set response-header bit. It's a servlet filter with a lot of capabilities. The initial idea is a Tomcat equivalement of the Apache http mod_rewrite module. In this case you don't want (I think) to rewrite the request URL, just to conditionally add a response header, but it seems it can do that too. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP 400 Error when trying to check Tomcat installation
Hi Peter, Where did you placed your application? -Message d'origine- De : BoyePeter [mailto:[EMAIL PROTECTED] Envoyé : jeudi 11 décembre 2008 13:50 À : users@tomcat.apache.org Objet : Re: HTTP 400 Error when trying to check Tomcat installation Hi, Thanks for the reply and have just tried your suggestion. A dialogue box has appeared asking for a user name and password and saying that the server localhost at Tomcat Manager Application requires a username and password. I did set up a user name and password for Tomcat and so assume that this has been set by the Tomcat developers at Apache. This would seem to indicate that Tomcat is working ok but doesn't yet help me to use it. Thanks for the suggestion that I should read up on building and packaging web applications and this is what I am doing by using the Java for Dummies book and the Skillsoft online training course. It was the Java for Dummies book that recommended Tomcat so that I could test out my Java servlets and I have followed the instructions in that book and the Tomcat documentation to install Tomcat and to store my initial very simple servlet. But, as my initial post indicated, the instructions on how to use Tomcat and to test that it is working, do not seem to be correct. Your answer my test has, I think, indicate that Tomcat has been installed correctly but I still don't know how to use it. Further help and advice would be much appreciated. Best Regards, Pete Kees de Kooter wrote: Did you try to access the manager application at http://localhost:8080/manager/html? If that works your tomcat is running fine. I suggest you read up on building and packaging java web applications. You can deploy your .war files using this manager application. On Thu, Dec 11, 2008 at 11:51, BoyePeter [EMAIL PROTECTED] wrote: Hi Folks, After installing Tomcat and trying to check that it is working OK, I get the HTTP 400 error message. I am running Windows XP Professional version 2002 SP 3 with all updates applied. I am running Internet Explorer v 7.0.5730.11. I have installed Java JDK 1.6.0_11 with the JRE from the same download. I installed Tomcat 6.x Core from its zip into C:\tomcat. I set the environment variable JAVA_HOME to point to the JDK 1.6.0_11 directory (C:\Program Files\Java\jdk1.6.0_11). The JRE is installed at C:\Program Files\Java\Jre6. I copied the servlet-api.jar to the JDK directory\jre\lib\ext. I edited the c:\tomcat\conf\context.xml file to have Context reloadable=true. I edited the c:\tomcat\conf\web.exl file to un-comment the invoker entrie for servlet and servlet_mappings. I checked all these by loading the files into IE and the entries were exactly as described in the tomcat documentation. I created the classes sub directory as c:\tomcat\webapps\ROOT\WEB-INF\classes. Prior to doing all the above, I had cleaned my system by removing all previous version of Java and tomcat. I also ran Norton 360 Registry cleanup to try to make sure that there were no random or odd registry entries. I hard rebooted the PC and then started the Java and tomcat installations. When I start up tomcat in the command window, it appears to be successfully loaded reporting that it is using port 8080. All of the above is standard and in line with the documentation. BUT when I try to test the installation using the examples that come with tomcat using the URL http://localhost:8080/ I get the HTTP 400 Bad Request message. This tells me that IE was able to connect to the web server but the web page could not be found because of a problem with the address. I have tried loading my servlet into the tomcat classes directory but get the same message. I have tried adding various tomcat directories to the URL (e.g. examples) but get the same message. If I stop tomcat and try the URL, I get a different IE error that recognises that there is no web server running. I did this to check whether I had another webserver also running in the background. The Tomcat documentation on trouble shooting does not mention this error and clearly states that there are only 3 things that can go wrong with the installation: 1. Port 8080 is being used by another process, in which case Yomcat won't start. 2. An Out of Environment Space error that affects Windows 95, 98 and ME. 3. The localhost isn't found because one is behind a proxy. None of these would seem to apply to my situation. Can anyone, please, provide some insight into how I can overcome this problem. Ta much best regards, Pete -- View this message in context: http://www.nabble.com/HTTP-400-Error-when-trying-to-check-Tomcat-installation-tp20953242p20953242.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP 400 Error when trying to check Tomcat installation
BoyePeter wrote: Hi, Thanks for the reply and have just tried your suggestion. A dialogue box has appeared asking for a user name and password and saying that the server localhost at Tomcat Manager Application requires a username and password. I did set up a user name and password for Tomcat and so assume that this has been set by the Tomcat developers at Apache. I believe that you are confusing two things : the username and password under which Tomcat itself runs, and the username/password that Tomcat uses to protect access to the Manager application. For this second one, look in the (tomcat-dir)/conf/tomcat-users.xml file. If they are not there yet, add the following lines : role rolename=manager/ user username=theBossHere password=qwerty roles=manager/ then restart Tomcat. Close and re-open the browser, call the Manager page again, and use the above userid/password to login. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP 400 Error when trying to check Tomcat installation
Ta very much for your response. I very stupidly did not think to stop and restart Tomcat. I have now got into the Manager application. I now have to read up and understand how to use it. My very best regards, Pete awarnier wrote: BoyePeter wrote: Hi, Thanks for the reply and have just tried your suggestion. A dialogue box has appeared asking for a user name and password and saying that the server localhost at Tomcat Manager Application requires a username and password. I did set up a user name and password for Tomcat and so assume that this has been set by the Tomcat developers at Apache. I believe that you are confusing two things : the username and password under which Tomcat itself runs, and the username/password that Tomcat uses to protect access to the Manager application. For this second one, look in the (tomcat-dir)/conf/tomcat-users.xml file. If they are not there yet, add the following lines : role rolename=manager/ user username=theBossHere password=qwerty roles=manager/ then restart Tomcat. Close and re-open the browser, call the Manager page again, and use the above userid/password to login. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/HTTP-400-Error-when-trying-to-check-Tomcat-installation-tp20953242p20955566.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP 400 Error when trying to check Tomcat installation
BoyePeter: I am running Windows XP Professional version 2002 SP 3 with all updates applied. I am running Internet Explorer v 7.0.5730.11. I have installed Java JDK 1.6.0_11 with the JRE from the same download. Care to mention the Tomcat version you're using? I copied the servlet-api.jar to the JDK directory\jre\lib\ext. Why? Don't do that. I edited the c:\tomcat\conf\context.xml file to have Context reloadable=true. I edited the c:\tomcat\conf\web.exl file to un-comment the invoker entrie for servlet and servlet_mappings. Why? The Invoker Servlet is evil. It may be OK for a quick test but is a big no-no for any installation reachable over the net. I suggest you get used to create a webapp with a real deployment descriptor instead. when I try to test the installation using the examples that come with tomcat using the URL http://localhost:8080/ I get the HTTP 400 Bad Request message. This tells me that IE was able to connect to the web server but the web page could not be found because of a problem with the address. What do Tomcat's log messages show? If you've not already done so, turn off IE's friendly error messages. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP 400 Error when trying to check Tomcat installation
Hi Ben, Thanks for the response. I put the compiled class into c:\tomcat\webapps\ROOT\WEB-INF\classes It was a very simple Hello World servelt from the Java for Dummies book (page 647) and on page 649 it says to move the compiled class file to that directory. Although I now have the Manager application working and have gained access to it, I am even more puzzled that I cannot access the examples provided by Tomcat in the way that they suggest. The fact that I can get into the Manager application by using the URL http::/localhost:8080/manager/html suggests that my Tomcat installation is all working correctly but the recommended Tomcat URL http://localhost:8080/; still gives the HTTP 400 error. Ta much and best regards, Pete BEN HMIDA aymen wrote: Hi Peter, Where did you placed your application? -Message d'origine- De : BoyePeter [mailto:[EMAIL PROTECTED] Envoyé : jeudi 11 décembre 2008 13:50 À : users@tomcat.apache.org Objet : Re: HTTP 400 Error when trying to check Tomcat installation Hi, Thanks for the reply and have just tried your suggestion. A dialogue box has appeared asking for a user name and password and saying that the server localhost at Tomcat Manager Application requires a username and password. I did set up a user name and password for Tomcat and so assume that this has been set by the Tomcat developers at Apache. This would seem to indicate that Tomcat is working ok but doesn't yet help me to use it. Thanks for the suggestion that I should read up on building and packaging web applications and this is what I am doing by using the Java for Dummies book and the Skillsoft online training course. It was the Java for Dummies book that recommended Tomcat so that I could test out my Java servlets and I have followed the instructions in that book and the Tomcat documentation to install Tomcat and to store my initial very simple servlet. But, as my initial post indicated, the instructions on how to use Tomcat and to test that it is working, do not seem to be correct. Your answer my test has, I think, indicate that Tomcat has been installed correctly but I still don't know how to use it. Further help and advice would be much appreciated. Best Regards, Pete Kees de Kooter wrote: Did you try to access the manager application at http://localhost:8080/manager/html? If that works your tomcat is running fine. I suggest you read up on building and packaging java web applications. You can deploy your .war files using this manager application. On Thu, Dec 11, 2008 at 11:51, BoyePeter [EMAIL PROTECTED] wrote: Hi Folks, After installing Tomcat and trying to check that it is working OK, I get the HTTP 400 error message. I am running Windows XP Professional version 2002 SP 3 with all updates applied. I am running Internet Explorer v 7.0.5730.11. I have installed Java JDK 1.6.0_11 with the JRE from the same download. I installed Tomcat 6.x Core from its zip into C:\tomcat. I set the environment variable JAVA_HOME to point to the JDK 1.6.0_11 directory (C:\Program Files\Java\jdk1.6.0_11). The JRE is installed at C:\Program Files\Java\Jre6. I copied the servlet-api.jar to the JDK directory\jre\lib\ext. I edited the c:\tomcat\conf\context.xml file to have Context reloadable=true. I edited the c:\tomcat\conf\web.exl file to un-comment the invoker entrie for servlet and servlet_mappings. I checked all these by loading the files into IE and the entries were exactly as described in the tomcat documentation. I created the classes sub directory as c:\tomcat\webapps\ROOT\WEB-INF\classes. Prior to doing all the above, I had cleaned my system by removing all previous version of Java and tomcat. I also ran Norton 360 Registry cleanup to try to make sure that there were no random or odd registry entries. I hard rebooted the PC and then started the Java and tomcat installations. When I start up tomcat in the command window, it appears to be successfully loaded reporting that it is using port 8080. All of the above is standard and in line with the documentation. BUT when I try to test the installation using the examples that come with tomcat using the URL http://localhost:8080/ I get the HTTP 400 Bad Request message. This tells me that IE was able to connect to the web server but the web page could not be found because of a problem with the address. I have tried loading my servlet into the tomcat classes directory but get the same message. I have tried adding various tomcat directories to the URL (e.g. examples) but get the same message. If I stop tomcat and try the URL, I get a different IE error that recognises that there is no web server running. I did this to check whether I had another webserver also running in the background. The Tomcat documentation on trouble shooting does not mention this error and clearly states that there are
Re: HTTP 400 Error when trying to check Tomcat installation
Hi mks, I have installed Tomcat version 6. I copied the servlet-api.jar to the JDK directory because, according to Java for Dummies, it is needed to compile my servlets. If it is not there, Eclipse reports errors when trying to import javax.servlet.* and when I try to use extends HttpServlet. Perhaps I should have mentioned that I am trying to learn how to program in Java and I am trying to set up the test environment for this. I am not trying to set up a Web Server for the internet. The books that I read and the Tomcat documentation said to change the invoker stuff. I had a look at the Tomcat logs but, being the novice that I am, they didn't mean anything to me. Not sure how to turn off IE's friendly messages nor what would be the result if I did so. Pete Markus Schönhaber-10 wrote: BoyePeter: I am running Windows XP Professional version 2002 SP 3 with all updates applied. I am running Internet Explorer v 7.0.5730.11. I have installed Java JDK 1.6.0_11 with the JRE from the same download. Care to mention the Tomcat version you're using? I copied the servlet-api.jar to the JDK directory\jre\lib\ext. Why? Don't do that. I edited the c:\tomcat\conf\context.xml file to have Context reloadable=true. I edited the c:\tomcat\conf\web.exl file to un-comment the invoker entrie for servlet and servlet_mappings. Why? The Invoker Servlet is evil. It may be OK for a quick test but is a big no-no for any installation reachable over the net. I suggest you get used to create a webapp with a real deployment descriptor instead. when I try to test the installation using the examples that come with tomcat using the URL http://localhost:8080/ I get the HTTP 400 Bad Request message. This tells me that IE was able to connect to the web server but the web page could not be found because of a problem with the address. What do Tomcat's log messages show? If you've not already done so, turn off IE's friendly error messages. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/HTTP-400-Error-when-trying-to-check-Tomcat-installation-tp20953242p20955851.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP 400 Error when trying to check Tomcat installation
BoyePeter wrote: [...] Not sure how to turn off IE's friendly messages nor what would be the result if I did so. At least I can tell you something about that. Just search in Google for ie friendly error messages, and about the first 30 results will tell you all you need to know about it. The problem is that some of the error pages you see, are produced by IE and not by Tomcat. So it is difficult for people here to help you, because they do not know what you are looking at. Alternative (recommended) : install Firefox on your PC and use this to learn. It also has a couple of nice plugins/add-ons that will help you a lot in learning about HTTP, HTML, XML etc.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP 400 Error when trying to check Tomcat installation
Did as you suggested but then all I get is a black web page. I right clicked to look at the source and this was what was shown: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY META content=WBVNTMRYKT name=SKYPE_FRAMEID META content=WBVNTMRYKT name=SKYPE_FRAMEID/HTML Not sure if you picked up the addition to my previous post. I checked the logs and found the following messages in the catalina.2008.12.11.log: SEVERE: Error deploying web application directory ROOT java.lang.SecurityException: Servlet of class org.apache.catalina.servlets.InvokerServlet is privileged and cannot be loaded by this web application I think this may be the root cause of the problem but I have no idea how to fix it. awarnier wrote: BoyePeter wrote: [...] Just search in Google for ie friendly error messages, and about the first 30 results will tell you all you need to know about it. -- View this message in context: http://www.nabble.com/HTTP-400-Error-when-trying-to-check-Tomcat-installation-tp20953242p20956227.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP 400 Error when trying to check Tomcat installation
BoyePeter: I have installed Tomcat version 6. Although I doubt it's of any importance wrt your problem, for the future: Tomcat's version numbers consist of three numbers separated by dots - like 6.0.18. I copied the servlet-api.jar to the JDK directory because, according to Java for Dummies, it is needed to compile my servlets. If the book really says so, I'd think that now was a good time to throw it away. If it is not there, Eclipse reports errors when trying to import javax.servlet.* and when I try to use extends HttpServlet. If you're already using Eclipse, why don't you use it's Web Tools Platform which takes care of setting the classpath when building, of deploying etc. when developing webapps? Perhaps I should have mentioned that I am trying to learn how to program in Java and I am trying to set up the test environment for this. If you're starting to program in Java, programming servlets is not the starting point to the most easy route IMO. I am not trying to set up a Web Server for the internet. The books that I read and the Tomcat documentation said to change the invoker stuff. Then you're most likely reading the wrong books. But I'd be very interested to know where the official Tomcat documentation says that one should enable the Invoker servlet. I had a look at the Tomcat logs but, being the novice that I am, they didn't mean anything to me. You could post the relevant snippet (the timestamps should give a hint what might be relevant) here. Even if it means nothing to you, it might mean a lot to someone trying to help you. Not sure how to turn off IE's friendly messages nor what would be the result if I did so. I'm no Windows user myself, so I don't know exactly. But IIRC it's buried somewhere in the advanced internet options. Without this option disabled, IE thinks it knows best what to show the user (and especially: what not) when an error occurs and suppresses the error message sent by the server that might actually contain information about what went wrong. OTOH it might not - but with IE's friendly error messages you'll never know. Regards mks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTP 400 Error when trying to check Tomcat installation
From: BoyePeter [mailto:[EMAIL PROTECTED] Subject: Re: HTTP 400 Error when trying to check Tomcat installation SEVERE: Error deploying web application directory ROOT java.lang.SecurityException: Servlet of class org.apache.catalina.servlets.InvokerServlet is privileged and cannot be loaded by this web application I think this may be the root cause of the problem but I have no idea how to fix it. As Markus suggested, throw away the book you're reading. It is obviously full of errors and extremely dangerous. The error message you're getting is because you uncommented the invoker servlet; that exists purely for compatibility with older levels and people too lazy to write webapps properly. You need to go back to the standard Tomcat installation, and don't edit anything in conf other than the conf/tomcat-users.xml file. You should not be placing your servlet in the ROOT directory; instead, create another directory under webapps that will be the name of your particular application (e.g., test or sample). Under that directory, you will need to create WEB-INF and WEB-INF/classes; your servlet should be placed in WEB-INF/classes. Under WEB-INF, you'll need a web.xml file containing a servlet declaration for your class. Look in the examples that come with Tomcat to see what that looks like. (Alternatively, just use Eclipse Web Tools as Markus also said to do all the dirty work for you.) - 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 unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bad content type mod_jk 1.2.27
Hi, in effect in the case of Excel download I set Header after I send the output stream because I do not know that tomcat start to flush before controller return. Now I have fixed this. But I don't understand why I have mime type problem with other normal page. An other repetitive case with same problem , is a controller where I upload and read an excel and I return to a normal page: the page source is printed on screen. I attach a souce fragment, my application log that show the output point CI SONO DEGLI ERRORI NELL'INPUT.. and catalina.out that contains modjk logs. http://www.nabble.com/file/p20957484/source.txt source.txt http://www.nabble.com/file/p20957484/myApplication.log myApplication.log http://www.nabble.com/file/p20957484/catalina.txt catalina.txt Thanks, Marco Rainer Jung-3 wrote: Hi Marco, marcobalc schrieb: Hi, now I have the stacktrace but the problem is that the stack do not involve my classes :| java.lang.Throwable: Stack Info at org.apache.jk.core.MsgContext.action(MsgContext.java:263) at org.apache.coyote.Response.action(Response.java:183) at org.apache.coyote.Response.sendHeaders(Response.java:380) at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305) at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:273) at org.apache.catalina.connector.Response.finishResponse(Response.java:492) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:310) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619) Any idea? i'm going crazy on this problem :( Could you please post a more complete part of the log file, when used with the increased log level I posted to you earlier in this thread. With the more complete log we will have timestamps, and we can also see the second commit etc. Regards, Rainer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/bad-content-type-mod_jk-1.2.27-tp20892496p20957484.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can not fail over a web service call using mod_jk
Sorry to come up in the middle of a discussion, but how does the worker recover after the 500 error? Does it have to be reset manually or does it recheck from time to time (how long?) if the server is available again? Thanks, Nuno -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: terça-feira, 9 de Dezembro de 2008 13:45 To: Tomcat Users List Subject: Re: Can not fail over a web service call using mod_jk [EMAIL PROTECTED] schrieb: From a design point of view do you feel that this is beyond the scope of mod_jk to buffer request bodies? From one point of view it does make sense to have the retry logic completely in mod_jk, but I can certainly understand the point of view to have retry logic on the client. Not completely, but it would be a serious problem to buffer the full request bodies by default. Imagine someone who does upload a DVD iso image. So it's much safer (with respect to ressource consumption) to only buffer a first chunk for the usual case, that a problem is detected early. It could be an option though, to buffer requests with a configurable limit depending on the URL. It would not be to hard to implement that, but the whole thing gets more and more complex. It might make more sense to extract a thing like this into a separate httpd module (mod_replay) (I'm just speculating). Other opinions? Regards, Rainer - 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: bad content type mod_jk 1.2.27
Hi, an other strange behavior is that some times when I reboot tomcat and I refresh browser while I wait that tomcat is up and runnig I see the normal error page displayed when the tomcat is not yet started but also in this case I see the source html code on the browser instead of HTML interpreted. This is the source the was displayed !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN htmlhead title200 OK/title /headbody h1OK/h1 pThe server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later./p /body/html and the response header visible on firefox Date: Thu, 11 Dec 2008 15:58:32 GMT Server: Apache/2.2.9 (Unix) mod_jk/1.2.27 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/plain 200 OK best regards, Marco Rainer Jung-3 wrote: Hi Marco, marcobalc schrieb: Hi, now I have the stacktrace but the problem is that the stack do not involve my classes :| java.lang.Throwable: Stack Info at org.apache.jk.core.MsgContext.action(MsgContext.java:263) at org.apache.coyote.Response.action(Response.java:183) at org.apache.coyote.Response.sendHeaders(Response.java:380) at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305) at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:273) at org.apache.catalina.connector.Response.finishResponse(Response.java:492) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:310) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619) Any idea? i'm going crazy on this problem :( Could you please post a more complete part of the log file, when used with the increased log level I posted to you earlier in this thread. With the more complete log we will have timestamps, and we can also see the second commit etc. Regards, Rainer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/bad-content-type-mod_jk-1.2.27-tp20892496p20958246.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Restricting IP address and redirecting
Hi, We restrict IP addresses to our application using RemoteAddressValve. But we have a requirement of redirecting the request to a customized html static page when we get request from such denied IP's. How do i do this. Is it possible to customize this class to do this redirection and deploy it in the tomcat application? Please help. we are using tomcat 5.5 Thanks Flemion. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat caching of static resources?
On Thu, Dec 11, 2008 at 1:05 PM, Javabeat [EMAIL PROTECTED] wrote: same applies on Firefox though, there may well be issues in IE as always but i'm not convinced this is the core problem here. I strongly disagree. We do have a setup here having Apache HTTPD 2.2 fronting Tomcat 5.5, and the probelm is the same with Apache HTTPD only. However, Firefox (2 3) are serving pdfs under SSL perfectly whereas IE 5 and 6 are facing problems (could not download file...). The solution for Apache i.e. is SetEnvIf Request_URI \.pdf$ pdf=true Header set Connection: close env=pdf In Tomcat this could be achieved using a Servlet-Filter. But we're getting off-topic here... Cheers Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can not fail over a web service call using mod_jk
Am 11.12.2008 16:46, schrieb Nuno Manuel Martins: Sorry to come up in the middle of a discussion, but how does the worker recover after the 500 error? Does it have to be reset manually or does it recheck from time to time (how long?) if the server is available again? During so called global maintenance mod_jk flags an erroneous worker that is in error state for longer than 60 seconds (configurable) to be in recovery (REC). The next request, that would get balanced to a worker in recovery then actually gets sent to it and the worker is immediately flagged as being probed (PRB). If the probe succeeds, it goes into OK state, if not back to ERROR. Global maintenance runs roughly every 60 seconds (the first request that comes in at most 60 seconds after the last global maintenance triggers the next one). Since we now have a separate watchdog thread, we will likely allow a concurrent probing with a configurable test URL in a future mod_jk version. Caution: by default http status 500 does *not* put a worker into ERROR. Only if configured using fail_on_status as was assumed earlier in this discussion. Regards, Rainer -Original Message- From: Rainer Jung [mailto:[EMAIL PROTECTED] Sent: terça-feira, 9 de Dezembro de 2008 13:45 To: Tomcat Users List Subject: Re: Can not fail over a web service call using mod_jk [EMAIL PROTECTED] schrieb: From a design point of view do you feel that this is beyond the scope of mod_jk to buffer request bodies? From one point of view it does make sense to have the retry logic completely in mod_jk, but I can certainly understand the point of view to have retry logic on the client. Not completely, but it would be a serious problem to buffer the full request bodies by default. Imagine someone who does upload a DVD iso image. So it's much safer (with respect to ressource consumption) to only buffer a first chunk for the usual case, that a problem is detected early. It could be an option though, to buffer requests with a configurable limit depending on the URL. It would not be to hard to implement that, but the whole thing gets more and more complex. It might make more sense to extract a thing like this into a separate httpd module (mod_replay) (I'm just speculating). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: service.bat install failure (Windows, v 6.0.18)
Chuck, Thanks for your patience, and all the helpful information. I did a completely clean extract of the 6.0.18 tar.gz archive I usually use the .zip for Windows, but it should be the same thing. Well, I've been counting on them being the same, but another post suggests that maybe there are line ending differences that create my problem. I think I'll try this with the .zip archive just to be sure. If the .zip archive works, I'll let you know. I've never had a problem with .tar/.zip differences in the past (that is, with apps other than Tomcat), but this seems worth checking. If using the .zip fixes my problem, it'll teach me to stop using tar on Windows, I guess. I notice that it does not start the service, so I take care of that manually. You can, of course, set the startup mode to automatic in the Services snap-in. Yes, of course. If it had worked after manual startup, that would be the first thing I'd do. 3. But if I visit http://localhost:8080/mytestapp the browser waits and waits forever. Can you take a thread dump and see what's going on? Do JConsole or JVisualVM show anything interesting (e.g., a thread looping or stuck on a lock)? What happens if you configure the service to run under the same account you use when running Tomcat with the startup.bat script? (Use the tomcat6w.exe program to set the account.) OK, will do. Both of these are new to me though. I've seen the Tomcat doc page explaining tomcat6w.exe (it's just a rename of tomcat6.exe, correct?), so that part should be simple enough. I haven't used JConsole, or JVisualVM before; any advice or doc pointers? I realize this is really a java question, not a Tomcat question, but if it isn't too much trouble (BTW, other tasks are piling up, so I will probably have to put this issue aside for a couple of days. Please don't think I've given up.) 4. Note that if I stop the Tomcat service, and then start Tomcat from a console using startup.bat, everything works fine -- html, jsp, servlets, db connection By everything, do you mean mytestapp? Yes, *everything*. I started using Tomcat 6.0.18 (on Windows) about a month ago. During that time, I've built and deployed three webapps - two were pretty simple, but one was even a little complicated. I always used startup.bat, and not once saw a problem. (Looking at the docs, I figured that installing the TC service would be a piece of cake -- something I could do after things were somewhat stable.) Also, there isn't so much as a warning, much less an error message, on startup. When running as a service, or as a regular program, or both? Both. I get several lines printed in the java console when using startup.bat, but they all start with INFO: and appear to be completely normal. I did a completely clean extract again and tried to visit both http://localhost:8080/examples and http://localhost:8080/docs. I see the exact same endless wait. But the Tomcat default home page works? Is this page possibly just being cached by the browser? I've been bitten by browser caching so many times that I try to keep it turned off all the time. I really thought I'd double checked this, but I just went back and tried again, and it appears you are right. I now see the same wait behavior when visiting the default page. Sorry, kind of embarrassing since I certainly meant to check this. Don't know how I goofed. I guess I've been trying so many things... I could not find a file in the logs directory that gets updated at all when I hit the server from a browser. You have to uncomment the AccessLogValve near the bottom of conf/server.xml. However, I don't think this logs anything until a response is sent. OK; good to know. 2. Following the documentation, I uninstalled the Tomcat service and tried to run it as tomcat6.exe //TS//Tomcat6 --other-startup-params I think you misunderstood the doc. You have to use //IS// first to install the service, after which you can run it with //TS// from the command prompt. Ouch, another goof. Sorry, I'll go back and re-read. 1) Is this a 32- or 64-bit version of Windows? 32-bit. 2) What JVM do have have installed? 1.6.0_10 (build 33) 3) When you run tomcat6w.exe, what does the Java tab show (all fields, please)? As I mentioned, I need to catch up on other tasks. So I'll let you know as soon as I can get to trying this out. Thanks. -andrew - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: service.bat install failure (Windows, v 6.0.18)
From: andrew [mailto:ad...@ecpcorp.net] Subject: Re: service.bat install failure (Windows, v 6.0.18) I've seen the Tomcat doc page explaining tomcat6w.exe (it's just a rename of tomcat6.exe, correct?), No, it's a completely different program; it's a GUI tool to manage the Tomcat service. I haven't used JConsole, or JVisualVM before; Use JConsole first, and run it locally on the same machine that Tomcat is running on. Set the -Dcom.sun.management.jmxremote in the Java Options space of the Java tab of tomcat6w.exe (or in the CATALINA_OPTS environment variable when running via startup.bat). Don't be afraid to click on things. Look at the Threads tab to see who's doing what. JVisualVM provides most of what JConsole does, along with thread and heap profiling, but I find it a bit more confusing. Best thing is to just try them, then ask questions for things you can't figure out. There's doc for both on the java.sun.com web site, but I don't find it as helpful as just trying it. Looking at the docs, I figured that installing the TC service would be a piece of cake It should be; we still have no idea why your particular environment is causing problems. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
reading request parameter invalidates post body
Hello All, I'm using tomcat 6.0.18 and it appears that reading a request parameter like: String param = request.getParameter(param); causes any subsequent attempt to ready the post body to fail: while ((inputLine = reader.readLine()) != null) { sb.append(inputLine); } It doesn't throw an exception, just doesn't find any lines to read in the post body. Commenting out the request.getParameter call causes the read of the post body to work normally. Is this expected behavior? Can someone please clarify for me? Thanks! --john - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: reading request parameter invalidates post body
A quick read through the source code (org/apache/catalina/connector/Request.java) reveals - The first read of getParameter() will consume the request body form params and store them in a cache so that subsequent calls don't need to iterate over the request a second time. (This definitely seems like the desired behavior for the majority of use-cases) So it looks like you can't both read the request bytes by hand and use the Request helper methods, at least not in a trivial fashion. Chris -Original Message- From: John Cartwright [mailto:john.c.cartwri...@noaa.gov] Sent: Thursday, December 11, 2008 4:10 PM To: Tomcat Users List Subject: reading request parameter invalidates post body Hello All, I'm using tomcat 6.0.18 and it appears that reading a request parameter like: String param = request.getParameter(param); causes any subsequent attempt to ready the post body to fail: while ((inputLine = reader.readLine()) != null) { sb.append(inputLine); } It doesn't throw an exception, just doesn't find any lines to read in the post body. Commenting out the request.getParameter call causes the read of the post body to work normally. Is this expected behavior? Can someone please clarify for me? Thanks! --john - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to set Log4J debug flag in Tomcat
I'll take a look, thanks. Rebeccah -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Wednesday, December 10, 2008 4:51 PM To: Tomcat Users List Subject: Re: How to set Log4J debug flag in Tomcat Prastein, Rebeccah H wrote: How do I start tomcat as an application (not a service) and set the log4j debug commandline parameter? I tried editing startup.bat to prepend -Dlog4j.debug to %CMD_LINE_ARGS%, but I get the following error on startup, and I don't see any log4j debug output: usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { start | stop } Sounds like your added switch gets added at the end, after the -jar. I don't have a Windows Tomcat handy, but you might try to add it in JAVA_OPTS instead, like JAVA_OPTS=$JAVA_OPTS -Dlog4j.debug (Unix version) Maybe in sentenv.bat, if it exists ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- The contents of this message, together with any attachments, are intended only for the use of the person(s) to which they are addressed and may contain confidential and/or privileged information. Further, any medical information herein is confidential and protected by law. It is unlawful for unauthorized persons to use, review, copy, disclose, or disseminate confidential medical information. If you are not the intended recipient, immediately advise the sender and delete this message and any attachments. Any distribution, or copying of this message, or any attachment, is prohibited. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org