incorrect time in the catalina.out logging
Hi All I am using tomcat 6.0.18 on RHEL 5. The problem is that the time that is printed in the logging of catalina.out is one hour ahead of the server time. For example, when the command line date command said Fri Mar 20 05:57:46 GMT 2009 The time printed in the catalina.out was 2009-03-20 06:57:03 Please advice how to fix the issue. Regards, Ghufran
Incomplete WAR deployment
Hello all, We seem to be having the same problem as discussed in this thread: http://marc.info/?l=tomcat-userm=117872182913850w=2 The problem being that Tomcat on rare occasions does not completely unpack a war file. Our install procedure is very cut and dry: 1) stop/kill any running Tomcat processes 2) delete the old installation rm -rf 3) re-install Tomcat 4) install multiple war files into the 'webapps' dir. 5) install other pieces of the application into other non-Tomcat dirs. 6) start Tomcat 99...% of the time Tomcat starts up without a hitch. But every once in a great while, not sure how often, Tomcat will simply fail to deploy the entire contents of the war. I've only witnessed it 3 times (QA states it's happened more times). It's happened on 2 different webapps, and the 1 this happened to twice had different resulting exploded dirs. That is, they didn't stop deploying in the same spot. One time it stopped about 50% through and the other time about 95% of the way through. When this happens there are no startup errors. Tomcat starts up and the log indicates all wars were successfully deployed. One doesn't know there's been a failure until you hit the servlet and get a ClassNotFoundException. One time the log4j properties failed to be deployed so there wasn't even a log indicating a CNFE. Just as the previous post states, to get the system working one has to: stop Tomcat, delete the exploded dir, then restart Tomcat. Has anyone else ever seen this? Does anyone have any ideas as to why this may be happening? Any solutions, other than manually pre-explode the war files? Env: Solaris, jdk 1.5, Tomcat 6.0.14, war built via maven 2.0.9 Thanks, O - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: configuration about tomcat for work with mysql/J connector
Most Mysql+JSP tutorials found on the web aren't uptodate as they're still teaching people to use org.gjt.mm.mysql.Driver but it's better to use com.mysql.jdbc.Driver, cf: http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html But otherwise it's ok. On Fri, Mar 20, 2009 at 1:40 AM, Rusty Wright rusty.wri...@gmail.comwrote: http://lmgtfy.com/?q=tomcat+mysql+tutorial E.g., http://www.roseindia.net/mysql/mysqldatabase.shtml
AJP Response Header
Hello, I am using a web resource through NATing I have nated 1.1.1.1: to 2.2.2.2:80, Now when I make http requests to 1.1.1.1:, I can able to access to resources over 2.2.2.2:80 In response.sendRedirct, response send to 1:1:1:1 with 80 poet (Nated IP but Port is not updated-sends local apache port number) so need to know how Location header in response formatted in AJP , I am throwing context path from Java for sending response header.does AJP reads from request or reads apache configuration ? Does any configuration available to write any rule ? Thanks Siddharth - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: setAlias() for connector object.
Hi all, Still i was not able to resolve the below one.. I can see that , Http11Protocol protocol has the public void *setKeyAlias* (java.lang.String keyAlias) where as Http11NioProtocol does not have the same. I m using tomcat 6.0. or do i need to use setAttribute(keyAlias, aliasname); ? Please let me know if any body has faced the above.. thanks, Bhuvan P On Thu, Mar 19, 2009 at 4:22 PM, Bhuvanesh Pattanashetti bhuva...@gmail.com wrote: Hi all, I m creating the connector object using certain port and SSL cert, But i had a problem relating connector to particular alias in the keystore. As i checked in the tomcat 6.0 APIs there is no setKeyAlias() or setAlias() method. Please suggest if any body has any idea? thank you, Bhuvan P
Re: form parameters
Joseph Millet wrote: Maybe I'm missing something but from the little knowledge I have, I'd think an HTML form is posted encoded in the form enclosing HTML document charset specified in the sent Server headers. So that you settle a page encoded in iso-8859-2, you wouldn't expect a form present in that page to post unicode data, would you ? Maybe we need to restate the issue a bit differently. Imagine a website on which there is a starting page with 3 links : - formA.html - formB.html - formC.html Each of these is a html page containing a tag 'form method=POST'. Now 3 users, each at his workstation, obtain this starting page from the server. Then userA clicks on the link to formA.html and obtains the corresponding page. Similarly, userB clicks on the second link etc.. The users fill in their respective forms, and submit their respective forms to the server (in any order). The process on the server which handles the first submission (whether it is a servlet in Tomcat, or a cgi-bin under httpd etc.. doesn't matter), has no idea where this submit data comes from, right ? (It could even come from a page obtained from another server). So the process in question has to evaluate this data, based only on what it gets in this specific POST. What we are discussing here is how, based only on the data coming in from the browser POST, the server process determines the correct character encoding of what it receives. And the answer so far is, it basically cannot be sure, because the browser does not send enough information with the POST, to allow the server process to determine this unambiguously. Of course, if the server process is sure that the form originally came from itself, and that all the forms composing this application are defined such that the browser *should* always encode the data in a specific way, then the process could reasonably assume a charset and encoding. But if one of the users uses a non-compliant browser that does not give a jot about what html is telling it to do, then .. A separate but connected question is that it seems that current browsers do not follow entirely the HTML specifications, and even for multipart/form-data submissions, do not send the charset/encoding headers that would enable the server to know for sure, athough they should. To go back to your note above : It is true that the browser, in the absence of other information, SHOULD consider that the data it is going to submit should be in the encoding of the page containing the form. This /can/ be changed by using the accept-charset attribute of the form tag. However, even if that is true and if the browser follows the specifications in that respect and does encode the data properly, it does not change what I mention above about the fact that the server is still really in the dark about what it gets. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
mysql + tomcat work already but I need to reconfigurate the tomcat for load the examples in other location of the hard driver
Hi everyone Thanks for the help. I have mysql server + tomcat 6.0 running together already, but now I have a problem. my page jsp example I save in the directory c:/tomcat6.0/webapps/examples/jsp, because I tried to copy for other location in the server W2K and dosen't work when I load in the IE, by this reason I decided to save for that location. but now I wanna have in other directory my web pages examples, for instance in d:\websites\examplesJSP, what variable I need to change in the apache tomcat for work?, what files in the server apache tomcat can I change? Somebody can Help me again please!!! thanks have a good day TOMAS -- From: Rusty Wright rusty.wri...@gmail.com Sent: Thursday, March 19, 2009 8:40 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: configuration about tomcat for work with mysql/J connector http://lmgtfy.com/?q=tomcat+mysql+tutorial E.g., http://www.roseindia.net/mysql/mysqldatabase.shtml Tomas Rodriguez wrote: Hi all I'm new in Tomcat and java, I installed already Tomcat 6.0 for windows 2000, I have to mysql server and the connector/j for work together mysql and Tomcat. I declare a variable for connector mysql/j in panel control/system/advance(enviroment variable) , this variable have the mysql connector path, I test the tomcat doing http://localhost:8080 and every is ok, but my problem is. How Can I know that my connector java work with mysql without any problem?, what file I'll need change in the directory tomcat . please somebody can help me, I wanna learn tomcat for developer a project very important to me. thanks have a great day. sincerely TOMAS - 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Applets with IE - difference between Tomcat and plain HTML?
Hi, Christopher Schultz-2 wrote: Maybe I'm just not reading this right: when does it work? When does it not work? Does it ever work in MSIE? Under what conditions? Do Java applets work on other websites when you use MSIE? Ok, I'll start a new try to explain the problem: 1) arbitrary Applets work in IE on other Websites in the Internet 2) my Applet *does* work in IE, if I open the file directly from my desktop 3) my Applet does *not* work in IE, if I serve the HTML and JAR files through Tomcat 4) arbitrary Applets work in FF on other Websites in the Internet 5) my Applet *does* work in FF, if I open the file directly from my desktop 6) my Applet *does* work in FF, if I serve the HTML and JAR files through Tomcat In addition I've traced the output of the Java Console, when loading the Applet through Tomcat in IE (case 3 above) Here's the log: Java Console at Page-Reload in IE: basic: Starting applet teardown basic: Finished applet teardown basic: Fortschritts-Listener hinzugefügt: sun.plugin.util.grayboxpainter$grayboxprogressliste...@13e58d4 basic: Applet geladen basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 111675 us, pluginInit dt 65177365 us, TotalTime: 65289040 us basic: Applet initialized basic: Fortschritts-Listener entfernt: sun.plugin.util.grayboxpainter$grayboxprogressliste...@13e58d4 basic: Applet made visible basic: Starting applet basic: Applet started basic: Told clients applet is started To me this looks like the applet is correctly loaded, started, etc., i.e. the java-side work out well, but the IE refuses to show the applet. I assume, this is no java-applet-security-problem (like a not signed-jar-problem), because there is no AccessControlException or stuff like that. Regards, Herbert -- View this message in context: http://www.nabble.com/Applets-with-IE---difference-between-Tomcat-and-plain-HTML--tp22596302p22616093.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: help building a proxy
Richard Langly wrote: Hey all, I'm searching for a way to make a proxy server to: - receive a request from a web-browser. - allows me to grab the URL and build a web page. - then forward the request to the destination. - and then allows me to store and access the response when the destination returns the page from this same proxy server. If Tomcat would allow me to do this, can I get a short desc of what I need to do? I think I have seen this question before, maybe on another list (Apache httpd?). And you are probably not getting the answer you want, because the way you write the question above does not seem to make a lot of sense. For example, these two lines appear to be contradictory : - allows me to grab the URL and build a web page. - then forward the request to the destination. Because in the server who gets the request, you normally /either/ build a response html page and return it to the browser, /or/ you pass the request further to another server, but not both at the same time. Can you try and rephrase your question in another way, or give an example of what you would really like to do ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Applets with IE - difference between Tomcat and plain HTML?
...another strange thing: The IE just stops showing the HTML-file, when the applet-tag is reached in the source-code of the HTML-file, that is, every HTML-Tag before the applet-tag is shown on the screen, every HTML-Tag after the applet-tag is not shown on the screen. If I ask the browser, to show me the (HTML) source code for the page, the full page-code is available. I don't know, what this it??? -- View this message in context: http://www.nabble.com/Applets-with-IE---difference-between-Tomcat-and-plain-HTML--tp22596302p22616254.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Applets with IE - difference between Tomcat and plain HTML?
herbert wrote: ...another strange thing: The IE just stops showing the HTML-file, when the applet-tag is reached in the source-code of the HTML-file, that is, every HTML-Tag before the applet-tag is shown on the screen, every HTML-Tag after the applet-tag is not shown on the screen. If I ask the browser, to show me the (HTML) source code for the page, the full page-code is available. I don't know, what this it??? Hi. I know we also had some trouble getting the same applet to work properly in both IE and FF, because different browsers tend to interpret attributes slightly differently. Following is the tag we now use, which works in both. Maybe you can spot some difference with what you are using ? applet type=application/x-java-applet width=600 height=350 name=jsapplet id=jsapplet codebase=/japps code=UploadClient.class archive=getmulti.jar MAYSCRIPT=true param name=MAYSCRIPT value=true / param name=language value=en / param name=country value=US / param name=script value=/cgi-bin/multidox.pl / param name=formname value=form-addcoll / param name=color value=#c8d7e3 / param name=debuglevel value=1 / Your Browser does not support the needed Java VM version. Please get Sun 1.4 JRE or higher. /applet - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: help building a proxy
Richard: Are you looking for a transparent proxy? I.e., circumvent some censorship? Rgds 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat CPU 100%
Hi all, We have a java web application (deployed on Tomcat 5.5 with java 1.4) that has never had CPU problems. Some days ago we deployed a new version, that had non significant differences, and since this deploy we got frequent CPU 100% usage. users could not work and we needed to rollback to previuos version. The unique structural difference is the upgrade of the following libraries, used to generate jasperReports: - commons-beanutils-1.5 -- 1.7 - groovy-all-1.0-beta-10 -- groovy-all-1.0 - jasperreports-1.2.0 -- 1.3.3 - jdt-compiler -- 3.1.1 - added jasperreports-extensions-1.3.1 with the -Xrs option we could not get info about the hanging thread, so yesterday we deployed the new version, with old libraries and without -Xrs option. Now we get no CPU usage problem. Can you help us understand what the real problem could be? Thanks in advance -- View this message in context: http://www.nabble.com/Tomcat-CPU-100--tp22617067p22617067.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Applets with IE - difference between Tomcat and plain HTML?
Hi! awarnier wrote: applet type=application/x-java-applet width=600 height=350 .. Great post, I've used applet code=Applet.class ... width=90% height=90% / before, if I use applet code=Applet.class ... width=90 height=90 / it works out in IE. I don't have to understand this. ;) Thanks for your input! -- View this message in context: http://www.nabble.com/Applets-with-IE---difference-between-Tomcat-and-plain-HTML--tp22596302p22617631.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to make Tomcat serve/listen to one more port?
I must admit that I'm lost, despite hours of readings I have to add that Tomcat documentation is never very clear and comprehensible. I can't see how a host can use such and such connector!? I mean, the connector's doc at http://tomcat.apache.org/tomcat-6.0-doc/config/http.htmldoesn't tell me which host I could attach it to. And host's doc at http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html doesn't give any clue which connector to use. And I've a doubt that virtual hosting is actually what I was looking. Currently, I access the Tomcat's default website using an URL like this: http://myservername:x/ All I want to do is to have another website using an URL like this: http://myservername:y/ TIA On Thu, Mar 19, 2009 at 6:18 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Subject: RE: How to make Tomcat serve/listen to one more port? Correct; the Host element is equivalent to a web site, the Connectors just feed the Hosts, based on the name and Alias. Note that you don't really need multiple Connector elements to support multiple Hosts; one Connector will suffice, and it will route requests to the appropriate Host based on the URL. - Chuck
Issue with SSL server/ network configuration
Hi y'all, I have a fairly complex issue regarding Tomcat server configuration, so I'll try to explain: I have two web applications that need to run in one Tomcat server. Application 1 needs client certificates, so I need to configure an SSL connector with 'clientAuth=yes' Application 2 needs NO client certificates, and users should not be bothered with questions about client certificates; so I can not use 'clientAuth=want', I have to use 'clientAuth=no' here. Now the easiest thing to do (I think) is to have two keystores, two server certificates, two domain names; one for each application. Now the problem is right now: I only have one keystore, domain name, certificate (certificates cost money you know...). My question to you peoples: is there a simple way to map one domain name to two different SSL connectors? Port-forwarding based on web context? The latter seems possible, yet a bit flakey. Any help is greatly appreciated, Eelco -- View this message in context: http://www.nabble.com/Issue-with-SSL-server--network-configuration-tp22618057p22618057.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Issue with SSL server/ network configuration
Peter Crowther wrote: From: i_am_superman [mailto:ee...@objectivation.nl] is there a simple way to map one domain name to two different SSL connectors? I don't think there is, unless you want part of your application to be accessible from a different port. So the part that doesn't need certs might be at https://www.example.com (implicitly on port 443) and the part that does need certs might be at https://www.example.com:8443. You could then set up two different connectors, with different hosts and the different security constraints. Hi Peter, Thanks for the swift reply. I agree that this will probably work, but I don't think my client will allow me to run a public SSL website any port but 443 (firewalls). But your reply confirms my hunch that there is no other way but to buy extra certificates (400 EUR for a 800 byte file That's 50 EUR cents per byte! More expensive than champagne. :-)) Thanks again, If anyone else has another idea, please respond. Eelco - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Issue-with-SSL-server--network-configuration-tp22618057p22618310.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Issue with SSL server/ network configuration
From: i_am_superman [mailto:ee...@objectivation.nl] is there a simple way to map one domain name to two different SSL connectors? I don't think there is, unless you want part of your application to be accessible from a different port. So the part that doesn't need certs might be at https://www.example.com (implicitly on port 443) and the part that does need certs might be at https://www.example.com:8443. You could then set up two different connectors, with different hosts and the different security constraints. I *think* this would allow you to re-use your existing server certificate; browsers check the cert based on the domain name excluding the port, so as long as www.example.com matched you'd be OK. You could probably get away with just the single keystore, too. But you'd need appropriate code (or vanilla HTML) in the applications to direct the user to the other app at the appropriate time! Does this help, or have I answered the wrong question? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Issue with SSL server/ network configuration
Gregor Schneider wrote: How about a self-seigned cert? A nasty browser-window will pop up once, however, the users could import the server-cert into their browser, and then they#re done It's gonna be a public government website, so a self-signed certificate will not be an option :-) (it's tempting though) And firefox tends to be very annoying with self-signed certificates lately -- View this message in context: http://www.nabble.com/Issue-with-SSL-server--network-configuration-tp22618057p22618647.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Issue with SSL server/ network configuration
i_am_superman wrote: It's gonna be a public government website, so a self-signed certificate will not be an option :-) Considering the amount of taxpayer money that governments are currently pumping into failed financial institutions and car makers, I'm sure they could afford a 400 € certificate, no ? Or is it that bad ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: incorrect time in the catalina.out logging
Got it here http://www.mail-archive.com/tomcat-u...@jakarta.apache.org/msg145602.html _ From: Ghufran [mailto:ghufra...@vopium.com] Sent: Friday, March 20, 2009 11:07 AM To: 'Tomcat Users List' Subject: incorrect time in the catalina.out logging Hi All I am using tomcat 6.0.18 on RHEL 5. The problem is that the time that is printed in the logging of catalina.out is one hour ahead of the server time. For example, when the command line date command said Fri Mar 20 05:57:46 GMT 2009 The time printed in the catalina.out was 2009-03-20 06:57:03 Please advice how to fix the issue. Regards, Ghufran No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.238 / Virus Database: 270.11.19/2010 - Release Date: 03/19/09 19:03:00
RE: Issue with SSL server/ network configuration
From: i_am_superman [mailto:ee...@objectivation.nl] I don't think my client will allow me to run a public SSL website any port but 443 (firewalls). Then you'll also need a second IP address on the server, as I'm sure you've already realised. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Issue with SSL server/ network configuration
awarnier wrote: i_am_superman wrote: It's gonna be a public government website, so a self-signed certificate will not be an option :-) Considering the amount of taxpayer money that governments are currently pumping into failed financial institutions and car makers, I'm sure they could afford a 400 € certificate, no ? Or is it that bad ? :-) No it's not that bad, but we have 3 environment (test, accept, prod) so we need 3 extra certificates. No big deal indeed, but I need to be sure that I really need them. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Issue-with-SSL-server--network-configuration-tp22618057p22618849.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk and 304
Rainer Jung rainer.jung at kippdata.de writes: On 09.03.2009 18:07, Anthony J. Biacco wrote: Download the latest, configure, make, make install, check for new/deprecated directives in the jk docs, modify configs accordingly, reload apache. I'm running apache 2.2.9, mod_jk 1.2.27 and tomcat 6.0.18 and I get this problem as well: GET /shibboleth-idp/SSO HTTP/1.1 Host: sso1.sso.bk.sapo.pt User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-gb,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: UTF-8,* Keep-Alive: 300 Connection: keep-alive Cookie: __gads=ID=c03eced0403f23bb:T=1225110355:S=ALNI_MZ3q6i8NPwFvjWVQND4OqYCFf5VNg; _swa_uv=1542803245557699600; netbi=anonymous_SZ1ZeQqHllEAAHJnQfo HTTP/1.1 302 Moved Temporarily Date: Fri, 20 Mar 2009 11:11:24 GMT Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8c mod_jk/1.2.27 Location: https://sso1.sso.bk.sapo.pt/Login.do?to=%2Fshibboleth-idp%2FSSO Vary: Accept-Encoding Content-Encoding: gzip Content-Length: 20 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/plain Notice that it tried to compress an empty response and it enlarged to 20 bytes. But this seems more like a problem with mod_deflate. André - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Issue with SSL server/ network configuration
Why not opt for a wildcard certificate for the domain, if that's applicable (e.g. *.yourcompany.com) -Original Message- From: i_am_superman [mailto:ee...@objectivation.nl] Sent: 20 March 2009 11:52 To: users@tomcat.apache.org Subject: Re: Issue with SSL server/ network configuration awarnier wrote: i_am_superman wrote: It's gonna be a public government website, so a self-signed certificate will not be an option :-) Considering the amount of taxpayer money that governments are currently pumping into failed financial institutions and car makers, I'm sure they could afford a 400 € certificate, no ? Or is it that bad ? :-) No it's not that bad, but we have 3 environment (test, accept, prod) so we need 3 extra certificates. No big deal indeed, but I need to be sure that I really need them. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Issue-with-SSL-server--network-configuration-tp22618057p22618849.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Connaught plc is one of the UK's top 250 companies on the London Stock Exchange and the leading provider of integrated services operating in the compliance, social housing and public sector markets. Please visit our website to see a full list of Connaught's Registered Companies http://www.connaught.plc.uk/group/aboutconnaught/registeredcompanies Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete this message. Connaught plc, Head Office 01392 444546
Re: Issue with SSL server/ network configuration
On Fri, Mar 20, 2009 at 12:10 PM, i_am_superman ee...@objectivation.nl wrote: If anyone else has another idea, please respond. How about a self-seigned cert? A nasty browser-window will pop up once, however, the users could import the server-cert into their browser, and then they#re done Rgds 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Issue with SSL server/ network configuration
Darren Kukulka wrote: Why not opt for a wildcard certificate for the domain, if that's applicable (e.g. *.yourcompany.com) Hi Darren, Interesting idea! What are the restrictions on wildcard certificates? If I have two subdomains with one wildcard certificate, do I still need the two IP addresses? Or is the IP address tied to the (wildcard) certificate? Best regards, Eelco -- View this message in context: http://www.nabble.com/Issue-with-SSL-server--network-configuration-tp22618057p22619652.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Issue with SSL server/ network configuration
From: i_am_superman [mailto:ee...@objectivation.nl] we have 3 environment (test, accept, prod) so we need 3 extra certificates. No big deal indeed, but I need to be sure that I really need them. Get a wildcard certificate? They're about 3 times the price of a regular cert, and can authenticate *.example.com (for example). - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Issue with SSL server/ network configuration
From: i_am_superman [mailto:ee...@objectivation.nl] What are the restrictions on wildcard certificates? Some very old browsers don't understand them. Probably not a problem in your environment, but check your client's browser support requirements. If I have two subdomains with one wildcard certificate, do I still need the two IP addresses? Not sure. I'll leave that to the more experienced folks on the list to answer! Or is the IP address tied to the (wildcard) certificate? IP addresses are never tied to certificates. Certificates allow browsers to authenticate based on the common name in the certificate, and the hostname that the browser is using to access the site. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Issue with SSL server/ network configuration
Peter Crowther wrote: Or is the IP address tied to the (wildcard) certificate? IP addresses are never tied to certificates. Certificates allow browsers to authenticate based on the common name in the certificate, and the hostname that the browser is using to access the site. Yep, I know, I just want to be sure whether I have the same 'two certificates two IP address' issue. I know about this issue, I just don't understand it; how do hosting companies host 2 sites on one box with a certificate each? That'll be a lot of IP address juggling.. But let's not get carried away, this is a Tomcat mailing list :-) -- View this message in context: http://www.nabble.com/Issue-with-SSL-server--network-configuration-tp22618057p22619885.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Question on Executor and maxThreads reported by Manager
Actually yes, in our case the image content is not already sufficiently compressed by the content provider - we're seeing a sizeable decrease in the size of the images delivered after enabling gzip on them. Good question though, thank you. -Matt -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Thursday, March 19, 2009 11:18 PM To: Tomcat Users List Subject: Re: Question on Executor and maxThreads reported by Manager -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, On 3/19/2009 1:37 PM, Matt Brown wrote: compression=on compressableMimeType=..., image/png,image/jpeg,image/gif Are you sure you want to waste your CPU time compressing files that are already compressed? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknDCukACgkQ9CaO5/Lv0PA/nwCfVzUS9FGGbGsLBGF2kO1Bec56 skYAoIsMDDwHOCQWxZWi/KVTzjW8S/SI =gLAQ -END PGP SIGNATURE- - 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: Issue with SSL server/ network configuration
On Fri, Mar 20, 2009 at 12:36 PM, André Warnier a...@ice-sa.com wrote: Considering the amount of taxpayer money that governments are currently pumping into failed financial institutions and car makers, I'm sure they could afford a 400 € certificate, no ? Or is it that bad ? +1 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Issue with SSL server/ network configuration
Peter, On Fri, Mar 20, 2009 at 2:05 PM, i_am_superman ee...@objectivation.nl wrote: I just don't understand it; how do hosting companies host 2 sites on one box with a certificate each? That'll be a lot of IP address juggling.. Well, we f.e. do have a box 8ok, actually two boxes behind a loadbalancer), each having 8 different IP-addresses - one for each site I guess that's no uncommon setup. Rgds 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fw: Tomcat 5 with HADR
Hello- Do you have any suggestions for setting up db2 High-Availability Disaster Recovery with tomcat5. Right now tomcat works with websphere commerce which uses db2. We are in the process of implementing HADR and will need this for tomcat. Is there a new jar file that will be needed or do you have any clients that have done this in the past? Any suggestions would be helpful. Here is a entry from our tomcat server.xml ResourceParams name=jdbc/CommerceDB parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value30/value /parameter parameter namepassword/name valuedbauser/value /parameter parameter nameurl/name valuejdbc:db2://database:50001/databasename/value /parameter parameter namedriverClassName/name valuecom.ibm.db2.jcc.DB2Driver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuedbauser/value /parameter /ResourceParams This message and any files transmitted with it are the property of Sigma-Aldrich Corporation, are confidential, and are intended solely for the use of the person or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please contact the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited.
Re: AJP Response Header
On 20.03.2009 09:11, Siddharth Shah wrote: I am using a web resource through NATing I have nated 1.1.1.1: to 2.2.2.2:80, Now when I make http requests to 1.1.1.1:, I can able to access to resources over 2.2.2.2:80 In response.sendRedirct, response send to 1:1:1:1 with 80 poet (Nated IP but Port is not updated-sends local apache port number) so need to know how Location header in response formatted in AJP , I am throwing context path from Java for sending response header.does AJP reads from request or reads apache configuration ? Does any configuration available to write any rule ? I don't understand, why AJP does come into this picture. Maybe it already helps to read the new documentation page about mod_jk and reverse proxies. The new version is not yet released, but the new page is available at http://tomcat.apache.org/dev/dist/tomcat-connectors/jk/docs/jk-1.2.28-dev/generic_howto/proxy.html Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to monitor a Tomcat Java server in case of problems?
What preparations have YOU made to ensure good monitoring of Java threads, etc. in case of problems, memory leaks, etc. I am looking to use Java Servlets for a website with a lot of visitors, but I wish to have made the right preparations in case some programming code causes major outages. -- View this message in context: http://www.nabble.com/How-to-monitor-a-Tomcat-Java-server-in-case-of-problems--tp22620635p22620635.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to make Tomcat serve/listen to one more port?
Hi poubelle. (J'ai toujours rêvé de pouvoir écrire ca sans être impoli..). Je suis la poubelle wrote: Currently, I access the Tomcat's default website using an URL like this: http://myservername:x/ All I want to do is to have another website using an URL like this: http://myservername:y/ TIA Starting from the beginning : What you are describing above is feasible, but not very easily. That is because generally what people want, is to do this : a) http://myservername1/ http://myservername2/ (and get a different application when they access myservername1 than when they access myservername2) and not b) http://myservername:8080/ http://myservername:8081/ (and get a different application when they access myservername:8080 than when they access myservername:8081) (a) is easy to do with Tomcat, (b) is more complicated. So tell us first if (a) would be fine, because then we can tell you how-to, in less lines than would be needed for (b). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to make Tomcat serve/listen to one more port?
From: Je suis la poubelle [mailto:laps...@gmail.com] Subject: Re: How to make Tomcat serve/listen to one more port? I can't see how a host can use such and such connector!? You can't, nor do you need to. All Host elements share all Connectors within a Service. The content of the URL will select the proper Host. As I said before, you don't really need to separate the web sites by port number; one Connector will suffice. You *must* however, have different web site names (even if they resolve to the same IP address) in order to allow the differentiation to work. If you insist on differentiating by port number alone, you have to create multiple Service elements, each with their own Connector, Engine, and Host elements. - 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
Re: Applets with IE - difference between Tomcat and plain HTML?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 3/20/2009 4:45 AM, André Warnier wrote: applet type=application/x-java-applet That reminds me of something: applet is deprecated in favor of object. Maybe you ought to try object as another alternative. Glad you got it working. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknDpI4ACgkQ9CaO5/Lv0PB7/ACdGT6FpqFZH55pnMsQbSTkSLFi UiYAoL2FKf8NhJYAvyFGDcwa9WAo2Eot =aV93 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Question on Executor and maxThreads reported by Manager
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, On 3/20/2009 9:10 AM, Matt Brown wrote: Actually yes, in our case the image content is not already sufficiently compressed by the content provider - we're seeing a sizeable decrease in the size of the images delivered after enabling gzip on them. You may be able to re-code some of these graphics using higher compression (better results with PNG) or lower quality (for JPG) though lower quality will always be... lower quality. Interesting that gzip does a good job with these files. Can you give some metrics? I'd be interested to see how well it does. Is this for a mobile application? Or are you just trying to reduce bandwidth use in general? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknDpScACgkQ9CaO5/Lv0PDjMwCeMdwZw7SzUVH6YXjkAkzzECu8 Mg4AnRyjK+WCorIkVCFcCyFMFKhnZByW =+4e5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk and 304
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 3/20/2009 8:02 AM, André Cruz wrote: I'm running apache 2.2.9, mod_jk 1.2.27 and tomcat 6.0.18 and I get this problem as well: GET /shibboleth-idp/SSO HTTP/1.1 [snip] HTTP/1.1 302 Moved Temporarily Date: Fri, 20 Mar 2009 11:11:24 GMT Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8c mod_jk/1.2.27 Location: https://sso1.sso.bk.sapo.pt/Login.do?to=%2Fshibboleth-idp%2FSSO Vary: Accept-Encoding Content-Encoding: gzip Content-Length: 20 [snip] Notice that it tried to compress an empty response and it enlarged to 20 bytes. But this seems more like a problem with mod_deflate. gzip has a minimum output size (apparently 20 bytes). A gzip stream has to have a header, etc. to identify it as a gzip stream and allow decompression, even when there is no data to be compressed. I would agree that mod_deflate should detect zero-length content and just drop the compression, but if mod_deflate is engaged before the content is generated, it can't predict that you will have a zero-content response. You'll probably just have to live with this. At least 20 bytes isn't much. You have much more data in your headers than you do in your compressed emptiness (even the Content-Encoding header is more than 20 bytes). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknDpjsACgkQ9CaO5/Lv0PCzMQCgnUVJzInZHhDPfekqUWZb/cOe 9UcAn07A8qiSdyRQa9IygEJFxk7jbZGN =vSuM -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Applets with IE - difference between Tomcat and plain HTML?
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 3/20/2009 4:45 AM, André Warnier wrote: applet type=application/x-java-applet That reminds me of something: applet is deprecated in favor of object. Maybe you ought to try object as another alternative. Yes, but this is another area where practice trumps theory. object does not work in all browsers, but applet does, if you select your attributes carefully. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Need Help With Clustered Tomcat Sessions
I feel I must apologise. Upon closer examination, it appears I am having the same problem with my Linux load-balancer as well. It looks like I may a compound issue. The initial confusion started with the different way that Linux and Windows Apache servers handle the trailing slash for a URL. The Windows Apache would not see the trailing slash and break, so I was able to notice the problem. The Linux Apache server would not see the trailing slash, but would gracefully work around it. The other issue may also be connected to the trailing slash issue but I'm not sure, I'll try to explain it as best I can. When I go to http://192.168.1.100/examples (no trailing slash), I actually get forwarded to a Tomcat server and end up at http://192.168.1.110:8080/examples . If this happens, the Session ID stays the same and all my name/value pairs accumulate in the session example. However, If I keep adding a trailing slash: http://192.168.1.100/examples/ http://192.168.1.100/examples/servlets/ etc. Then the URL in the address bar stays that of the load-balancer, BUT, every time I add a new name/value pair to the session example I get a new Session ID and my name/value pairs keep getting overwritten. This, of course, wont work because there is now no more load balancing or failover protection. So ... I am now not sure if this is a trailing slash issue or a sessions issue, both or neither. If I use a static page placed in: C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\examples\test.html the load-balancing and failover work perfectly. It appears to only break if there is some kind of session/dynamic content on the page. So what does everybody think? Is this a simple issue or more complex? Is this simply a URL Rewrite issue or something else? Thank you so much for reading and replying. From: Alston, Brian (US SSA) [brian.als...@baesystems.com] Sent: Thursday, March 19, 2009 3:32 PM To: Tomcat Users List Subject: RE: Need Help With Clustered Tomcat Sessions Yes I am. The frustrating thing is I have 2 Tomcat servers and 2 Apache load balancers. One load balancer is Linux and one load balancer is Windows Server 2003 (I never have them both on at the same time). I can turn off my Windows load balancer, turn on my Linux load balancer, and the sessions work perfectly. It is some kind of issue with the Windows load balancer but I just cannot figure it out. My Apache load balancing configurations are the same between the Linux and Windows servers; the only difference is that the Linux load balancer works and the Windows one does not work, so you can see why I want to pull my hair out. I would simply stick with the Linux load balancer but they want me to use the Windows one, so I'm stuck. From: Jorge Medina [jmed...@e-dialog.com] Sent: Thursday, March 19, 2009 3:13 PM To: Tomcat Users List Subject: RE: Need Help With Clustered Tomcat Sessions Are you maintaining session stickyness? Did you configure Tomcat to replicate the sessions? -Original Message- From: Alston, Brian (US SSA) [mailto:brian.als...@baesystems.com] Sent: Thursday, March 19, 2009 1:40 PM To: users@tomcat.apache.org Subject: Need Help With Clustered Tomcat Sessions Hello All I am having trouble with my Tomcat cluster that I hope you can help with. First my setup: Apache Load Balancer: Windows Server 2003 - Apache 2.2.11 - 192.168.1.100 Tomcat Server 1: Windows Server 2003 - Tomcat 6.0.18 - 192.168.1.110 Tomcat Server 2: Windows Server 2003 - Tomcat 6.0.18 - 192.168.1.120 When I go to the Apache load balancer (http://192.168.1.100) the page comes up fine. When I go to the Java examples (http://192.168.1.100/examples/) and click on Servlets Examples and then on Sessions - Execute the page also comes up fine. It is here when I start to have problems. First, let me explain how I know I have problems. Here is another setup I have: Apache Load Balancer: RedHat Enterprise Linux 5 - Apache 2.2.3 - 192.168.2.100 Tomcat Server 1: Windows Server 2003 - Tomcat 6.0.18 - 192.168.2.110 Tomcat Server 2: Windows Server 2003 - Tomcat 6.0.18 - 192.168.2.120 When I go to my Linux load-balanced cluster and enter Name/Value Session Attributes into the Sessions Servlet Examples, they accumulate and I maintain the exact same Session ID. For example: Session ID: CCAE9F2E90A5311166E7B67CE003A727.tomcat1 The following data is in your session: color-sky = blue color-grass = green color-firetruck = red color-cloud = white No matter what I enter, I get an additional Name/Value Session Attribute pair and the exact same Session ID. Now, back to my Windows Server 2003 load-balanced cluster. Whenever I enter any Name/Value Session Attribute pairs, the new name/value pair always replaces the old, and I end up with an entirely new Session ID to boot: Session ID:
Re: Applets with IE - difference between Tomcat and plain HTML?
This is very very true. I spend eons mocking around with all kind of object/embed combinations, but in the end applet is the only way to do it in cross-browser way. On Mar 20, 2009, at 10:15 , André Warnier wrote: Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 3/20/2009 4:45 AM, André Warnier wrote: applet type=application/x-java-applet That reminds me of something: applet is deprecated in favor of object. Maybe you ought to try object as another alternative. Yes, but this is another area where practice trumps theory. object does not work in all browsers, but applet does, if you select your attributes carefully. - 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: mysql + tomcat work already but I need to reconfigurate the tomcat for load the examples in other location of the hard driver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, On 3/20/2009 4:21 AM, Tomas Rodriguez wrote: but now I wanna have in other directory my web pages examples, for instance in d:\websites\examplesJSP, what variable I need to change in the apache tomcat for work?, what files in the server apache tomcat can I change? I know this seems like a simple question, and users new to Tomcat (or any servlet server) have a bit of difficulty, but it has a complex answer. Let me try to explain things a little bit: The most basic unit of work for a servlet container is the servlet itself. JSP files are translated on the fly into Java classes which are also servlets. Although the servlet is the most basic unit of work, the webapp is really the focus of the server, and the concept that is most difficult to grasp for someone coming from a PHP or Perl or other CGI background. A Java webapp is a collection of servlets, JSPs, static content, helper classes, and libraries all bundled together, often into a WAR file. A WAR file is just a JAR file with a specific directory layout to facilitate webapp deployment. A webapp needs to look like this (structurally): /The root of the webapp. Anything can go in here like static content, subdirectories of static content, etc. /WEB-INF This directory contains webapp configuration files /WEB-INF/web.xml This is the deployment descriptor which defines the mapping from URLs to servlets, as well as some other things. Read the web.xml from any Tomcat example to get an idea of what you can do. /WEB-INF/classes This directory contains your Java class files, in package directories (like com/mycompany/MyClass.class) /WEB-INF/lib This directory contains any JAR files on which your code depends. /META-INFThis directory holds information about the JAR/WAR itself. The jar utility will add a MANIFEST.MF file here to indicate how it was created, etc. /META-INF/context.xml This file is a Tomcat-specific deployment file. You will want to look at some Tomcat examples for more information. This file is optional if you do not have any special configuration. Note that in your case, you probably want one of these files, and you probably want to use it to set up your database connections. This page gives you a start-to-finish example of how to build a web application. I hope it helps: http://www.adp-gmbh.ch/blog/2004/october/13.html Unfortunately, most of the Tomcat documentation assumes that the reader already knows all about Java webapps and just needs to know how to get things running on Tomcat. That's because there is already so much information out there online about Java webapps that the Tomcat folks don't really need to repeat everything. I hope that helps you out a bit. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknDqVgACgkQ9CaO5/Lv0PBg0wCdHAbw0YMojQKSlxK9CCIbMGC7 YzgAniWD6UGgLQgH0Po3TkKmKeWJVkNl =FCuB -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Question on Executor and maxThreads reported by Manager
Here are some quick numbers (provided by YSlow) from the home page of this webapp: Without gzip compression on image/png,image/jpeg,image/gif: 133.1K 12 Images With gzip compression: 1.7K 12 Images ..,Actually now that I'm looking in detail at the numbers reported for each individual image by YSLow, I'm starting to think that it doesn't calculate the size of gzipped images correctly. Here were the largest size images on this page pre-compression (I've removed the filenames): jpg 43.8K jpg 39.4K jpg 31.1K gif 7.4K png 4.5K gif 2.5K gif 2.4K With compression turned on: jpg gzip 0K gif gzip0K gif gzip0K gif gzip0K jpg gzip0K jpg gzip0K png gzip0K Seems like my earlier findings were incorrect based on this - surely gzip is not capable of compressing images to zero byte files :) I should have looked further into the total size number reported by Yslow instead of taking it for granted as being correct. Thanks again for pointing this out, I'll likely go ahead and disable these types from wastefully being recompressed on the server. -Matt -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Friday, March 20, 2009 10:16 AM To: Tomcat Users List Subject: Re: Question on Executor and maxThreads reported by Manager -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, On 3/20/2009 9:10 AM, Matt Brown wrote: Actually yes, in our case the image content is not already sufficiently compressed by the content provider - we're seeing a sizeable decrease in the size of the images delivered after enabling gzip on them. You may be able to re-code some of these graphics using higher compression (better results with PNG) or lower quality (for JPG) though lower quality will always be... lower quality. Interesting that gzip does a good job with these files. Can you give some metrics? I'd be interested to see how well it does. Is this for a mobile application? Or are you just trying to reduce bandwidth use in general? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknDpScACgkQ9CaO5/Lv0PDjMwCeMdwZw7SzUVH6YXjkAkzzECu8 Mg4AnRyjK+WCorIkVCFcCyFMFKhnZByW =+4e5 -END PGP SIGNATURE- - 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: Tomcat CPU 100%
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 MSerraInsiel, On 3/20/2009 5:40 AM, MSerraInsiel wrote: Hi all, We have a java web application (deployed on Tomcat 5.5 with java 1.4) that has never had CPU problems. Take thread dumps while the CPU is pegged. You didn't mention your Java version, so here goes: - - If you have Java 1.5+, you should have the 'jstack' program. Run that targeting the pid of the top-level Java process and you should get a complete thread dump. OR - - On UNIX, send a SIGSTOP to the main java process and look at the output in catalina.out. OR - - On Windows, you'll need to press CTRL-\ when running Tomcat from the command-line. I'm not sure how else to get a thread dump from java on Windows, so if you're running it as a service, you might have to stop Tomcat, re-start it from the command line (startup.bat) and then press CTRL-\ after your CPU goes high. Take thread dumps a few seconds apart, then examine them. Threads that say BLOCKED are not using any CPU (at least, not at the time the thread dump was taken). Anything that says RUNNABLE should be inspected to see what it's doing. Post your thread dumps to the list if you can't figure out what's going on. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknDqpsACgkQ9CaO5/Lv0PAWEwCfcQ3n9YoOFKElIWqdgjf01WHZ U8EAn32cdrguG0RUOTGoUCm6vJZV9ozr =woZD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat CPU 100%
java is 1.4.2, the SO is Linux, but we could not dump the comsuming thread because of teh -Xrs option. Now we removed it, but we have old libraries and no CPU problem. In an identical test environment the same problem does not arise, even with -Xrs option and new libraries version. Any ideas? Thanks Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 MSerraInsiel, On 3/20/2009 5:40 AM, MSerraInsiel wrote: Hi all, We have a java web application (deployed on Tomcat 5.5 with java 1.4) that has never had CPU problems. Take thread dumps while the CPU is pegged. You didn't mention your Java version, so here goes: - - If you have Java 1.5+, you should have the 'jstack' program. Run that targeting the pid of the top-level Java process and you should get a complete thread dump. OR - - On UNIX, send a SIGSTOP to the main java process and look at the output in catalina.out. OR - - On Windows, you'll need to press CTRL-\ when running Tomcat from the command-line. I'm not sure how else to get a thread dump from java on Windows, so if you're running it as a service, you might have to stop Tomcat, re-start it from the command line (startup.bat) and then press CTRL-\ after your CPU goes high. Take thread dumps a few seconds apart, then examine them. Threads that say BLOCKED are not using any CPU (at least, not at the time the thread dump was taken). Anything that says RUNNABLE should be inspected to see what it's doing. Post your thread dumps to the list if you can't figure out what's going on. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknDqpsACgkQ9CaO5/Lv0PAWEwCfcQ3n9YoOFKElIWqdgjf01WHZ U8EAn32cdrguG0RUOTGoUCm6vJZV9ozr =woZD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat-CPU-100--tp22617067p22621751.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat CPU 100%
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 MSerraInsiel, On 3/20/2009 10:48 AM, MSerraInsiel wrote: java is 1.4.2, the SO is Linux, but we could not dump the consuming thread because of the -Xrs option. Now we removed it, but we have old libraries and no CPU problem. In an identical test environment the same problem does not arise, even with -Xrs option and new libraries version. Presumably, a set of upgraded libraries is the goal. Are you willing to reproduce the circumstances again and take thread dumps? If not, and you have an identical test environment where everything works fine, I'd say you have a new production environment :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknDrmIACgkQ9CaO5/Lv0PBWpwCgi6fOvUR6nZwZW4LVu84/sbcm eNwAn1ZAQuWKQdwSgPvQnCS/ZFpssq4n =aRpq -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
very off topic marketing question
I have a client that is confused why we are giving them a J2EE product and they are concerned with performance and scalability. (IE/Tomcat 5.5/struts 2.1/hibernate 3.x/oracle 10g) Note the system will never see more than 50 users/sessions with 7500 hits per day on a lan. As such we don't see any relevance as to the performance and scalability issues for either PHP or J2EE. They have quoted to us: PHP by itself is very fast. Much faster than ASP or JSP running on the same type of server. This is because it has very little overhead compared to its competitors and it pre-compiles all of its code before it runs each script How would others respond to this? -Jason -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: mysql + tomcat work already but I need to reconfigurate the tomcat for load the examples in other location of the hard driver
From: Tomas Rodriguez [mailto:admhards...@yahoo.ca] Subject: mysql + tomcat work already but I need to reconfigurate the tomcat for load the examples in other location of the hard driver but now I wanna have in other directory my web pages examples, for instance in d:\websites\examplesJSP, what variable I need to change in the apache tomcat for work?, what files in the server apache tomcat can I change? Once you've followed Chris' advice and learned how to build a webapp, you can specify the webapp location via a Context element in Tomcat. Webapps are normally deployed in the directory specifed by the appBase attribute of the Host element in conf/server.xml; if you want a different default location for all webapps, change that. If you just want to put a small number of webapps in a different location, create a file named conf/Catalina/[host]/[appName].xml containing a Context element with a docBase attribute whose value is the absolute location of the webapp. Relevant documentation links: http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html http://tomcat.apache.org/tomcat-6.0-doc/config/context.html http://tomcat.apache.org/tomcat-6.0-doc/config/host.html - 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
RE: very off topic marketing question
From: Jason Pyeron [mailto:jpye...@pdinc.us] Subject: very off topic marketing question PHP by itself is very fast. Much faster than ASP or JSP running on the same type of server. This is because it has very little overhead compared to its competitors and it pre-compiles all of its code before it runs each script Utter BS - pure marketing drivel. The performance of a given application is dependent almost entirely on the architecture and design of the application, not the underlying components. If you design and code bad PHP, it will run slowly (as well as being unmaintainable). Sounds like your client is still laboring under the misconception that Java is an interpreted environment, which it hasn't been for over a decade. - 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
RE: very off topic marketing question
I would ask for benchmarks and evidence to back up that assertion. -Original Message- From: Jason Pyeron [mailto:jpye...@pdinc.us] Sent: Friday, March 20, 2009 11:04 AM To: 'Tomcat Users List' Subject: very off topic marketing question I have a client that is confused why we are giving them a J2EE product and they are concerned with performance and scalability. (IE/Tomcat 5.5/struts 2.1/hibernate 3.x/oracle 10g) Note the system will never see more than 50 users/sessions with 7500 hits per day on a lan. As such we don't see any relevance as to the performance and scalability issues for either PHP or J2EE. They have quoted to us: PHP by itself is very fast. Much faster than ASP or JSP running on the same type of server. This is because it has very little overhead compared to its competitors and it pre-compiles all of its code before it runs each script How would others respond to this? -Jason -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - 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: very off topic marketing question
From: Jason Pyeron [mailto:jpye...@pdinc.us] PHP by itself is very fast. Much faster than ASP or JSP running on the same type of server. This is because it has very little overhead compared to its competitors and it pre-compiles all of its code before it runs each script How would others respond to this? PHP doesn't scale as well under heavy load. If they are genuinely interested in scalability, figures 4-12 of http://www.trl.ibm.com/people/mich/pub/200812_middleware2008specweb.pdf should be interesting to them. I'm also particularly amused by the topmost set of bars in figure 2, given how proud the perl-ites are of their RE library and performance ;-). I copy the paper's conclusions here: 8 Conclusion When implementing a web server system which will never experience high load, or in which performance, throughput, and reliability under high load is not an issue, then the use of any of the analyzed languages or web servers will achieve similar performance results. If outstanding performance and throughput is the primary goal, then the use of JSP over PHP is advisable. However, if a 5-10% difference in throughput and performance is acceptable, then the implementer of a web system can achieve similar results using either PHP or JSP. In which case, other requirements such as developer language familiarity and programming efficiency, maintainability, security, reliability, middleware compatibility, etc. would be the deciding factors. It is also reassuring to developers of both language runtimes and web servers, that enhancements to either can offer performance improvements to the community. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very off topic marketing question
Jason Pyeron wrote: I have a client that is confused why we are giving them a J2EE product and they are concerned with performance and scalability. (IE/Tomcat 5.5/struts 2.1/hibernate 3.x/oracle 10g) Note the system will never see more than 50 users/sessions with 7500 hits per day on a lan. As such we don't see any relevance as to the performance and scalability issues for either PHP or J2EE. They have quoted to us: PHP by itself is very fast. Much faster than ASP or JSP running on the same type of server. This is because it has very little overhead compared to its competitors and it pre-compiles all of its code before it runs each script How would others respond to this? Before or after I stop laughing? With that sort of volume, Chuck could probably run the app on his phone with room to spare. More seriously, whilst performance should be a factor in technology selection it isn't the only one. Given the the low volume I would suggest that supportability is far more important. If the client knows PHP and is comfortable with it and doesn't know isn't comfortable with Java/Tomcat then I would go with PHP. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: very off topic marketing question
From: Matt Brown [mailto:matt.br...@citrixonline.com] I would ask for benchmarks and evidence to back up that assertion. There are plenty out there, but mostly old (... PHP4 promises to...). The IBM reference I've posted is relatively new and appears on an initial read to have a reasonable methodology. Incidentally, the figures in that IBM paper are with httpd+mod_jk or lighttpd+mod_proxy in front of Tomcat - the raw Tomcat throughput would be higher. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
FW: very off topic marketing question
Number of users is not the only one thing, you need to think about, when you are choosing technology. PHP is a _scripting_ language with out of _static typization_, multi-threading, full OOP support and its API is pretty weak too. Also it is _not_ designed for servlet ideology: each request runs script from the very beginning. You can use fast_cgi, but sometimes it is painfull procedure too. But it is fast and easy-to-use. Apache + PHP may run on P-166/64 RAM/FreeBSD serving phorum for ~ 100 users with out of troubles. Programs are small too, like in all scripting languages. If you are going to move to php, be ready to: 1) loose tools like log4j. 2) meet API, 10% of which uses OOP and exceptions, and 90% is procedure / errors based. 3) you would not have namespaces. 4) because of dynamic typization, you would be able to find some types of errors only in runtime. 5) no multithreading etc... -Original Message- From: Jason Pyeron [mailto:jpye...@pdinc.us] Sent: Friday, March 20, 2009 6:04 PM To: 'Tomcat Users List' Subject: very off topic marketing question I have a client that is confused why we are giving them a J2EE product and they are concerned with performance and scalability. (IE/Tomcat 5.5/struts 2.1/hibernate 3.x/oracle 10g) Note the system will never see more than 50 users/sessions with 7500 hits per day on a lan. As such we don't see any relevance as to the performance and scalability issues for either PHP or J2EE. They have quoted to us: PHP by itself is very fast. Much faster than ASP or JSP running on the same type of server. This is because it has very little overhead compared to its competitors and it pre-compiles all of its code before it runs each script How would others respond to this? -Jason -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - 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
Parameterizing log4j.properties/xml files
All, Apologies if I've missed the answer to this in the Logging HowTo, the FAQ, or Andre's collection of the logging discussion. Env: TC 6.0.18 + Java 1.5 The issue: I want to have several instances of the same webapp running on the same Tomcat as myapp1, myapp2, etc. That's easy. I'm going to be using log4j, probably with properties files, but xml would be ok too. I'd like to have log files named mylog.log appear in ${catalina.home}/ logs looking like myapp1-mylog.logmyapp2-mylog.log... etc. I could hardwire this in separte log4j.properties files for each myapp instance, something like this: log4j.appender.myLogFile.File=${catalina.home}/logs/myapp1-mylog.log log4j.appender.myLogFile.File=${catalina.home}/logs/myapp2-mylog.log And using ant to build my war files, I could hide this ugliness, just copying such hardwired files into the war being built. But is there any parameter syntax that would allow me to grab the context name and write one log4j.properties with something like this: log4j.appender.myLogFile.File=${catalina.home}/logs/${context-name}- mylog.log ?? Thanks, Ken - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: FW: very off topic marketing question
Just ask them to google for security-issues linked to PHP and issues linked to any servlet-container (aka Tomcat). If they want it more specific, ask them to read through some relevant mailing-list-archives such as full-disclosure. OK, that's not about performance, but we f.e. do not use PHP due to it's security-footprint. Sure, if one know his ways arround in PHP and know the sources of every module used in PHP and has checked them for any security-concern, it may work - however: I've never met such a person... Rgds 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: very off topic marketing question
Good Afternoon Peter: Apache is hamstrung by the number of prefork processes it can spawn.. http://httpd.apache.org/docs/2.0/misc/perf-tuning.html from what I gather at http://httpd.apache.org/docs/2.0/misc/perf-tuning.html in httpd.conf for mpm_prefork_module determine the size of your average Apache process, by looking at your process list via a tool such as top, and divide this into your total available memory, leaving some room for other processes. Beyond that the rest is mundane: get a fast enough CPU, a fast enough network card... MaxClients=AvaliableRam/ApacheProcessMemoryFootPrint assume your footrprint for ApacheProcess is 13,472 assume your AvailableRAM is =888,832 then leave MaxClients alone as the default of 256 will be assigned more RAM allows one to up MaxClients and allow mpm_prefork to spawn more procs (i havent seen any tests to bear this conclusion) Martin -- __ Verzicht und Vertraulichkeitanmerkung / Disclaimer and confidentiality note Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided. From: peter.crowt...@melandra.com To: users@tomcat.apache.org Date: Fri, 20 Mar 2009 15:43:28 + Subject: RE: very off topic marketing question From: Jason Pyeron [mailto:jpye...@pdinc.us] PHP by itself is very fast. Much faster than ASP or JSP running on the same type of server. This is because it has very little overhead compared to its competitors and it pre-compiles all of its code before it runs each script How would others respond to this? PHP doesn't scale as well under heavy load. If they are genuinely interested in scalability, figures 4-12 of http://www.trl.ibm.com/people/mich/pub/200812_middleware2008specweb.pdf should be interesting to them. I'm also particularly amused by the topmost set of bars in figure 2, given how proud the perl-ites are of their RE library and performance ;-). I copy the paper's conclusions here: 8 Conclusion When implementing a web server system which will never experience high load, or in which performance, throughput, and reliability under high load is not an issue, then the use of any of the analyzed languages or web servers will achieve similar performance results. If outstanding performance and throughput is the primary goal, then the use of JSP over PHP is advisable. However, if a 5-10% difference in throughput and performance is acceptable, then the implementer of a web system can achieve similar results using either PHP or JSP. In which case, other requirements such as developer language familiarity and programming efficiency, maintainability, security, reliability, middleware compatibility, etc. would be the deciding factors. It is also reassuring to developers of both language runtimes and web servers, that enhancements to either can offer performance improvements to the community. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Get quick access to your favorite MSN content with Internet Explorer 8. http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
[OT] RE: very off topic marketing question
From: Martin Gainty [mailto:mgai...@hotmail.com] Apache is hamstrung by the number of prefork processes it can spawn.. Yes. For this job, it's hamstrung by the PHP process being single-threaded and therefore having to spawn and keep multiple copies (each with its own address space) to handle concurrent requests. In other words: PHP (at least up to PHP5) is architecturally unsuitable for high-throughput services. It can be made to work, as Facebook demonstrates; but there are better architectures that have lower overhead. Actually, that's an interesting question. I wonder how many tonnes of carbon would be saved per annum if Facebook were reimplemented in something that allowed multiple threading and smaller sessions, such as Mono/ASP.Net or glassfish/servlets? ducks and runs to avoid the PHP lynch mob - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very off topic marketing question
and it pre-compiles all of its code before it runs each script For starters, I'd point out the jsp page compiler does this as well... Then redirect the person to this thread to get lynched. (seriously, aside from the lynching this is a good idea) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: very off topic marketing question
For starters, I'd point out the jsp page compiler does this as well... 1) BTW, you do not have to use JSP. I have a very big app, which gives XML as output. I do not need JSP to generate XML, so I use sevlet output directly. 2) You can precompile JSP (well, you can precompile PHP too, see Zend Compiler) 3) Most of logic in java web-app is stored in .class files, not in JSP pages. So, they are compiled, loaded _once_ and live in a memory. Kazakevich Ilya, MCP, SCJP - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
reversed proxy stopped working with tomcat cluster
Hi, I have two real machines. One of them is a Windows XP running Apache 2.2.10 + mod_jk /release date of 10/30/2008/ + Tomcat 6.0.16. The other one is a Mac with OSX 10.5.6 with Apache 2.2.9 + mod_jk 1.2.26 and Tomcat 6.0.16. The XP machine runs one instance of Tomcat /node4/. The Mac runs 3, - node1,2,3. Altogether 4 tomcats and they form a cluster. Here is one server .xml from node3. snip ?xml version='1.0' encoding='utf-8'? Server port=8205 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className =org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8280 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8643 / Connector port=8209 protocol=AJP/1.3 redirectPort=8643 / Engine name=Catalina defaultHost=localhost jvmRoute=node3 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/ Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server snip In front of these two machines is an Apache 2.2.10 in a VMWare Fusion virtual Machine on Windows XP in the Mac and configured as a Reverse proxy Here is the reverse proxy config from the httpd.conf snip ProxyRequests Off Proxy balancer://pathCluster BalancerMember http://bml0039.yalepath.org loadfactor=10 BalancerMember http://bml0073.yalepath.org loadfactor=10 ProxySet lbmethod=bytraffic /Proxy ProxyPass /tc/balancer://pathCluster/ ProxyPassReverse/tc/balancer://pathCluster/ Location /balancer-manager SetHandler balancer-manager Order Deny,Allow Allow from .yalepath.org /Location /snip Here is the workers.property file: snip bml0073:local janos$ cat apache2/conf/workers.properties worker.list = lb,jkstatus worker.lb.type=lb worker.lb.balance_workers=node1,node2,node3,node4 worker.lb.sticky_session = True worker.lb.sticky_session_force = False worker.jkstatus.type=status worker.node1.type = ajp13 worker.node1.host = localhost worker.node1.port = 8009 worker.node1.lbfactor = 1 worker.node1.redirect=node2 worker.node2.type = ajp13 worker.node2.host = localhost worker.node2.port = 8109 worker.node2.lbfactor = 1 worker.node2.redirect=node3 worker.node3.type = ajp13 worker.node3.host = localhost worker.node3.port = 8209 worker.node3.lbfactor = 1 worker.node3.redirect=node4 worker.node4.type = ajp13 worker.node4.host = bml0039.yalepath.org worker.node4.port = 8309 worker.node4.lbfactor = 1 worker.node4.redirect=node1 /snip Similar workers.properies on the XP machine but the hosts are logically different Well, this setup worked in December. The only change I made is that the sticky parameters now assigned to the loadbalancing worker 'lb' and not to the individual real workers. /Thanks to pointing that out :) / There were some updates to the Mac OS and also to the VmWare Fussion. I fired up this cluster yesterday and I realized it does not work anymore. Here is the access_log from the reverse proxy: snip 10.84.2.195 - - [20/Mar/2009:12:09:48 -0400] GET /tc/CassetteLabeler HTTP/1.1 302 - 10.84.2.195 - - [20/Mar/2009:12:09:49 -0400] GET /tc/CassetteLabeler/ HTTP/1.1 200 1506 10.84.2.195 - - [20/Mar/2009:12:09:49 -0400] GET /CassetteLabeler/ pathology.labeler.labeler.Labeler/Labeler.html HTTP/1.1 404 260 /snip here are the entries from the error log: snip [Fri Mar 20 12:08:30 2009] [notice] Apache/2.2.10 (Win32) configured -- resuming normal operations [Fri Mar 20 12:08:30 2009] [notice] Server built: Oct 10 2008 12:39:04 [Fri Mar 20 12:08:31 2009] [notice] Parent: Created child process 2564 [Fri Mar 20 12:08:31 2009] [notice] Child 2564: Child process is running [Fri Mar 20 12:08:31 2009] [notice] Child 2564: Acquired the start mutex. [Fri Mar 20 12:08:31 2009] [notice] Child 2564: Starting 64 worker threads. [Fri Mar 20 12:08:31 2009] [notice] Child 2564: Starting thread to listen on port 80. [Fri Mar 20 12:09:32 2009] [error] [client 10.84.2.195] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/ favicon.ico [Fri Mar 20 12:09:35 2009] [error] [client 10.84.2.195] File does not exist: C:/Program
Re: How to make Tomcat serve/listen to one more port?
On Fri, Mar 20, 2009 at 2:57 PM, André Warnier a...@ice-sa.com wrote: Hi poubelle. (J'ai toujours rêvé de pouvoir écrire ca sans être impoli..). OT: :D Parce que cette adresse-ci est créée pour recevoir des cochonneries comme les pubs, les listes de diffusions, etc. C'est pas mon adresse perso :) Translation: Je suis la poubelle means I'm the trashcan in French. This isn't my personal e-address; just a mailbox to receive stuffs like ads, mailing-lists, etc. Je suis la poubelle wrote: Currently, I access the Tomcat's default website using an URL like this: http://myservername:x/ All I want to do is to have another website using an URL like this: http://myservername:y/ TIA Starting from the beginning : What you are describing above is feasible, but not very easily. That is because generally what people want, is to do this : a) http://myservername1/ http://myservername2/ (and get a different application when they access myservername1 than when they access myservername2) and not b) http://myservername:8080/ http://myservername:8081/ (and get a different application when they access myservername:8080 than when they access myservername:8081) (a) is easy to do with Tomcat, (b) is more complicated. So tell us first if (a) would be fine, because then we can tell you how-to, in less lines than would be needed for (b). Unfortunately, I really need (b). It's very easy to do (b) in IIS6, but it doesn't seem to be the case in Tomcat (no flame intended, just a pure comparison :p )
RE: How to make Tomcat serve/listen to one more port?
From: Je suis la poubelle [mailto:laps...@gmail.com] Subject: Re: How to make Tomcat serve/listen to one more port? Unfortunately, I really need (b). It's very easy to do (b) in IIS6, but it doesn't seem to be the case in Tomcat (no flame intended, just a pure comparison :p ) I already told you how: create a second Service, and put the second Connector and another Host inside that. - 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
RE: How to make Tomcat serve/listen to one more port?
From: Caldarale, Charles R Subject: RE: How to make Tomcat serve/listen to one more port? I already told you how: create a second Service, and put the second Connector and another Host inside that. If that's not clear, send me your server.xml, and I'll update it. Should take less than a minute. - 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
Re: Tomcat CPU 100%
MSerraInsiel wrote: Hi all, We have a java web application (deployed on Tomcat 5.5 with java 1.4) that has never had CPU problems. Some days ago we deployed a new version, that had non significant differences, and since this deploy we got frequent CPU 100% usage. users could not work and we needed to rollback to previuos version. The unique structural difference is the upgrade of the following libraries, used to generate jasperReports: - commons-beanutils-1.5 -- 1.7 - groovy-all-1.0-beta-10 -- groovy-all-1.0 Latest stable Groovy is 1.6. I found 1.0 doing all sorts of things I'd rather it didn't, later versions are considerably improved. p - jasperreports-1.2.0 -- 1.3.3 - jdt-compiler -- 3.1.1 - added jasperreports-extensions-1.3.1 with the -Xrs option we could not get info about the hanging thread, so yesterday we deployed the new version, with old libraries and without -Xrs option. Now we get no CPU usage problem. Can you help us understand what the real problem could be? Thanks in advance - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very off topic marketing question
Taylan Develioglu wrote: and it pre-compiles all of its code before it runs each script For starters, I'd point out the jsp page compiler does this as well... Not if you precompile your application. So you could, if you're in the mood to use the same arguments, state somewhat disingenuously that Servlets are already compiled, so they're bound to be quicker because that step just isn't necessary. p - 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
job announcement - Senior Technical Operations Leader
Senior Technical Operations Leader Location: Mountain View, CA NetBase, a well-funded, fast growing company with an impressive roster of top-tier Fortune 500 companies, seeks to grow its team with a hands-on senior technical operations leader. NetBase delivers Content Intelligence solutions that harness value and insight from any source, including the Internet, premium and enterprise content. NetBase reads every sentence inside documents, linguistically understands the content and powers breakthrough search experiences with relevant answers and insights. NetBase is being used by organizations that are recognized as global leaders in healthcare, publishing, manufacturing, consumer packaged goods and government such as Elsevier, Clorox, 3M, The U.S. Army, Pepsi and many more. We are looking for an operations leader who can establish strong cross-functional working relationships within a growing organization. Candidates should have experience hiring, growing, and managing change in an operations group. A strong business acumen and negotiation skills are essential. We seek individuals with experience in the search space and/or high-volume document processing, including experience in handling large amounts of data--up to Petabytes. We are a lean organization so candidates who share in our belief of scaling with commodity hardware will be preferred. Experience with consumer-facing web applications is a plus. Job Requirements: * 8+ years technical operations experience * Experience with large scale systems (Internet search preferred) * Demonstrated ability to build complex operations with commodity hardware * Expertise in production network planning and real-time network diagnosis * High degree of integrity and drive * MS in Computer Science or equivalent experience * Available to address operations issues on a moment's notice * Experience scaling to multiple operations centers * Excellent negotiator Technologies in Use: * Linux (Suse) * BSD Unix * nginx, apache, tomcat * Lucene * Java * Jgroups * mySQL * nagios * python Authorization to work in the US and relocation are required. To apply: Please submit a resume and cover letter via email to t...@netbase.com with the subject of Senior Technical Operations Leader. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
job announcement - Software Architect
Software Architect Location: Mountain View, CA NetBase, a well-funded, fast growing company with an impressive roster of top-tier Fortune 500 companies, seeks to grow its team with a hands-on software architect. NetBase delivers Content Intelligence solutions that harness value and insight from any source, including the Internet, premium and enterprise content. NetBase reads every sentence inside documents, linguistically understands the content and powers breakthrough search experiences with relevant answers and insights. NetBase is being used by organizations that are recognized as global leaders in healthcare, publishing, manufacturing, consumer packaged goods and government such as Elsevier, Clorox, 3M, The U.S. Army, Pepsi and many more. We seek a hands-on architect with extensive background in software development to translate business objectives into a technology vision and articulated architecture. Candidates should have a strong track record of designing and developing multi-tiered web applications that are high quality, scalable, and reliable. We prefer generalists who have driven feature development at every layer of the stack. We have a strong preference for someone with expertise in text search engines such as Lucene or FAST who have customized these systems and deployed them on a large-scale. Also preferred are candidates with experience in applying NLP and Machine Learning to solving problems for Fortune 500 end-users. Candidates should have excellent interpersonal skills and a track record of increasing responsibility. Those who are skilled in organizational needs assessment and driving change via consensus will fit in well on our team. Candidates should be able to establish credibility quickly and provide mentorship to team members. We target talented individuals who are resourceful, flexible, and aggressive about learning new things. We are an Agile development shop. We do test-driven design and rapid iterative development and are looking for a like-minded architect to help us build for the future. Requirements: * 10 years work experience with 3+ as an architect * Experience in large-scale, distributed, web-based applications * Agile development methodology * Deep knowledge of Java * MS or PhD in CS * Database design and SQL (MySQL a plus) * Excellent interpersonal and communications skills * High degree of integrity and drive * Expertise in Adobe Flex, Flash and Python are nice to have Authorization to work in the US and relocation are required. To apply: Please submit a resume and cover letter via email to t...@netbase.com with the subject of Software Architect. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache/mod_jk serves random files from tomcat
Rainer, Rainer Jung-3 wrote: I guess you mean the lines with the 503 are the bad responses? But those do not indicate, that the probe gets back the page requested by someone else, it shows that the web server or Tomcat throw an HTTP error, namely 503. In this case I would guess, that mod_jk detected an error and put th enode into error status. You should check your mod_jk log file. It might also be good to temporarily activate the access log of Tomcat too, in order to check, whether the 503 already came from there or not. I would expect the develop observation and this one are two different things. Actually I was trying to draw comparison to the original poster, Tim Redding's comments about how the file size on a static page would change. Unfortunately, I gave you a bad example, which included the 503 error. Please ignore that. Basically, in the access_log we see the file size change, because it is serving the wrong page. We had to throw a band aid up, which monitors the file sizes and if they differ, the script bounces Apache. Seems to work ok for now, but its kind of ugly. Rainer Jung-3 wrote: Do both (mod_jk and mod_jk2 show the problems A=develop and B=probes? Yes, after looking closer, we're having the same problem with both connectors. We're currently in the process of upgrading everything-- going to Apache 2.2.11, mod_jk 1.2.27, and Tomcat 5.5.27. I'll let you know if any of these help. -- View this message in context: http://www.nabble.com/Apache-mod_jk-serves-random-files-from-tomcat-tp18385568p22628124.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Question on Executor and maxThreads reported by Manager
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, On 3/20/2009 10:34 AM, Matt Brown wrote: Here are some quick numbers (provided by YSlow) from the home page of this webapp: Without gzip compression on image/png,image/jpeg,image/gif: 133.1K 12 Images With gzip compression: 1.7K 12 Images Wow, that's incredible. You must have non-compressed PNGs or something. Seems like my earlier findings were incorrect based on this - surely gzip is not capable of compressing images to zero byte files :) It's using the new ∞-compressor. It's a new breed of super-lossy algorithms. It's practical applications are as yet unknown. I should have looked further into the total size number reported by Yslow instead of taking it for granted as being correct. I suspect what you're seeing from Yslow is an aggregate including the text files, etc. Text files, of course, compress /very/ well using gzip and other similar compression algorithms. Thanks again for pointing this out, I'll likely go ahead and disable these types from wastefully being recompressed on the server. Yeah, unless you are serving images to mobile devices or some other application where bandwidth is significantly limited, (re-)compressing images is counter-productive: you waste a lot of CPU time getting 0.5% compression ratios for your trouble. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknD+4oACgkQ9CaO5/Lv0PB/HgCeJ/mMuheNkfWR+qweAJKRiF0x uoIAoLKm85ljimsmYqt1ItGFtbr821QQ =2g1j -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Need Help With Clustered Tomcat Sessions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian, On 3/20/2009 10:21 AM, Alston, Brian (US SSA) wrote: When I go to http://192.168.1.100/examples (no trailing slash), I actually get forwarded to a Tomcat server and end up at http://192.168.1.110:8080/examples . If this happens, the Session ID stays the same and all my name/value pairs accumulate in the session example. However, If I keep adding a trailing slash[, then] the URL in the address bar stays that of the load-balancer, BUT, every time I add a new name/value pair to the session example I get a new Session ID and my name/value pairs keep getting overwritten. This is very good information. Nice investigation, especially because it leads directly to a conclusion: Your JSESSIONID cookies have the wrong information in them. Get yourself an HTTP sniffer to verify that this is what is happening: 1. You make a connection to http://192.168.1.100/examples/ 2. The request is re-routed to http://192.168.1.110:8080/examples/ 3. The server responds with a Set-Cookie header including host=192.168.1.110 4. Your next request goes to http://192.168.1.100/examples/, so the browser never sends the JSESSIONID cookie back to the server You need to make sure that the URL the client sees matches the hostname used in the Set-Cookie header. When you leave-off the trailing /, the server sends a REDIRECT back to the client and says go to http://192.168.1.110:8080/examples/;, and then everything works fine (because the hostname changes as far as the client is concerned). How do you have Apache talking to Tomcat? Are you using mod_proxy_http? mod_proxy_ajp? mod_jk? So what does everybody think? Is this a simple issue or more complex? Is this simply a URL Rewrite issue or something else? It's more likely that you are using mod_proxy_http, and you haven't properly configured a ProxyPassReverse for your servers. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknD/e4ACgkQ9CaO5/Lv0PDXMwCgiq0k00vwDRPtGuACUbHuOfEE lvMAnAyE59SYdniJ77KU0sUILaSgKthn =jiRr -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very off topic marketing question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, On 3/20/2009 11:43 AM, Peter Crowther wrote: When implementing a web server system which will never experience high load, or in which performance, throughput, and reliability under high load is not an issue, then the use of any of the analyzed languages or web servers will achieve similar performance results. If outstanding performance and throughput is the primary goal, then the use of JSP over PHP is advisable. I wonder how the folks over at Wikipedia feel about their PHP-based system. I suspect they get a significant amount of load. I'm not trying to be combative... I'm just really interested in how they feel their scalability feels to them. Would a Java rewrite of Mediawiki give them 5-10% higher throughput? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknD/08ACgkQ9CaO5/Lv0PBUCACfd7aXRlaxZZ9Zipmp9lG4A2S/ +WIAn0ykW1e1jirOLIEFnmflAXVgGNMH =Eo8C -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: very off topic marketing question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 3/20/2009 11:46 AM, Mark Thomas wrote: More seriously, whilst performance should be a factor in technology selection it isn't the only one. Given the the low volume I would suggest that supportability is far more important. If the client knows PHP and is comfortable with it and doesn't know isn't comfortable with Java/Tomcat then I would go with PHP. +1 I would have used the term maintainability, but the effect is the same: whichever implementation will be the easiest for them to maintain is probably the right choice. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknD//EACgkQ9CaO5/Lv0PBFMwCcCTP7TcYCiqbuYibV2hyRjT1t pdYAoMLWz2zvGhemYe4SSauKOPjC3zn3 =5bL6 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: FW: very off topic marketing question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ilya, Don't get me wrong... I loves me some Java. But... On 3/20/2009 11:55 AM, Ilya Kazakevich wrote: If you are going to move to php, be ready to: 1) loose tools like log4j. log4p? 2) meet API, 10% of which uses OOP and exceptions, and 90% is procedure / errors based. This does really suck. It's going back and using C when you've become sooo used to exceptions. 3) you would not have namespaces. Meh. I suppose on a large (huge?) project this could be a problem. You can always namespace your files by using subdirectories. Oh, wait. You weren't suggesting that you use objects in PHP were you? Ha ha ha ha. Oh, maybe you were. Sorry. 4) because of dynamic typization, you would be able to find some types of errors only in runtime. Java is not safe from runtime errors; they're just (mostly) not the kinds of errors that can be prevented using static type-checking. I've come-around on this one: static typing is just one way of doing things. Ruby's mix-ins are very attractive for those of us who have had trouble breaking-into a class hierarchy. :) 5) no multithreading Meh. Most Java webapps aren't multithreaded anyway in the sense that each request lives in its own little world and usually runs start to finish with no other threading involved. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknEAZ0ACgkQ9CaO5/Lv0PA66ACfYgElGkBrKzxS2Lp9ABhW9ZZU UDgAn0eFpdBXzUCcda4G2LOE5733XSgL =X7eW -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Parameterizing log4j.properties/xml files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ken, On 3/20/2009 12:08 PM, Ken Bowen wrote: But is there any parameter syntax that would allow me to grab the context name and write one log4j.properties with something like this: log4j.appender.myLogFile.File=${catalina.home}/logs/${context-name}-mylog.log Nothing built-into Tomcat or log4j. Log4j allows for parameterizing its own log files, but you'd have to set the context-name /in the properties file/ in order for log4j to pick it up. My advice: use ant to do string-replacement as the WAR file is built. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknEAlAACgkQ9CaO5/Lv0PDCdACeLHdUmRq7wMrdph1Xjyhi0giR YkoAn0S344WMud0h6TmlurVt850Jd3yo =wePB -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to make Tomcat serve/listen to one more port?
On Fri, Mar 20, 2009 at 7:04 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Je suis la poubelle [mailto:laps...@gmail.com] Subject: Re: How to make Tomcat serve/listen to one more port? Unfortunately, I really need (b). It's very easy to do (b) in IIS6, but it doesn't seem to be the case in Tomcat (no flame intended, just a pure comparison :p ) I already told you how: create a second Service, and put the second Connector and another Host inside that. OK, thanks, I'll have a try :)
Re: Parameterizing log4j.properties/xml files
I was doing something like this with LogBack (successor to log4j more or less), but I'm no longer using it and don't remember how I set it up. The class starts as follows: public final class InitLogback extends HttpServlet { @Override public void init() { final String pathPrefix = getServletContext().getRealPath(/); And I think pathPrefix then contains the name of the directory in the tomcat webapps folder. I don't remember how I was configuring this servlet in the web.xml file; possibly as a regular servlet with a load-on-startup value that was lower than the main (Spring) servlet. I don't claim that this is the best way to accomplish this. If you're using Spring you may want to look at its org.springframework.web.util.Log4jWebConfigurer and org.springframework.web.util.Log4jConfigListener Ken Bowen wrote: All, Apologies if I've missed the answer to this in the Logging HowTo, the FAQ, or Andre's collection of the logging discussion. Env: TC 6.0.18 + Java 1.5 The issue: I want to have several instances of the same webapp running on the same Tomcat as myapp1, myapp2, etc. That's easy. I'm going to be using log4j, probably with properties files, but xml would be ok too. I'd like to have log files named mylog.log appear in ${catalina.home}/logs looking like myapp1-mylog.logmyapp2-mylog.log... etc. I could hardwire this in separte log4j.properties files for each myapp instance, something like this: log4j.appender.myLogFile.File=${catalina.home}/logs/myapp1-mylog.log log4j.appender.myLogFile.File=${catalina.home}/logs/myapp2-mylog.log And using ant to build my war files, I could hide this ugliness, just copying such hardwired files into the war being built. But is there any parameter syntax that would allow me to grab the context name and write one log4j.properties with something like this: log4j.appender.myLogFile.File=${catalina.home}/logs/${context-name}-mylog.log ?? Thanks, Ken - 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: FW: very off topic marketing question
Meh. Most Java webapps aren't multithreaded anyway in the sense that each request lives in its own little world and usually runs start to finish with no other threading involved. Just this week I added threading to a component of my web-app. I had some what dreaded it, but found that it took me only a half-hour and about 10 extra lines of code, here's a synopsis: Thread t = new Thread(new Runnable() { public void run() { ...blast() } }, Blast Thread); t.start(); Where blast() iterates thru several thousand records, which are sent to a third-party site for processing. The third-party site allows no more than 5 connections per second, so I just call Thread.sleep(1000) on every 5th record. It is very simple, very elegant and very fast now that some much load has been moved off the main http thread. My question is: how would this be accomplished in PHP? Would I need to recompile the whole php server with a special thread package or what? On Fri, Mar 20, 2009 at 4:50 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ilya, Don't get me wrong... I loves me some Java. But... On 3/20/2009 11:55 AM, Ilya Kazakevich wrote: If you are going to move to php, be ready to: 1) loose tools like log4j. log4p? 2) meet API, 10% of which uses OOP and exceptions, and 90% is procedure / errors based. This does really suck. It's going back and using C when you've become sooo used to exceptions. 3) you would not have namespaces. Meh. I suppose on a large (huge?) project this could be a problem. You can always namespace your files by using subdirectories. Oh, wait. You weren't suggesting that you use objects in PHP were you? Ha ha ha ha. Oh, maybe you were. Sorry. 4) because of dynamic typization, you would be able to find some types of errors only in runtime. Java is not safe from runtime errors; they're just (mostly) not the kinds of errors that can be prevented using static type-checking. I've come-around on this one: static typing is just one way of doing things. Ruby's mix-ins are very attractive for those of us who have had trouble breaking-into a class hierarchy. :) 5) no multithreading Meh. Most Java webapps aren't multithreaded anyway in the sense that each request lives in its own little world and usually runs start to finish with no other threading involved. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknEAZ0ACgkQ9CaO5/Lv0PA66ACfYgElGkBrKzxS2Lp9ABhW9ZZU UDgAn0eFpdBXzUCcda4G2LOE5733XSgL =X7eW -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: help building a proxy
Well, that's exactly what I want to do, build a web page from within the proxy server that will be viewed at a later time, and also further pass on the request and expect to get a page back which will also be viewed at a later time. This all happens from the proxy server. 1) receive URL from user request and store/build a web page to be viewed at a later time (from within this proxy). 2) pass on URL to web server and store the response html page in this proxy to also be viewed at a later time. I did send to httpd, but I didn't see that apache was going to do what I was looking for, at least w/ mods only. I'm still looking into that also. Hope that helps clarify. On Fri, Mar 20, 2009 at 3:22 AM, André Warnier a...@ice-sa.com wrote: Richard Langly wrote: Hey all, I'm searching for a way to make a proxy server to: - receive a request from a web-browser. - allows me to grab the URL and build a web page. - then forward the request to the destination. - and then allows me to store and access the response when the destination returns the page from this same proxy server. If Tomcat would allow me to do this, can I get a short desc of what I need to do? I think I have seen this question before, maybe on another list (Apache httpd?). And you are probably not getting the answer you want, because the way you write the question above does not seem to make a lot of sense. For example, these two lines appear to be contradictory : - allows me to grab the URL and build a web page. - then forward the request to the destination. Because in the server who gets the request, you normally /either/ build a response html page and return it to the browser, /or/ you pass the request further to another server, but not both at the same time. Can you try and rephrase your question in another way, or give an example of what you would really like to do ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: help building a proxy
If you mean that there are no modifications to the original request or even the response, then yes. It's to be a transparent proxy. On Fri, Mar 20, 2009 at 4:18 AM, Gregor Schneider rc4...@googlemail.comwrote: Richard: Are you looking for a transparent proxy? I.e., circumvent some censorship? Rgds 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org