File system inaccessible to application running under Tomcat
Hello everyone, I'm having a problem with a java/jsp application running under Tomcat 5.5.12 on Windows. When I start Tomcat from the system tray application or from the windows services window code that checks whether a directory exists incorrectly returns false: File file = new File(server.dataDirectory); if (! file.exists()) throw new FileNotFoundException(Data directory + server.dataDirectory + for server + server.shortName + does not exist.); If I comment this out the next piece of code (which gets a list of files in the directory) returns no files. However if I start Tomcat from within either Eclipse (MyEclipse) or Netbeans this does not happen - file.exists() returns true and a complete list of files is returned. I'm assuming that there is come configuration option that causes Tomcat not to be able to see the local file system but I can't think what it might be - I'm not starting Tomcat with a security manager. Can anyone help? Thanks very much, Steve Stephen Gray Archive Research Officer Australian Social Science Data Archive 18 Balmain Crescent (Building #66) The Australian National University Canberra ACT 0200 Phone +61 2 6125 2185 Fax +61 2 6125 0627 Web http://assda.anu.edu.au/
Re: Tomcat 5.5.17 APR/SSL Client Certificat
Hi, I cannot obtain client certificate with SSL/client certificate authentication using APR components ... It's probably a stupid question, but did you generate the client certificate and did you import in the browser from which you are trying to connect to your application? How did you create it? You made no reference to that part Regards, Gaël
problem with jkmanager
Hi. We set loadbalancing with jk (1.2.15) and apache (2.0) to six tomcats tomcats (two cluster). We found strage behavior of jkmanager - every refresh of page gives another result of Acc Number of requests - actually there is no requests at all. Why? Any idea? web3:~# links -dump http://10.129.0.11:80/jkmanager/ date tomcat1 ajp13 10.129.100.7:8009 10.129.100.7:8009 OK 1 101 32116 0 0 0 311 cluster1 tomcat2 ajp13 10.129.100.8:8010 10.129.100.8:8010 OK 1 227 33634 0 0 0 09 cluster1 tomcat3 ajp13 10.129.100.9:8009 10.129.100.9:8009 OK 1 -1060 34050 0 0 0 212 cluster1 tomcat4 ajp13 10.129.100.10:8010 10.129.100.10:8010 OK 1 539 30598 0 0 0 613 cluster2 tomcat5 ajp13 10.129.100.11:8009 10.129.100.11:8009 OK 1 125 30722 0 0 0 513 cluster2 tomcat6 ajp13 10.129.100.12:8010 10.129.100.12:8010 OK 1 7430333 0 0 0 19 cluster2 wto cze 20 08:28:03 CEST 2006 web3:~# links -dump http://10.129.0.11:80/jkmanager/ date tomcat1 ajp13 10.129.100.7:8009 10.129.100.7:8009 OK 1 103 31267 0 0 0 110 cluster1 tomcat2 ajp13 10.129.100.8:8010 10.129.100.8:8010 OK 1 -137 32913 0 0 0 210 cluster1 tomcat3 ajp13 10.129.100.9:8009 10.129.100.9:8009 OK 1 -746 33109 0 0 0 110 cluster1 tomcat4 ajp13 10.129.100.10:8010 10.129.100.10:8010 OK 1 531 30032 0 0 0 010 cluster2 tomcat5 ajp13 10.129.100.11:8009 10.129.100.11:8009 OK 1 147 30018 0 0 0 512 cluster2 tomcat6 ajp13 10.129.100.12:8010 10.129.100.12:8010 OK 1 108 29522 0 0 0 916 cluster2 wto cze 20 08:28:04 CEST 2006 web3:~# links -dump http://10.129.0.11:80/jkmanager/ date tomcat1 ajp13 10.129.100.7:8009 10.129.100.7:8009 OK 1 136 30148 0 0 0 08 cluster1 tomcat2 ajp13 10.129.100.8:8010 10.129.100.8:8010 OK 1 -812 31970 0 0 0 12 19 cluster1 tomcat3 ajp13 10.129.100.9:8009 10.129.100.9:8009 OK 1 82 31667 0 0 0 29 cluster1 tomcat4 ajp13 10.129.100.10:8010 10.129.100.10:8010 OK 1 527 28912 0 0 0 29 cluster2 tomcat5 ajp13 10.129.100.11:8009 10.129.100.11:8009 OK 1 38 29089 0 0 0 09 cluster2 tomcat6 ajp13 10.129.100.12:8010 10.129.100.12:8010 OK 1 35 28710 0 0 0 09 cluster2 wto cze 20 08:28:04 CEST 2006 web3:~# links -dump http://10.129.0.11:80/jkmanager/ date tomcat1 ajp13 10.129.100.7:8009 10.129.100.7:8009 OK 1 94 33295 0 0 0 714 cluster1 tomcat2 ajp13 10.129.100.8:8010 10.129.100.8:8010 OK 1 -608 35038 0 0 0 110 cluster1 tomcat3 ajp13 10.129.100.9:8009 10.129.100.9:8009 OK 1 -275 34903 0 0 0 09 cluster1 tomcat4 ajp13 10.129.100.10:8010 10.129.100.10:8010 OK 1 497 31654 0 0 0 09 cluster2 tomcat5 ajp13 10.129.100.11:8009 10.129.100.11:8009 OK 1 146 31914 0 0 0 413 cluster2 tomcat6 ajp13 10.129.100.12:8010 10.129.100.12:8010 OK 1 152 31356 0 0 0 613 cluster2 wto cze 20 08:28:05 CEST 2006 web3:~# -- Rafał Zawadzki Deploy/Release Manager eo Networks Sp. z o.o. pgp42hyAPH1zr.pgp Description: PGP signature
Problem to download a file from 2 browsers at the time
I have this JSP that download an excel file. It works fine if I use only one browser at the same time. The problem is when I try to do this but from 2 browsers at the same time, (for example in a same computer). From each browser I can download a part of the file but not the complete file. It seems the browsers are sharing the bandwidth and when it starts to download a file the other stops. I have look the logs, and I saw the file has downloaded to the computer and while the jsp is working. I don't undestand why the file has finished to download and while the jsp is still executing. Can you help me please? do anybody try this JSP and tell me if the result is the same as me? Why is it happening this? --JSP ---shy; [EMAIL PROTECTED] contentType=application/vnd.ms-excel% %@ page language=java import=java.io.*% %@ page language=java import=java.util.*% % Date fecha = new Date(); java.sql.Date fechaSQL = new java.sql.Date(fecha.getTime()); Calendar calendario = Calendar.getInstance(); calendario.setTime(fecha); // fecha es el Date de antes. String strHour = String.valueOf( calendario.get(Calendar.HOUR) ); String strMinute = String.valueOf( calendario.get(Calendar.MINUTE) ); String strSecond = String.valueOf( calendario.get(Calendar.SECOND) ); String nombre = FILE + strHour + strMinute + strSecond + .xls; System.out.println( IN OF + nombre ); response.setContentType( application/x-download ); response.setHeader(Content-type,application/vnd.ms-excel); response.setHeader(Content-Disposition,attachment; filename=\ + nombre + \); System.out.println( nombre +START ); for (int l=0;l3;l++){ System.out.println( nombre ++ l ); for (int k=0;k250;k++){ out.write(nombre + : (+ l + , + k + ) + \t ); } out.write(\n); } System.out.println( nombre + END ); % - LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com
Re: Http11AprProtocol took 2 hr to init on http-443
Jeff Chuang wrote: Thanks for responses. If I put connector ajp-8009 configuration block BEFORE connector http-443 in server.xml, the log looks like Jun 19, 2006 5:33:11 PM org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-80 Jun 19, 2006 5:33:11 PM org.apache.coyote.ajp.AjpAprProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-8009 Jun 19, 2006 7:43:48 PM org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-443 Jun 19, 2006 7:43:48 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 7840211 ms So I believe ports 80 and 8009 are ok, the initialization problem is only on port 443 I start tomcat by jsvc as root, and use openssl to generate self-signed certificate. After 2+ hours initialization, everything works fine and the ssl connector performance is excellent. Is it possible that any share library of openssl caused this initialization problem(delay)? I have also seen this with one of my Tomcats. But since for me the HTTPS APR Connector needs only 30 sec - 2 min to come up and not hours, it hasn't bothered me enough to dig deeper into it. The first time I saw this was with a Tomcat running on UML in a chroot. I thought I solved the problem by bind-mounting /dev/random in the chroot. But it seems it was only an accident that it worked after that and not because the underlying problem was solved. So, I can't give any help, I just can confirm that you're not the only one seeing this. Regards mks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Http11AprProtocol took 2 hr to init on http-443
Stephen Souness wrote: Could it be related to some problems that Java has had on some Linux distributions with obtaining entropy for its random number generation for encryption? In the past (a few years back admittedly) we encountered a problem when trying to connect our application to an https site. Changing the securerandom.source entry in ${JAVA_HOME}/jre/lib/security/java.security to file:/dev/urandom solved it for us. On the machine I've seen this phenomenon securerandom.source is already set to file:/dev/urandom. Since I didn't change the java.security file it seems to be the standard on 1.5 JVMs. Regards mks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem to download a file from 2 browsers at the time
password password wrote: I have this JSP that download an excel file. It works fine if I use only one browser at the same time. The problem is when I try to do this but from 2 browsers at the same time, (for example in a same computer). From each browser I can download a part of the file but not the complete file. It seems the browsers are sharing the bandwidth and when it starts to download a file the other stops. from IE there is some limitation that you can only open 2 concurrent connections to one domain. Thanks - Rajeev - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem to download a file from 2 browsers at the time
I have tried in others browsers and the result is the same. The files are download but incomplets. And while the JSP continues executing the code, a don't understand. Rajeev N. Jha [EMAIL PROTECTED] escribió: password password wrote: I have this JSP that download an excel file. It works fine if I use only one browser at the same time. The problem is when I try to do this but from 2 browsers at the same time, (for example in a same computer). From each browser I can download a part of the file but not the complete file. It seems the browsers are sharing the bandwidth and when it starts to download a file the other stops. from IE there is some limitation that you can only open 2 concurrent connections to one domain. Thanks - Rajeev - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com
Re: Problem to download a file from 2 browsers at the time
Look at the code, look at the loops, You are trying to download some 105 MB files !!! nombre is like 15 bytes at least (a) either you wait for a real long time (b) or you set the content-length in advance (c) or better still try with small numbers for (int l=0;l30;l++){ for (int k=0;k25;k++){ HTH - Rajeev. password password wrote: I have tried in others browsers and the result is the same. The files are download but incomplets. And while the JSP continues executing the code, a don't understand. */Rajeev N. Jha [EMAIL PROTECTED]/* escribió: password password wrote: I have this JSP that download an excel file. It works fine if I use only one browser at the same time. The problem is when I try to do this but from 2 browsers at the same time, (for example in a same computer). From each browser I can download a part of the file but not the complete file. It seems the browsers are sharing the bandwidth and when it starts to download a file the other stops. from IE there is some limitation that you can only open 2 concurrent connections to one domain. Thanks - Rajeev - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com http://us.rd.yahoo.com/mail/es/tagline/messenger/*http://es.voice.yahoo.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need help running tomcat 5.5.9 on Windows Server 2003 64bit
The current tomcat binaries are all win32. I need help in getting a binary (tomcat.exe and tomcatw.exe) that will run on Windows 2003 - 64bit. I currently use tomcat 5.5.9 on Windows Server 2003 32bit. I am trying to migrate to Windows Server 2003 64bit running on the Intel EM64T processor. Any help would be greatly appreciated. Mike [EMAIL PROTECTED] 914-993-2582 - The information contained in this transmission may be privileged and confidential and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions. If you, as the intended recipient of this message, the purpose of which is to inform and update our clients, prospects and consultants of developments relating to our services and products, would not like to receive further e-mail correspondence from the sender, please reply to the sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New York, NY 10105.
Re: Need help running tomcat 5.5.9 on Windows Server 2003 64bit
errm, there are tomcat binaries Tomcat is pure java, so tomcat binaries should be jars fully unaware of your architecture (which is than covered by the selection of the proper jdk). leon On 6/20/06, Bauer, Michael E [EMAIL PROTECTED] wrote: The current tomcat binaries are all win32. I need help in getting a binary (tomcat.exe and tomcatw.exe) that will run on Windows 2003 - 64bit. I currently use tomcat 5.5.9 on Windows Server 2003 32bit. I am trying to migrate to Windows Server 2003 64bit running on the Intel EM64T processor. Any help would be greatly appreciated. Mike [EMAIL PROTECTED] 914-993-2582 - The information contained in this transmission may be privileged and confidential and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions. If you, as the intended recipient of this message, the purpose of which is to inform and update our clients, prospects and consultants of developments relating to our services and products, would not like to receive further e-mail correspondence from the sender, please reply to the sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New York, NY 10105. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Yet Another Clustering Problem
Shades of embarrassment. Our server clocks weren't sync'd. It all works, just like it says it ought to. Which was nice. Pid wrote: We're running the following: Apache2.2 + Tomcat5.5.17 mod_proxy, mod_proxy_ajp, mod_proxy_balancer on 2 linux boxes (one of which has a DB) Server #1 has the DB the 2nd Tomcat. Server #2 is the main Apache load balancer, with 1st Tomcat. There are virtualhosts/subdomains in both apache tomcat. The configs are largely as recommended in the docs. E.g. mod_proxy ProxyPass / balancer://mycluster/ \ maxattempts=1 lbmethod=bytraffic stickysession=JSESSIONID I've tried various Tomcat cluster variations, as in the docs (which contain far too many options for a noob like me to get my head round) and have had limited success. The logs appear to indicate that the nodes are talking to each other, under most of the variations. At this point I've got Cluster defined inside each Host, the variations don't seem to make much difference even a single default SimpleTcpCluster works/produces the same effect as one of the extended configs. I'd rather use a single Cluster definition before the Hosts, if possible. The problem is that if I force* Apache2 Tomcat1 MySQL1, I get: Cannot create JDBC driver of class '' for connect URL 'null' java.sql.SQLException: No suitable driver But! Apache2 Tomcat2 MySQL1 is fine. Also, routing to either Tomcat from Apache1 is fine: Apache1 Tomcat2 MySQL1 Apache1 Tomcat1 MySQL1 Which would suggest it's not the Tomcat JNDI DB config. (There's a single Global Datasource, referenced in each context.) We want Apache2 Tomcat2 to soak up most of the load, and give #1 over to the DB some overspill, via the proxy/ajp/balancer config. Failover such would be preferable. The webapps in each virtual host are identical, as I've tarred, gzipped ftp'd them over from one to the other. Any help would be appreciated. Pid *I'm forcing Apache to select each Tomcat by commenting out the others in the balancer config. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem to download a file from 2 browsers at the time
Better u give the link to file and enter the mime type mime-mapping extensionxls/extension mime-typeapplication/vnd.ms-excel/mime-type /mime-mapping In catlina home\conf\web.xml and Restart the server Hope this will work On 6/20/06, Rajeev N. Jha [EMAIL PROTECTED] wrote: Look at the code, look at the loops, You are trying to download some 105 MB files !!! nombre is like 15 bytes at least (a) either you wait for a real long time (b) or you set the content-length in advance (c) or better still try with small numbers for (int l=0;l30;l++){ for (int k=0;k25;k++){ HTH - Rajeev. password password wrote: I have tried in others browsers and the result is the same. The files are download but incomplets. And while the JSP continues executing the code, a don't understand. */Rajeev N. Jha [EMAIL PROTECTED]/* escribió: password password wrote: I have this JSP that download an excel file. It works fine if I use only one browser at the same time. The problem is when I try to do this but from 2 browsers at the same time, (for example in a same computer). From each browser I can download a part of the file but not the complete file. It seems the browsers are sharing the bandwidth and when it starts to download a file the other stops. from IE there is some limitation that you can only open 2 concurrent connections to one domain. Thanks - Rajeev - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com http://us.rd.yahoo.com/mail/es/tagline/messenger/*http://es.voice.yahoo.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mir Kasim Ali
Re: Problem to download a file from 2 browsers at the time
Better u give the link to file and enter the mime type mime-mapping extensionxls/extension mime-typeapplication/vnd.ms-excel/mime-type /mime-mapping In catlina home\conf\web.xml and Restart the server Hope this will work On 6/20/06, password password [EMAIL PROTECTED] wrote: I have this JSP that download an excel file. It works fine if I use only one browser at the same time. The problem is when I try to do this but from 2 browsers at the same time, (for example in a same computer). From each browser I can download a part of the file but not the complete file. It seems the browsers are sharing the bandwidth and when it starts to download a file the other stops. I have look the logs, and I saw the file has downloaded to the computer and while the jsp is working. I don't undestand why the file has finished to download and while the jsp is still executing. Can you help me please? do anybody try this JSP and tell me if the result is the same as me? Why is it happening this? --JSP ---shy; [EMAIL PROTECTED] contentType=application/vnd.ms-excel% %@ page language=java import=java.io.*% %@ page language=java import=java.util.*% % Date fecha = new Date(); java.sql.Date fechaSQL = new java.sql.Date(fecha.getTime()); Calendar calendario = Calendar.getInstance(); calendario.setTime(fecha); // fecha es el Date de antes. String strHour = String.valueOf( calendario.get(Calendar.HOUR) ); String strMinute = String.valueOf( calendario.get(Calendar.MINUTE) ); String strSecond = String.valueOf( calendario.get(Calendar.SECOND) ); String nombre = FILE + strHour + strMinute + strSecond + .xls; System.out.println( IN OF + nombre ); response.setContentType( application/x-download ); response.setHeader(Content-type,application/vnd.ms-excel); response.setHeader(Content-Disposition,attachment; filename=\ + nombre + \); System.out.println( nombre +START ); for (int l=0;l3;l++){ System.out.println( nombre ++ l ); for (int k=0;k250;k++){ out.write(nombre + : (+ l + , + k + ) + \t ); } out.write(\n); } System.out.println( nombre + END ); % - LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com -- Mir Kasim Ali
file upload speed.
Hi, I'm using Tomcat 5.5.15 to transfer files. I get a throughput of roughly 20% on 100Mbps LAN whereas the download throughput is 95% approx. How can I make the uploads faster ? Thanks, Aman. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4953136 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pdf documents
Those files are in a proprietary format..you'll need to go to adobe and get the PDF plugin/viewer for display- M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Suba Suresh [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, June 19, 2006 10:28 PM Subject: Re: pdf documents I have the same problem as Bob but files mapping into different file systems. I also tried the context mapping as you (Mark)had suggested with app.xml file. I will read about the link config tomorrow and try it. Any help would be appreciated. thanks, suba suresh. Bob Wyatt wrote: Mark, No... Didn't know about it... Now that I know about it (Thank You), I'm not sure of what really needs to be done... No where under $CATALINA_HOME do I have a defaultcontext.xml, context.xml, or similarly named file. All of my similarly named files are *.html files or directories, as follows: #pwd /usr/local/jakarta-tomcat-5 # find . -name \*context\* -print ./server/webapps/admin/context ./server/webapps/admin/defaultcontext ./webapps/tomcat-docs/config/printer/context.html ./webapps/tomcat-docs/config/printer/defaultcontext.html ./webapps/tomcat-docs/config/context.html ./webapps/tomcat-docs/config/defaultcontext.html ./webapps/wade2/scripts/contextmenu.css So I'm not sure what to do - any advice? Regards, Bob -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 21:13 To: Tomcat Users List Subject: Re: pdf documents Bob Wyatt wrote: I have a directory that contains hundreds of pdf files. I have Tomcat 5.0.28 running on AIX 5.2. Under the webapps/appname directory, if I create a symbolic link to the pdf files, they will not display. Have you enabled linking? See the allowLinking property at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File system inaccessible to application running under Tomcat
Stephen Gray wrote: I'm assuming that there is come configuration option that causes Tomcat not to be able to see the local file system but I can't think what it might be - I'm not starting Tomcat with a security manager. When running as a service, tomcat runs under the local system user by default. This user has no privileges to access network resources either through UNC paths or mapped drives. Running from the command line, Tomcat runs as the user currently logged on and therefore has access to the whatever that user has access to including mapped drives. Note that if you change the service to run as a domain user, it still won't have access to mapped drives but it will have access to network resources via UNC paths. HTH, Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem to download a file from 2 browsers at the time
Hi, Yes I have tried with small numbers and the result is the same. I see you have tried because you know how many MB have the files. If you has tried, do you have this problem that the files are incompletes? - LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com
Activating a batch file when Tomcat service is started
Hi, How can I make a batch file activated when the Tomcat service is (re)started? thanks, --Amir.
Re: Tomcat 5.5.17 APR/SSL Client Certificat
The authorty who issues the certificate has to be authorized(imported) in the browser. Then the certificate has to be imported into the browser. The server's host name must match the host name in its certificate. Then the client's host name must match the host name in its certifcate. Do not forget add a user in tomcat-user.xml Please search postings of Gael and Frank on SSL for more instrution. I will poste it on https://breakevilaxis.org later. Frank Peng. -Original Message- From: Gaël Lams [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tue, 20 Jun 2006 08:43:53 +0200 Subject: Re: Tomcat 5.5.17 APR/SSL Client Certificat Hi, I cannot obtain client certificate with SSL/client certificate authentication using APR components ... It's probably a stupid question, but did you generate the client certificate and did you import in the browser from which you are trying to connect to your application? How did you create it? You made no reference to that part Regards, Gaël
Invalidate SSL-session
I am using Tomcat 5.5 in combination with a HTTP-connector that is configured with TLS and client-authentication. Users log in to my web application with a client certificate from a smartcard. When users try to log out, the HTTP-session is invalidated but the SSL-session key remains valid for quite a while, enabling users to simply go back to the application even after they have removed the smartcard. I have looked for a way to invalidate the SSL-session when a user logs off but nothing seems to work. The SSL session key is availllable in the request (javax.servlet.request.ssl_session) but I can't find a way to access the corresponding SSL-session programatically. The SSLSessionContext has a method to get a particular session based on the session-id, but that doesn't seem work. Is there some other way to invalidate the SSL-session from my web application? Gert-Jan _ Eindeloos zoeken naar dat ene document is nu voorbij! http://desktop.msn.nl - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem to download a file from 2 browsers at the time
Just ran it out of curiosity here on a tomcat 5.5.17, works perfectly. Only noticeable thing is that the first file get slowed down when you start second file, but it's quite to be excpected. Measured speed: 6M/s, files are not mixed together One thing worth noticing, is that brtowser do this here - get the header telling 'content type and save to disk' - show the save as dialog prompt - request again file from server This result in file being generated twice and the fact fileX.xls has content of fileYY.xls password password wrote: I have this JSP that download an excel file. It works fine if I use only one browser at the same time. The problem is when I try to do this but from 2 browsers at the same time, (for example in a same computer). From each browser I can download a part of the file but not the complete file. It seems the browsers are sharing the bandwidth and when it starts to download a file the other stops. I have look the logs, and I saw the file has downloaded to the computer and while the jsp is working. I don't undestand why the file has finished to download and while the jsp is still executing. Can you help me please? do anybody try this JSP and tell me if the result is the same as me? Why is it happening this? --JSP ---shy; [EMAIL PROTECTED] contentType=application/vnd.ms-excel% %@ page language=java import=java.io.*% %@ page language=java import=java.util.*% % Date fecha = new Date(); java.sql.Date fechaSQL = new java.sql.Date(fecha.getTime()); Calendar calendario = Calendar.getInstance(); calendario.setTime(fecha); // fecha es el Date de antes. String strHour = String.valueOf( calendario.get(Calendar.HOUR) ); String strMinute = String.valueOf( calendario.get(Calendar.MINUTE) ); String strSecond = String.valueOf( calendario.get(Calendar.SECOND) ); String nombre = FILE + strHour + strMinute + strSecond + .xls; System.out.println( IN OF + nombre ); response.setContentType( application/x-download ); response.setHeader(Content-type,application/vnd.ms-excel); response.setHeader(Content-Disposition,attachment; filename=\ + nombre + \); System.out.println( nombre +START ); for (int l=0;l3;l++){ System.out.println( nombre ++ l ); for (int k=0;k250;k++){ out.write(nombre + : (+ l + , + k + ) + \t ); } out.write(\n); } System.out.println( nombre + END ); % - LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why has Tomcat Undeployed my Applications?
Hi I am running Tomcat 5.5 and Tapestry on windows. I store my eclipse workspaces and the application files on another server (Linux). I deploy my xml configuration files in: C:\Tomcat\conf\Catalina\localhost When the Linux server was rebooted, Tomcat subsequently undeployed all my applications, is there a reason for this? I am a bit lost, and no expert using Tomcat.does Tomcat backup the files anywhere? They are no longer in the directory. Any help would be much appreciated! Thanks Peter
Re: Problem to download a file from 2 browsers at the time
I think is the version of Tomcat. I have tried with other version (5.5.9) and it is working. My actual version of Tomcat is 5.5.4, I thing it is problem. Or something the configuration in the tomcat: time, number of conexions,... - LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com
Re: file upload speed.
CMSuser ha scritto: Hi, I'm using Tomcat 5.5.15 to transfer files. I get a throughput of roughly 20% on 100Mbps LAN whereas the download throughput is 95% approx. How can I make the uploads faster ? Just a thought, though you are in a LAN, is the server in an ADSL? If yes, you know what the A in ADSL means right? ;-) Ciao Antonio - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why has Tomcat Undeployed my Applications?
Peter Stavrinides ha scritto: I deploy my xml configuration files in: C:\Tomcat\conf\Catalina\localhost Why here? Your context information should be put either in the server.xml file or in webapp-root/META-INF/context.xml The directory that you used is temporary, AFAIK. HTH Antonio - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why has Tomcat Undeployed my Applications?
On 6/20/06, Antonio Petrelli [EMAIL PROTECTED] wrote: Why here? Your context information should be put either in the server.xml file or in webapp-root/META-INF/context.xml The directory that you used is temporary, AFAIK. Utterly wrong; please read the doc -- http://tomcat.apache.org/tomcat-5.5-doc/config/context.html -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pdf documents
For the client side, sure. I already know it works if I copy the pdf file under my tomcat application... I just don't want to move hundreds of files there... Regards, Bob -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 07:30 To: Tomcat Users List Subject: Re: pdf documents Those files are in a proprietary format..you'll need to go to adobe and get the PDF plugin/viewer for display- M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Suba Suresh [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, June 19, 2006 10:28 PM Subject: Re: pdf documents I have the same problem as Bob but files mapping into different file systems. I also tried the context mapping as you (Mark)had suggested with app.xml file. I will read about the link config tomorrow and try it. Any help would be appreciated. thanks, suba suresh. Bob Wyatt wrote: Mark, No... Didn't know about it... Now that I know about it (Thank You), I'm not sure of what really needs to be done... No where under $CATALINA_HOME do I have a defaultcontext.xml, context.xml, or similarly named file. All of my similarly named files are *.html files or directories, as follows: #pwd /usr/local/jakarta-tomcat-5 # find . -name \*context\* -print ./server/webapps/admin/context ./server/webapps/admin/defaultcontext ./webapps/tomcat-docs/config/printer/context.html ./webapps/tomcat-docs/config/printer/defaultcontext.html ./webapps/tomcat-docs/config/context.html ./webapps/tomcat-docs/config/defaultcontext.html ./webapps/wade2/scripts/contextmenu.css So I'm not sure what to do - any advice? Regards, Bob -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 21:13 To: Tomcat Users List Subject: Re: pdf documents Bob Wyatt wrote: I have a directory that contains hundreds of pdf files. I have Tomcat 5.0.28 running on AIX 5.2. Under the webapps/appname directory, if I create a symbolic link to the pdf files, they will not display. Have you enabled linking? See the allowLinking property at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pdf documents
I would recommend a servlet that streams the files from some configured absolute path(s) to the client. It's reasonably simple and allows you some degree of control over what is delivered. Map the servlet to *.pdf in your web.xml to make it respond to all requests for pdfs. --David Bob Wyatt wrote: For the client side, sure. I already know it works if I copy the pdf file under my tomcat application... I just don't want to move hundreds of files there... Regards, Bob -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 07:30 To: Tomcat Users List Subject: Re: pdf documents Those files are in a proprietary format..you'll need to go to adobe and get the PDF plugin/viewer for display- M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Suba Suresh [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, June 19, 2006 10:28 PM Subject: Re: pdf documents I have the same problem as Bob but files mapping into different file systems. I also tried the context mapping as you (Mark)had suggested with app.xml file. I will read about the link config tomorrow and try it. Any help would be appreciated. thanks, suba suresh. Bob Wyatt wrote: Mark, No... Didn't know about it... Now that I know about it (Thank You), I'm not sure of what really needs to be done... No where under $CATALINA_HOME do I have a defaultcontext.xml, context.xml, or similarly named file. All of my similarly named files are *.html files or directories, as follows: #pwd /usr/local/jakarta-tomcat-5 # find . -name \*context\* -print ./server/webapps/admin/context ./server/webapps/admin/defaultcontext ./webapps/tomcat-docs/config/printer/context.html ./webapps/tomcat-docs/config/printer/defaultcontext.html ./webapps/tomcat-docs/config/context.html ./webapps/tomcat-docs/config/defaultcontext.html ./webapps/wade2/scripts/contextmenu.css So I'm not sure what to do - any advice? Regards, Bob -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 21:13 To: Tomcat Users List Subject: Re: pdf documents Bob Wyatt wrote: I have a directory that contains hundreds of pdf files. I have Tomcat 5.0.28 running on AIX 5.2. Under the webapps/appname directory, if I create a symbolic link to the pdf files, they will not display. Have you enabled linking? See the allowLinking property at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pdf documents
David, Thanks for the reply... This is over my head... is there a guide to learn to do this, or do you perhaps have one that you would be willing to share? I'm very, very new to this whole thing, and I know very little (next to nothing) about the innards of all of this... Regards, Bob -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 09:48 To: Tomcat Users List Subject: Re: pdf documents I would recommend a servlet that streams the files from some configured absolute path(s) to the client. It's reasonably simple and allows you some degree of control over what is delivered. Map the servlet to *.pdf in your web.xml to make it respond to all requests for pdfs. --David Bob Wyatt wrote: For the client side, sure. I already know it works if I copy the pdf file under my tomcat application... I just don't want to move hundreds of files there... Regards, Bob -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 07:30 To: Tomcat Users List Subject: Re: pdf documents Those files are in a proprietary format..you'll need to go to adobe and get the PDF plugin/viewer for display- M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Suba Suresh [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, June 19, 2006 10:28 PM Subject: Re: pdf documents I have the same problem as Bob but files mapping into different file systems. I also tried the context mapping as you (Mark)had suggested with app.xml file. I will read about the link config tomorrow and try it. Any help would be appreciated. thanks, suba suresh. Bob Wyatt wrote: Mark, No... Didn't know about it... Now that I know about it (Thank You), I'm not sure of what really needs to be done... No where under $CATALINA_HOME do I have a defaultcontext.xml, context.xml, or similarly named file. All of my similarly named files are *.html files or directories, as follows: #pwd /usr/local/jakarta-tomcat-5 # find . -name \*context\* -print ./server/webapps/admin/context ./server/webapps/admin/defaultcontext ./webapps/tomcat-docs/config/printer/context.html ./webapps/tomcat-docs/config/printer/defaultcontext.html ./webapps/tomcat-docs/config/context.html ./webapps/tomcat-docs/config/defaultcontext.html ./webapps/wade2/scripts/contextmenu.css So I'm not sure what to do - any advice? Regards, Bob -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 21:13 To: Tomcat Users List Subject: Re: pdf documents Bob Wyatt wrote: I have a directory that contains hundreds of pdf files. I have Tomcat 5.0.28 running on AIX 5.2. Under the webapps/appname directory, if I create a symbolic link to the pdf files, they will not display. Have you enabled linking? See the allowLinking property at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pdf documents
I am in the same boat as Bob. I already have a servlet displaying the filenames to select from. My servlet is mapped to a different name in web.xml file. How should I proceed. Should I have another new servlet? What about for different file formats. Should it also be mapped? thanks, suba suresh. David Smith wrote: I would recommend a servlet that streams the files from some configured absolute path(s) to the client. It's reasonably simple and allows you some degree of control over what is delivered. Map the servlet to *.pdf in your web.xml to make it respond to all requests for pdfs. --David Bob Wyatt wrote: For the client side, sure. I already know it works if I copy the pdf file under my tomcat application... I just don't want to move hundreds of files there... Regards, Bob -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 07:30 To: Tomcat Users List Subject: Re: pdf documents Those files are in a proprietary format..you'll need to go to adobe and get the PDF plugin/viewer for display- M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Suba Suresh [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, June 19, 2006 10:28 PM Subject: Re: pdf documents I have the same problem as Bob but files mapping into different file systems. I also tried the context mapping as you (Mark)had suggested with app.xml file. I will read about the link config tomorrow and try it. Any help would be appreciated. thanks, suba suresh. Bob Wyatt wrote: Mark, No... Didn't know about it... Now that I know about it (Thank You), I'm not sure of what really needs to be done... No where under $CATALINA_HOME do I have a defaultcontext.xml, context.xml, or similarly named file. All of my similarly named files are *.html files or directories, as follows: #pwd /usr/local/jakarta-tomcat-5 # find . -name \*context\* -print ./server/webapps/admin/context ./server/webapps/admin/defaultcontext ./webapps/tomcat-docs/config/printer/context.html ./webapps/tomcat-docs/config/printer/defaultcontext.html ./webapps/tomcat-docs/config/context.html ./webapps/tomcat-docs/config/defaultcontext.html ./webapps/wade2/scripts/contextmenu.css So I'm not sure what to do - any advice? Regards, Bob -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 21:13 To: Tomcat Users List Subject: Re: pdf documents Bob Wyatt wrote: I have a directory that contains hundreds of pdf files. I have Tomcat 5.0.28 running on AIX 5.2. Under the webapps/appname directory, if I create a symbolic link to the pdf files, they will not display. Have you enabled linking? See the allowLinking property at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why has Tomcat Undeployed my Applications?
Hi Antonio Thanks very much for your help what you have said makes perfect sense. I will try it! Thanks Peter -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: 20 June 2006 16:11 To: Tomcat Users List Subject: Re: Why has Tomcat Undeployed my Applications? Peter Stavrinides ha scritto: I deploy my xml configuration files in: C:\Tomcat\conf\Catalina\localhost Why here? Your context information should be put either in the server.xml file or in webapp-root/META-INF/context.xml The directory that you used is temporary, AFAIK. HTH Antonio - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat's scalability
We had an application (with connection pooling and validation query) running on TC5.0.28 (now on TC5.5.17) connecting to MS SQL Server using the Microsoft JDBC drivers. When tomcat and the database were on the same side of the firewall performance was great (averaged 20ms obtaining connection and 2-3s running SELECT queries). (Yes, I actually put tracing into the code that timed how long it took to acquire the connection, run the query, and transmit the data back to the client.) Once we moved the tomcat server outside the firewall (an the SQL Server stayed inside), the performance degraded horribly (7-10s to obtain connection, 15-20s to run the simple queries (select by primary key), 30s to run the more 'complex' queries, for example SELECT id, name, description FROM single_table WHERE name LIKE '%a%';). As a test, I changed the database to PostgreSQL v8.0 (at that time it was still in beta), changed the driver, and ported the database (dropped all indices except primary key and foreign keys), the query results were dramatically different: 500ms on any query I tried. I had 2 instanced of my app on the tomcat server, one using PostgreSQL, the other using MS SQL Server. A member of the Network Team sat with me and opened both ports (1433 and 5432) to the database machine. I even reconfigured PostgreSQL to use the same port as SQL Server, restarted tomcat, ran a set of queries using one DB then the other (shutting the first down, obviously). The timing was still as dramatically different as running on 2 different ports. I know there may have been configuration issues with the firewall that impeded the performance, but, unfortunately, that (the firewall configuration) was beyond my control. Basically, be warned: if you are running your connection to MS SQL Server (and using the Microsoft JDBC drivers) through a firewall, this MAY be one contributing factor of your poor performance. Just my $0.02. Gord -Original Message- From: Alex Turner [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 12:42 AM To: Tomcat Users List Subject: Re: Tomcat's scalability On 6/19/06, Leon Rosenberg [EMAIL PROTECTED] wrote: On 6/19/06, Biernatowski Bartosz J [EMAIL PROTECTED] wrote: I am about 90% sure the bottleneck is Tomcat or what's running on top of Tomcat. Application uses JDBC queries to MS SQL server Chips are Intel Xeon. My monitoring data: Memory utilization under 30%, CPU under 10%. Using hardcore performance tools and systematic approach. The bottom line is that Tomcat/my application combo don't seem to handle more than a certain number of users. All I want to do is to up the # of users by 3. Sounds like your db connection pool is the problem. Maybe you should check whether you have enough connections in the connection pool. Connection pooling, ahh yes. This is also a likely problem if you aren't doing any. So far it sounds that the approach of adding separate instance of Tomcat and using round robin is better than adding a separate JVM. I think both options are equal. How do you plan to run a separate tomcat in the same JVM? Both options are equaly stupid. Putting multiple intances of tomcat on a single box is pretty worthless unless you have serious application problems. Tomcat is multi-threaded, and will by nature utilize a multi-CPU setup. If you ask me (and hey, we have thousands of concurrent users and a lot more requests) you need a monitoring tool for your application inside your application not just vmstat or top. You need to know which servlet/action/whatever your presentation layer is takes the time and trace it down in the persistence. Everything else is just kindergarten :-) BJ Biernatowski Application Developer, e-Business Leon -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 10:49 AM To: Tomcat Users List Subject: Re: Tomcat's scalability are you sure that tomcat is your bottleneck? Your 4 CPU machine (which cpu's btw?) should be able to handle more than 1000 users (unless you are speaking about suns cpu) without problems. Maybe you should provide more info about your application. Do you have any monitoring data? Leon On 6/19/06, Biernatowski Bartosz J [EMAIL PROTECTED] wrote: Hello, I was hoping somebody on the list might point me in the right direction... I am trying to scale up Tomcat based web application currently supporting ~100 users to 350 users. It seems that I have enough hardware: 2 load balanced servers x 4 CPUs each with 4 GB of RAM which is underutilized for most of the time even though application performance slows dramatically at peak times. I was advised to install multiple JVMs in order to improve Tomcat's performance. Another option I considered was to install 2 instances of Tomcat on each server to see whether it would handle increased load.
Re: pdf documents
I can put something together, but not until tonight -- it'll take too long to do at work. In the meantime, feel free to google. This is such a simple item I'm sure someone has done it before and posted their experiences. --David Suba Suresh wrote: I am in the same boat as Bob. I already have a servlet displaying the filenames to select from. My servlet is mapped to a different name in web.xml file. How should I proceed. Should I have another new servlet? What about for different file formats. Should it also be mapped? thanks, suba suresh. David Smith wrote: I would recommend a servlet that streams the files from some configured absolute path(s) to the client. It's reasonably simple and allows you some degree of control over what is delivered. Map the servlet to *.pdf in your web.xml to make it respond to all requests for pdfs. --David Bob Wyatt wrote: For the client side, sure. I already know it works if I copy the pdf file under my tomcat application... I just don't want to move hundreds of files there... Regards, Bob -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 07:30 To: Tomcat Users List Subject: Re: pdf documents Those files are in a proprietary format..you'll need to go to adobe and get the PDF plugin/viewer for display- M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Suba Suresh [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, June 19, 2006 10:28 PM Subject: Re: pdf documents I have the same problem as Bob but files mapping into different file systems. I also tried the context mapping as you (Mark)had suggested with app.xml file. I will read about the link config tomorrow and try it. Any help would be appreciated. thanks, suba suresh. Bob Wyatt wrote: Mark, No... Didn't know about it... Now that I know about it (Thank You), I'm not sure of what really needs to be done... No where under $CATALINA_HOME do I have a defaultcontext.xml, context.xml, or similarly named file. All of my similarly named files are *.html files or directories, as follows: #pwd /usr/local/jakarta-tomcat-5 # find . -name \*context\* -print ./server/webapps/admin/context ./server/webapps/admin/defaultcontext ./webapps/tomcat-docs/config/printer/context.html ./webapps/tomcat-docs/config/printer/defaultcontext.html ./webapps/tomcat-docs/config/context.html ./webapps/tomcat-docs/config/defaultcontext.html ./webapps/wade2/scripts/contextmenu.css So I'm not sure what to do - any advice? Regards, Bob -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 21:13 To: Tomcat Users List Subject: Re: pdf documents Bob Wyatt wrote: I have a directory that contains hundreds of pdf files. I have Tomcat 5.0.28 running on AIX 5.2. Under the webapps/appname directory, if I create a symbolic link to the pdf files, they will not display. Have you enabled linking? See the allowLinking property at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat java processes eat processor.
Not sure what you mean. I can recompile and deploy the code with no problems. So, probably... Leon Rosenberg wrote: On 6/19/06, Rick Cockerham [EMAIL PROTECTED] wrote: I wish it would give me a stack trace. That would be wonderful. The part I left out was just a list of all the loaded libraries. I can't risk a switch in software. I realize this is a tough one. I have very little flexibility to help me debug. That's why I'm asking you guys! Are you allowed to add a new filter? If yes I have a solution for you :-) Thanks, Rick Leon Rosenberg wrote: On 6/19/06, Rick Cockerham [EMAIL PROTECTED] wrote: OK. I finally got a file dumped out from this kill. But, it doesn't look interesting to me. Any idea what this means to me? Any other debug ideas? a) paste complete stack trace b) try a regular vm (suns for example) regards Leon Thanks, Rick Unexpected Signal : 3 occurred at PC=0x45C6D876 Function=(null)+0x45C6D876 Library=/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/server/libjvm.so NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Dynamic libraries: 08048000-08057000 r-xp 08:03 815431 /opt/blackdown-jdk-1.4.2.01/bin/java ... ...etc. Heap at VM Abort: Heap PSYoungGen total 102400K, used 84863K [0x4a17, 0x5377, 0x5377) eden [0x4a17,0x4d1702f8,0x4d37) from [0x4d37,0x4f64fc38,0x5057) to [0x5057,0x5057,0x5377) PSOldGentotal 256000K, used 215274K [0x5377, 0x6317, 0x6317) object [0x5377,0x609aa8c0,0x6317) PSPermGen total 16384K, used 16250K [0x6317, 0x6417, 0x6717) object [0x6317,0x6414e9f0,0x6417) Local Time = Mon Jun 19 09:27:56 2006 Peter Crowther wrote: From: Rick Cockerham [mailto:[EMAIL PROTECTED] Didn't work. -3 doesn't kill it. No. It produces a thread dump, and the process carries on going. Given that you were complaining about not wanting to restart Tomcat twice daily, I thought you'd appreciate a non-fatal solution :-). - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rick Cockerham Pocket Knife Software, Inc. http://www.pocketknifesoftware.com 512-249-0467 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rick Cockerham Pocket Knife Software, Inc. http://www.pocketknifesoftware.com 512-249-0467 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rick Cockerham Pocket Knife Software, Inc. http://www.pocketknifesoftware.com 512-249-0467 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mod_jk/firewall configuration problems
I am having a problem with mod_jk.so. I have apache set up as my web server, forwarding my jsp traffic to a tomcat server running on the same machine. This setup works fine when the client is inside of my firewall. However, when I try to access my site from outside the firewall, mod_jk does not forward the traffic to tomcat and the page is not displayed. My firewall is set up to forward port 80 traffic from outside to my web server machine. This is working, as I can get non-tomcat served pages to appear on clients outside of the firewall. I have attached the debugging log from mod_jk. In it you can see two requests the first is from outside (which fails), while the second is from inside and you can see that it is served correctly. Im sure this is some sort of configuration issue. But I dont know what. Can anyone point out what is wrong? Thanks, -- Greg - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat java processes eat processor.
look at this: http://moskito.anotheria.net/moskitodemo/mui/mskShowAllProducers RequestURIFilter is probably what you want you can install this monitoring application by simply adding a filter entry to your web.xml. This way you'll see which requests are currently executed and which uris lasting how long. It might give you a hint what's hanging. Leon On 6/20/06, Rick Cockerham [EMAIL PROTECTED] wrote: Not sure what you mean. I can recompile and deploy the code with no problems. So, probably... Leon Rosenberg wrote: On 6/19/06, Rick Cockerham [EMAIL PROTECTED] wrote: I wish it would give me a stack trace. That would be wonderful. The part I left out was just a list of all the loaded libraries. I can't risk a switch in software. I realize this is a tough one. I have very little flexibility to help me debug. That's why I'm asking you guys! Are you allowed to add a new filter? If yes I have a solution for you :-) Thanks, Rick Leon Rosenberg wrote: On 6/19/06, Rick Cockerham [EMAIL PROTECTED] wrote: OK. I finally got a file dumped out from this kill. But, it doesn't look interesting to me. Any idea what this means to me? Any other debug ideas? a) paste complete stack trace b) try a regular vm (suns for example) regards Leon Thanks, Rick Unexpected Signal : 3 occurred at PC=0x45C6D876 Function=(null)+0x45C6D876 Library=/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/server/libjvm.so NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Dynamic libraries: 08048000-08057000 r-xp 08:03 815431 /opt/blackdown-jdk-1.4.2.01/bin/java ... ...etc. Heap at VM Abort: Heap PSYoungGen total 102400K, used 84863K [0x4a17, 0x5377, 0x5377) eden [0x4a17,0x4d1702f8,0x4d37) from [0x4d37,0x4f64fc38,0x5057) to [0x5057,0x5057,0x5377) PSOldGentotal 256000K, used 215274K [0x5377, 0x6317, 0x6317) object [0x5377,0x609aa8c0,0x6317) PSPermGen total 16384K, used 16250K [0x6317, 0x6417, 0x6717) object [0x6317,0x6414e9f0,0x6417) Local Time = Mon Jun 19 09:27:56 2006 Peter Crowther wrote: From: Rick Cockerham [mailto:[EMAIL PROTECTED] Didn't work. -3 doesn't kill it. No. It produces a thread dump, and the process carries on going. Given that you were complaining about not wanting to restart Tomcat twice daily, I thought you'd appreciate a non-fatal solution :-). - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rick Cockerham Pocket Knife Software, Inc. http://www.pocketknifesoftware.com 512-249-0467 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rick Cockerham Pocket Knife Software, Inc. http://www.pocketknifesoftware.com 512-249-0467 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rick Cockerham Pocket Knife Software, Inc. http://www.pocketknifesoftware.com 512-249-0467 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pdf documents
I will try googling. I have been struggling with it for sometime even playing with context.xml file. thanks, suba suresh. David Smith wrote: I can put something together, but not until tonight -- it'll take too long to do at work. In the meantime, feel free to google. This is such a simple item I'm sure someone has done it before and posted their experiences. --David Suba Suresh wrote: I am in the same boat as Bob. I already have a servlet displaying the filenames to select from. My servlet is mapped to a different name in web.xml file. How should I proceed. Should I have another new servlet? What about for different file formats. Should it also be mapped? thanks, suba suresh. David Smith wrote: I would recommend a servlet that streams the files from some configured absolute path(s) to the client. It's reasonably simple and allows you some degree of control over what is delivered. Map the servlet to *.pdf in your web.xml to make it respond to all requests for pdfs. --David Bob Wyatt wrote: For the client side, sure. I already know it works if I copy the pdf file under my tomcat application... I just don't want to move hundreds of files there... Regards, Bob -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 07:30 To: Tomcat Users List Subject: Re: pdf documents Those files are in a proprietary format..you'll need to go to adobe and get the PDF plugin/viewer for display- M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Suba Suresh [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, June 19, 2006 10:28 PM Subject: Re: pdf documents I have the same problem as Bob but files mapping into different file systems. I also tried the context mapping as you (Mark)had suggested with app.xml file. I will read about the link config tomorrow and try it. Any help would be appreciated. thanks, suba suresh. Bob Wyatt wrote: Mark, No... Didn't know about it... Now that I know about it (Thank You), I'm not sure of what really needs to be done... No where under $CATALINA_HOME do I have a defaultcontext.xml, context.xml, or similarly named file. All of my similarly named files are *.html files or directories, as follows: #pwd /usr/local/jakarta-tomcat-5 # find . -name \*context\* -print ./server/webapps/admin/context ./server/webapps/admin/defaultcontext ./webapps/tomcat-docs/config/printer/context.html ./webapps/tomcat-docs/config/printer/defaultcontext.html ./webapps/tomcat-docs/config/context.html ./webapps/tomcat-docs/config/defaultcontext.html ./webapps/wade2/scripts/contextmenu.css So I'm not sure what to do - any advice? Regards, Bob -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 21:13 To: Tomcat Users List Subject: Re: pdf documents Bob Wyatt wrote: I have a directory that contains hundreds of pdf files. I have Tomcat 5.0.28 running on AIX 5.2. Under the webapps/appname directory, if I create a symbolic link to the pdf files, they will not display. Have you enabled linking? See the allowLinking property at http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat creating two threads for one request
Having a similar problem, I would like to know if you have found any solution on this... -- View this message in context: http://www.nabble.com/Tomcat-creating-two-threads-for-one-request-t1743271.html#a4958276 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat's scalability
Be aware that Firewalls are known to drop idle TCP conections after a certain amount of time. We experienced a similar problem with a DB2 JDBC conection pool through a Cisco PIX. What was happening was the conections were closed by the firewall. When they were re-used, there was an added overhead until Java noticed the socket was closed, and the reconected it. We solved it through firewall configuration. Sérgio On 6/20/06, Hyatt, Gordon [EMAIL PROTECTED] wrote: We had an application (with connection pooling and validation query) running on TC5.0.28 (now on TC5.5.17) connecting to MS SQL Server using the Microsoft JDBC drivers. When tomcat and the database were on the same side of the firewall performance was great (averaged 20ms obtaining connection and 2-3s running SELECT queries). (Yes, I actually put tracing into the code that timed how long it took to acquire the connection, run the query, and transmit the data back to the client.) Once we moved the tomcat server outside the firewall (an the SQL Server stayed inside), the performance degraded horribly (7-10s to obtain connection, 15-20s to run the simple queries (select by primary key), 30s to run the more 'complex' queries, for example SELECT id, name, description FROM single_table WHERE name LIKE '%a%';). As a test, I changed the database to PostgreSQL v8.0 (at that time it was still in beta), changed the driver, and ported the database (dropped all indices except primary key and foreign keys), the query results were dramatically different: 500ms on any query I tried. I had 2 instanced of my app on the tomcat server, one using PostgreSQL, the other using MS SQL Server. A member of the Network Team sat with me and opened both ports (1433 and 5432) to the database machine. I even reconfigured PostgreSQL to use the same port as SQL Server, restarted tomcat, ran a set of queries using one DB then the other (shutting the first down, obviously). The timing was still as dramatically different as running on 2 different ports. I know there may have been configuration issues with the firewall that impeded the performance, but, unfortunately, that (the firewall configuration) was beyond my control. Basically, be warned: if you are running your connection to MS SQL Server (and using the Microsoft JDBC drivers) through a firewall, this MAY be one contributing factor of your poor performance. Just my $0.02. Gord -Original Message- From: Alex Turner [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 12:42 AM To: Tomcat Users List Subject: Re: Tomcat's scalability On 6/19/06, Leon Rosenberg [EMAIL PROTECTED] wrote: On 6/19/06, Biernatowski Bartosz J [EMAIL PROTECTED] wrote: I am about 90% sure the bottleneck is Tomcat or what's running on top of Tomcat. Application uses JDBC queries to MS SQL server Chips are Intel Xeon. My monitoring data: Memory utilization under 30%, CPU under 10%. Using hardcore performance tools and systematic approach. The bottom line is that Tomcat/my application combo don't seem to handle more than a certain number of users. All I want to do is to up the # of users by 3. Sounds like your db connection pool is the problem. Maybe you should check whether you have enough connections in the connection pool. Connection pooling, ahh yes. This is also a likely problem if you aren't doing any. So far it sounds that the approach of adding separate instance of Tomcat and using round robin is better than adding a separate JVM. I think both options are equal. How do you plan to run a separate tomcat in the same JVM? Both options are equaly stupid. Putting multiple intances of tomcat on a single box is pretty worthless unless you have serious application problems. Tomcat is multi-threaded, and will by nature utilize a multi-CPU setup. If you ask me (and hey, we have thousands of concurrent users and a lot more requests) you need a monitoring tool for your application inside your application not just vmstat or top. You need to know which servlet/action/whatever your presentation layer is takes the time and trace it down in the persistence. Everything else is just kindergarten :-) BJ Biernatowski Application Developer, e-Business Leon -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 10:49 AM To: Tomcat Users List Subject: Re: Tomcat's scalability are you sure that tomcat is your bottleneck? Your 4 CPU machine (which cpu's btw?) should be able to handle more than 1000 users (unless you are speaking about suns cpu) without problems. Maybe you should provide more info about your application. Do you have any monitoring data? Leon On 6/19/06, Biernatowski Bartosz J [EMAIL PROTECTED] wrote: Hello, I was hoping somebody on the list might point me in the right direction... I am trying to scale up Tomcat based web application currently supporting ~100 users to 350
jsessionid + apache mod_rewrite
Hi, I am using Apache and mod_jk as a front end to my tomcat instance. I wish to map a request parameter that is coming from a client which is specified as sessionid (I have no control over this). Using mod_rewrite I have success mapping sessionid to jsessionid as follows when sessionid appears as the last key value pair; Options +FollowSymlinks RewriteEngine on RewriteCond %{QUERY_STRING} ^(.*)SESSIONID=(.*)$ [NC] RewriteRule ^(.*)$ $1;jsessionid=%2?%1 So when it reaches Tomcat the session bean is available to me, and on the response to the client I write a sessionid response variable that it reads. My question is how to change this test to match the query parameter sessionid so that it doesn't always have to appear as the last key value pair as this is causing me problems. I need to parse ?var1=asessionid=bvar2=c and place the value of sessionid in jsessionid. Any help would be appreciated. Thanks, Norman - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do I pass option to Tomcat on startup only?
I use the following in ${CATALINA_HOME}/conf/setenv.sh: #!/bin/sh if [ $1 = start ] ; then CATALINA_OPTS=$CATALINA_OPTS \ -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=9086 \ -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun.management.jmxremote.authenticate=false echo $0: CATALINA_OPTS = $CATALINA_OPTS fi HTH, Tim -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 10:26 AM To: Tomcat Users List Subject: Re: How do I pass option to Tomcat on startup only? Hello, JAVA_OPTS is an environnement variable, you can set / unset it at will. Just only set it up when you want to start, not when you want to shutdown. Example 1 (using only 1 bash session) export JAVA_OPTS=-Xmanagement bin/startup.sh unset JAVA_OPTS bin/shutdown.sh Example 2 (using 2 different bash sessions) bash1$ export JAVA_OPTS=-Xmanagement bash1$ bin/startup.sh bash2$ bin/shutdown.sh Daniel Serodio wrote: I'm running Tomcat on Linux, and I want to enable the JMX agent (-Xmanagement). If I add -Xmanagement to the JAVA_OPTS variable, this option will be passed to the JVM both on Tomcat startup _and_ shutdown. The problem is that when I try to shutdown Tomcat, the -Xmanagement option is passed to the Shutdown process, which can't listen on the JMX port because Tomcat is already listening. How can I pass the -Xmanagement option to Tomcat startup _only_, and not shutdown too. Thanks in advance, Daniel Serodio - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
UTF-8 headers and JSP included files
I have an app, written in Struts+JSP. Encoding works perfectly, no rpoblem with the special characters/requests/responses. Except for one annoying thing. My JSP pages use includes: [EMAIL PROTECTED] file=../someFile.jsp% Some pages include 3-5 other pages. They are all (top level + included pages) saved as UTF-8, and their content starts with the FFFE sequence. In the rendered content I can see that these FFFE headers are included with the child pages. [FFFE] ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD .. ... body [FFFE] included content1 [FFFE] included content2 With these FFFEs Internet Explorer displays extra line breaks on the top of the page. My content is a perfectly valid XHTML, but with strange FFFE sequences inside. Java files generated by tomcat always start the response content with: out.write(''); also for the included content. I am using the latest Tomcat 5.5 version, Java 1.5, Windows XP. Any hints how to get rid of these extra FFFE chars? My included files need to be UTF-8 encoded. Darek
Tomcat Virtual Hosts
Reading the 2.4 Servlet Spec I found this : --- SRV.3.6 Multiple Hosts and Servlet Contexts Web servers may support multiple logical hosts sharing one IP address on a server. This capability is sometimes referred to as virtual hosting. In this case, each logical host must have its own servlet context or set of servlet contexts. Servlet contexts can not be shared across virtual hosts. - I'm developing a blog which I need to be used by different domains wich according to the specI need tomake the context directory to each domain this is if I use tomcat as a standalone app server is there a way wich with my app working can serve to different domains with apache or will it be the same for apache ?? Thanks ... Leonel - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.17 and Ant
I'm trying to install a webapp in a different base directory other than webapps under the tomcat base, using ant. This worked perfectly under 4.1.31 but under 5.5.17 it wants to dump the application in webapps. What have I forgotten or over looked? The ant build file looks like this: taskdef name=deploy classname=org.apache.catalina.ant.DeployTask/ target name=deploy description=Deploy application to servlet container deploy url=${manager.url} username=${manager.username} password=${manager.password} path=${app.path} war=file://${build.home}/ /target
RE: Tomcat's scalability
I wanted to thank everybody who shared their Tomcat scalability stories/tips with me! Thanks a lot! BJ Biernatowski Application Developer -Original Message- From: Sérgio Costa [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 9:39 AM To: Tomcat Users List Subject: Re: Tomcat's scalability Be aware that Firewalls are known to drop idle TCP conections after a certain amount of time. We experienced a similar problem with a DB2 JDBC conection pool through a Cisco PIX. What was happening was the conections were closed by the firewall. When they were re-used, there was an added overhead until Java noticed the socket was closed, and the reconected it. We solved it through firewall configuration. Sérgio On 6/20/06, Hyatt, Gordon [EMAIL PROTECTED] wrote: We had an application (with connection pooling and validation query) running on TC5.0.28 (now on TC5.5.17) connecting to MS SQL Server using the Microsoft JDBC drivers. When tomcat and the database were on the same side of the firewall performance was great (averaged 20ms obtaining connection and 2-3s running SELECT queries). (Yes, I actually put tracing into the code that timed how long it took to acquire the connection, run the query, and transmit the data back to the client.) Once we moved the tomcat server outside the firewall (an the SQL Server stayed inside), the performance degraded horribly (7-10s to obtain connection, 15-20s to run the simple queries (select by primary key), 30s to run the more 'complex' queries, for example SELECT id, name, description FROM single_table WHERE name LIKE '%a%';). As a test, I changed the database to PostgreSQL v8.0 (at that time it was still in beta), changed the driver, and ported the database (dropped all indices except primary key and foreign keys), the query results were dramatically different: 500ms on any query I tried. I had 2 instanced of my app on the tomcat server, one using PostgreSQL, the other using MS SQL Server. A member of the Network Team sat with me and opened both ports (1433 and 5432) to the database machine. I even reconfigured PostgreSQL to use the same port as SQL Server, restarted tomcat, ran a set of queries using one DB then the other (shutting the first down, obviously). The timing was still as dramatically different as running on 2 different ports. I know there may have been configuration issues with the firewall that impeded the performance, but, unfortunately, that (the firewall configuration) was beyond my control. Basically, be warned: if you are running your connection to MS SQL Server (and using the Microsoft JDBC drivers) through a firewall, this MAY be one contributing factor of your poor performance. Just my $0.02. Gord -Original Message- From: Alex Turner [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 12:42 AM To: Tomcat Users List Subject: Re: Tomcat's scalability On 6/19/06, Leon Rosenberg [EMAIL PROTECTED] wrote: On 6/19/06, Biernatowski Bartosz J [EMAIL PROTECTED] wrote: I am about 90% sure the bottleneck is Tomcat or what's running on top of Tomcat. Application uses JDBC queries to MS SQL server Chips are Intel Xeon. My monitoring data: Memory utilization under 30%, CPU under 10%. Using hardcore performance tools and systematic approach. The bottom line is that Tomcat/my application combo don't seem to handle more than a certain number of users. All I want to do is to up the # of users by 3. Sounds like your db connection pool is the problem. Maybe you should check whether you have enough connections in the connection pool. Connection pooling, ahh yes. This is also a likely problem if you aren't doing any. So far it sounds that the approach of adding separate instance of Tomcat and using round robin is better than adding a separate JVM. I think both options are equal. How do you plan to run a separate tomcat in the same JVM? Both options are equaly stupid. Putting multiple intances of tomcat on a single box is pretty worthless unless you have serious application problems. Tomcat is multi-threaded, and will by nature utilize a multi-CPU setup. If you ask me (and hey, we have thousands of concurrent users and a lot more requests) you need a monitoring tool for your application inside your application not just vmstat or top. You need to know which servlet/action/whatever your presentation layer is takes the time and trace it down in the persistence. Everything else is just kindergarten :-) BJ Biernatowski Application Developer, e-Business Leon -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 10:49 AM To: Tomcat Users List Subject: Re: Tomcat's scalability are you sure that tomcat is your bottleneck? Your 4 CPU machine (which cpu's btw?) should be able to handle more than 1000 users (unless you are
Re: Tomcat's scalability
Leon Rosenberg wrote: Isn't Tomcat and JVM still single threaded? Single thread = single processor usage I don't think it was ever singlethreaded. And if it were, what would the Connector setting in the server.xml mean? Connector port=8580 maxHttpHeaderSize=8192 maxThreads=750 minSpareThreads=25 maxSpareThreads=75 Max number of Java thread, IMHO. Java thread is not the same as operating system thread. In fact, JVM used to be single threaded on Linux and Windows and I'm not quite sure has it changed recently. So, you might have 800 Java threads but it is still one thread on operating system. When you run ps aux | grep java you always see one operating system thread IMHO. It means you don't exploit 4 processors if you have 4. To exploit 4 processors you have to setup 4 JVM (4 tomcat instances) to do round robin. As long as you have 1 JVM active you don't exploit thread level parallelism in operating system. AFAIK -- Mladen Adamovic http://www.online-utility.org http://www.shortopedia.com http://www.froola.com http://www.gift-idea4u.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat's scalability
Darryl Miles wrote: LOL. Each HTTP request/response cycle is handed off to a worker thread, the available worker threads are dynamically increased to cope with the number of the simultaneous HTTP requests being processed in the moment. But isn't it Java threads. I'm speaking of operating system threads. ps aux Biernatowski, Is your HTTP application multi-threaded ? Irrelevant. Unimportant. What is the nature of the application, when you say there is a performance bottleneck how are you measuring it and what is the nature of the workload each request is doing. It is important. Where is your bottleneck? There is a big difference between getting tomcat to serve static content and making your servlet do long running SQL jobs. Or to have i.e. extremely large Lucene database or some other slow algorithm. -- Mladen Adamovic http://www.online-utility.org http://www.shortopedia.com http://www.froola.com http://www.gift-idea4u.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat's scalability
Leon Rosenberg wrote: Teoreticly, your servers should be faster if you configure 4 Tomcat instances (4 JVMs) to do round robin. You should be able to improve performances almost 4x. could you explain why?? I wanted to ask the same question.. forget it. it was wrong. I think I wasn't wrong. One JVM instance is (still) single operating system thread IMHO. At least it was in 1.4.2 on Linux and Windows and I haven't heard they improve it on 1.5.0. Otherwise ps aux should show process java few times. -- Mladen Adamovic http://www.online-utility.org http://www.shortopedia.com http://www.froola.com http://www.gift-idea4u.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Activating a batch file when Tomcat service is started
Amir Weiss wrote: How can I make a batch file activated when the Tomcat service is (re)started? You could make it activated before first web access. use static MyClass = new MyClass() in index.jsp In MyClass constructor use something like: snip Process proces=null; try { proces = Runtime.getRuntime().exec(cmdopt, null, new File(tempDirectory)); } catch (IOException ex) { ex.printStackTrace(); } snip It is rough idea but it should be helpful. -- Mladen Adamovic http://www.online-utility.org http://www.shortopedia.com http://www.froola.com http://www.gift-idea4u.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pdf documents
Bob Wyatt wrote: If I move the pdf to the webapps/appname directory, it will display just fine. I don't want to move the hundreds of pdf files the appname directory. Do the following work? Create webapps/appname/pdf as a symbolic link directory to /whatever/you/want/path/to/pdf ? -- Mladen Adamovic http://www.online-utility.org http://www.shortopedia.com http://www.froola.com http://www.gift-idea4u.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How does Tomcat detect whether a browser accepts cookies
Hi - I have an application that does not work correctly when the browser does not accept cookies. I added some code that rewrites the query string the first time the app is entered to include a new parameter and then redirects to the app. I watch for that parameter and if I find it I check whether the session id is from a cookie. If it isn't I put up a Sorry, you need cookies message and exit. This solution is not optimal, since I am seeing a blank page the first time I try to get into the application. So my question is: Tomcat must ascertain whether the browser accepts cookies in order to decide whether to use cookies or URL rewriting. How does it do it? and can I check Tomcat to find out, too? Garey Mills Library Systems Office UC Berkeley The brain is not where you think - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pdf documents
Bob Wyatt wrote: Context docBase=/usr/test/pdf /Context Sorry, I should have read you post more carefully. The above works for 5.5.x but for 5.0.x you will need Context docBase=/usr/test/pdf path=/pdf /Context On this version directory listings are enabled so http://host:port/pdf should return a directory listing. So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF, shutdown and restarted Tomcat, and I receive the same error message. I don't think this would ever work. I'd delete this copy of pdf.xml so it doesn't cause confusion down the road. If, after a restart, this still doesn't work have a look in $CATALINA_HOME/logs and post the relevant sections of the logs. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need help running tomcat 5.5.9 on Windows Server 2003 64bit
Bauer, Michael E wrote: The current tomcat binaries are all win32. I need help in getting a binary (tomcat.exe and tomcatw.exe) that will run on Windows 2003 - 64bit. I currently use tomcat 5.5.9 on Windows Server 2003 32bit. I am trying to migrate to Windows Server 2003 64bit running on the Intel EM64T processor. Any help would be greatly appreciated. have a read of http://issues.apache.org/bugzilla/show_bug.cgi?id=39327 The offer in the final comment might just help. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UTF-8 headers and JSP included files
Dariusz Wojtas wrote: Any hints how to get rid of these extra FFFE chars? My included files need to be UTF-8 encoded. Use a text editor that doesn't insert these characters automatically. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Calling URL in same web app to get resulting HTML?
Is there a way to call a JSP within my web app so that I can capture the HTML that the JSP produces? I'd like to capture that HTML and store it in a file rather than returning it as part of the response. I have tried java.net.URL, but it has issues when testing over HTTPS (self-signed certs) and was hoping that servlets allowed something like request dispatcher include/forward that would make it easier for me to invoke a page within my webapp and capture it. Thanks, David - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pdf documents
Mark, I appreciate all of your help and energy on my behalf... But alas, this does not work for me... The requested resource (/myapp/jsp/app/C666119.pdf) is not available... I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I modified $CATALINA_HOME/webapps/pdf.xml to read: # more pdf.xml Context docBase=/usr/lg/unformq path=/pdf /Context The test to http://myip:8100/pdf also fails with resource unavailable... The log file does not report any errors; the last entries are from the shutdown and restart of tomcat... 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja va.lang.String;@38a11b3b') 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja va.lang.String;@66cb5b3c') 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja va.lang.String;@1495b3c') 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener: contextDestroyed() 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener: contextDestroyed() 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la ng.String;@195f9b3d') 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la ng.String;@4745b3d') 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la ng.String;@345db3d') 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener: contextDestroyed() 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener: contextDestroyed() 2006-06-20 19:25:39 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balan cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.a pache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http ://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener: contextInitialized() 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener: contextInitialized() 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener: contextInitialized() Regards, Bob -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 19:14 To: Tomcat Users List Subject: Re: pdf documents Bob Wyatt wrote: Context docBase=/usr/test/pdf /Context Sorry, I should have read you post more carefully. The above works for 5.5.x but for 5.0.x you will need Context docBase=/usr/test/pdf path=/pdf /Context On this version directory listings are enabled so http://host:port/pdf should return a directory listing. So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF, shutdown and restarted Tomcat, and I receive the same error message. I don't think this would ever work. I'd delete this copy of pdf.xml so it doesn't cause confusion down the road. If, after a restart, this still doesn't work have a look in $CATALINA_HOME/logs and post the relevant sections of the logs. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pdf documents
I'm afraid not... Regards, Bob -Original Message- From: Mladen Adamovic [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 18:15 To: Tomcat Users List Subject: Re: pdf documents Bob Wyatt wrote: If I move the pdf to the webapps/appname directory, it will display just fine. I don't want to move the hundreds of pdf files the appname directory. Do the following work? Create webapps/appname/pdf as a symbolic link directory to /whatever/you/want/path/to/pdf ? -- Mladen Adamovic http://www.online-utility.org http://www.shortopedia.com http://www.froola.com http://www.gift-idea4u.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload speed.
Antonio, I've done other experiments (without tomcat) where the upload speed is better. There are no throughput constraints in the network/server configuration. Unless it's internally imposed by tomcat webserver. Are there any such constraints in tomcat ? is this throughput difference deliberate ? could the configuration be tweaked to produce better upload throughput ? I've tried playing with the input/output buffer sizes in web.xml but no significant benifit was seen. Thanks, Aman -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4968168 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]