RE: Mod_jk/firewall configuration problems
Please give the configuration of your workers : the workers.properties.file Have you set worker.yourworker.socket_keepalive=1 in it ? Jean-Claude _ De : Greg Allen [mailto:[EMAIL PROTECTED] Envoyé : mardi 20 juin 2006 16:42 À : users@tomcat.apache.org Objet : 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. I'm sure this is some sort of configuration issue. But I don't know what. Can anyone point out what is wrong? Thanks, -- Greg
Re: Mod_jk/firewall configuration problems
2006/6/21, Serlet Jean-Claude [EMAIL PROTECTED]: Please give the configuration of your workers : the workers.properties.file Have you set worker.yourworker.socket_keepalive=1 in it ? Hmm, I didn't know about this option. Sometimes in our webapp we get a strange behaviour, that is in the middle of our navigation some pages just won't display and either IE or Firefox say Server timeout. Do you think it can be related to this? -- Francis Galiegue, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] One2team - 12bis rue de la Pierre Levée, 75011 Paris - 0143381980 When it comes to performance, weight is everything - Tiff Needell - 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
Jeff Chuang wrote: I could reproduce this problem on ALL my dual core AMD Opteron servers running FC5-x86_64. Not sure it is OS porting problem? JVM problem? native jni problem? or combination? Is it possible to configure Tomcat to use APR on port 80, but disable APR on port 443 to use regular java keystore PKCS12 format? I have tried to build jni connectors using --without-ssl option and configure connector on 443 with PKCS12 keystoreType and certificate(which works without APR) in server.xml. However, port 80 works fine, but port 443 does not(still use Http11AprProtocol, NOT Http11BaseProtocol). Any work around suggestion? thanks. Since I'm not too familiar with Tomcat's code I can't give an authorative answer, but I doubt that's possible to mix Base and APR Connectors. AFAICT Tomcat uses APR if tcnative can be loaded and is usable, and it does so for all configured Connectors. Maybe someone of the devs chimes in and proves me right or wrong. 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: Tomcat 5.5.17 APR/SSL Client Certificat
Thanks for your answer I use openssl 0.9.8 to generate self-signed ca-certificat , and server certificat and user certificat if i use tomcat whitout apr but with jsse i get my client certificat (of course i use keytool to import all certificats generated by openssl ). If i use apache 2 + mod_jk + tomcat everything work well, i get also my client certificat. Well, i am under solaris 8, and i use the same user-account to install all products (apache tomcat and so one) i.e. i have the good right to do that. Regards, Jean-Michel -- View this message in context: http://www.nabble.com/Tomcat-5.5.17-APR-SSL-Client-Certificat-t1810149.html#a4970437 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: Http11AprProtocol took 2 hr to init on http-443
Markus Schönhaber wrote: Maybe someone of the devs chimes in and proves me right or wrong. Use class=org.apache.coyote.http11.Http11BaseProtocol inside Connector ... Regards, Mladen. - 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
Mladen Turk wrote: Markus Schönhaber wrote: Maybe someone of the devs chimes in and proves me right or wrong. Use class=org.apache.coyote.http11.Http11BaseProtocol inside Connector ... Thanks for proving me wrong ;-) 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: Using Datasource for cloudscape
Hi Dilan, Thanks for helping again. I had attached files but it seems attachments are not allowed. I am adding the contets of these files below. To keep the mail size samll I am removing old contents of the mail. For the sake of clarity I am putting my problem statement also. Problem: I am using Tomcat 5.5.17 and tried running a sample datasource application having a jsp page (see contents below) using the Cloudscape database. I have added the driver jar into CATALINA_HOME/common/lib directory. When I run the jsp I get following exception WARNING: Unexpected exception resolving reference java.lang.NoSuchMethodException: com.ibm.db2j.jdbc.DB2jDataSource.setScope(boolean) at java.lang.Class.getMethod(Class.java:1581) at com.ibm.db2j.jdbc.DB2jAbstractDataSource.getObjectInstance(Unknown Source) Contents of file CATALINA_HOME/webapps/myApp/dbdemo.jsp %@ page import=javax.sql.* % %@ page import=java.sql.* % %@ page import=javax.naming.* % % Connection con = null; Statement stmt = null; try { Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/MyDB); System.out.println(Got DataSource\n); con = ds.getConnection(); System.out.println(Got Connection\n); } catch(java.lang.Exception e) { e.printStackTrace(); System.err.print(e.getClass().getName()); System.err.println(e.getMessage()); } try { stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(SELECT * FROM employee); System.out.println(Table assignment after insertion:); % Your table contains the following entries:BR table trBthemp_id/ththemp_name/ththemp_dept/th/B/tr % while (rs.next()) { String emp_id = rs.getString(emp_id); String emp_name = rs.getString(emp_name); String emp_dept = rs.getString(emp_dept); % tr td%=emp_id%/tdtd%=emp_name%/tdtd%=emp_dept%/td /tr /table % } rs.close(); stmt.close(); con.close(); } catch(java.lang.Exception e) { e.printStackTrace(); }% Contents of file CATALINA_HOME/conf/server.xml ?xml version=1.0 encoding=UTF-8? Server Listener className=org.apache.catalina.core.AprLifecycleListener/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase pathname=conf/tomcat-users.xml factory=org.apache.catalina.users.MemoryUserDatabaseFactory/ Resource name=jdbc/MyDB type=javax.sql.DataSource password=password driverClassName=com.ibm.db2j.jdbc.DB2jDriver maxIdle=2 maxWait=5000 username=user url=jdbc:db2j:E:/apache-tomcat-5.5.17/webapps/datasourcedemo/SampleDB maxActive=4/ /GlobalNamingResources Service name=Catalina Connector port=8080 redirectPort=8443 minSpareThreads=25 connectionTimeout=2 maxSpareThreads=75 maxThreads=150 /Connector Connector port=8009 redirectPort=8443 protocol=AJP/1.3 /Connector Engine defaultHost=localhost name=Catalina Realm className=org.apache.catalina.realm.UserDatabaseRealm/ Host appBase=webapps name=localhost /Host /Engine /Service /Server Contents of file CATALINA_HOME/webapps/myApp/WEB-INF/web.xml ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_ID version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-name datasourcedemo/display-name welcome-file-list welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.jsp/welcome-file welcome-filedefault.html/welcome-file welcome-filedefault.htm/welcome-file welcome-filedefault.jsp/welcome-file /welcome-file-list resource-ref
Re: Tomcat's scalability
Mladen Adamovic wrote: 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. I'm sure green threads which is a M:N threads policy have been gone a long while. Its not even included as a fallback threading model with current JVMs from SUN. Maybe you are not working from a modern Linux or Windows distribution or modern JVM ? When you run ps aux | grep java you always see one operating system thread IMHO. ps -La ?? Try ps uaxm | less each of the - lines under the process is a thread relating to that process. Check out the m,M,-T,-L options and the man page, or just ps -? Pick the leader and take a look in /proc/PID/task/ for the threads under that process. 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. Certainly j2sdk1.4.2_12 and jdk1.5.0_07 from SUN both use NTPL on Linux which is 1:1. I would think WIN32 already has good threading support. The current threading implementation in the last couple of years on Linux is NPTL. Google is your friend. Darryl - 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
Mladen Adamovic wrote: Biernatowski, Is your HTTP application multi-threaded ? Irrelevant. Unimportant. Why is that ? What happens if his app is using this line in JSP ? %@ page isThreadSafe=false % Google is your friend. Or to have i.e. extremely large Lucene database or some other slow algorithm. Why do you think he has lucene ? Did he mention lucene ? Or are you asking hypothetically, if so how does that help him ? Darryl - 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
Mark Thomas wrote: 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 Yup, for example, Eclipse (version 3 or higher). It is actually bad not to write BOM (those FFFE that you're talking about) but since some applications aren't programmed to recognize it, it's good for you. - 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.
FYI- I've been using the curl command line client for the uploads and downloads. When I tried the commons HttpClient from a java program, the upload/download throughputs matched !! (at over 85% ). regards, Aman. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4972313 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]
how to avoid dialog in basic authentication
Hello I have two pages, where pages2 will be opened via a link from page1. Page2 is only accessable via authentication (using BASIC). So my question is, how can I avoid that from page1 when I am opening page2, the dialog for authentication, by using a default user? (i.e. guest). Any ideas or good links Markus ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de - 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: Mod_jk/firewall configuration problems
Can you send me how you are accessing the website from within the firewall and how you are accessing the same outside the firewall ? Can you also send me the server.xml Regards Guru Gurumoorthy Raghupathy Web Support - Fidelity Investments International * Tel: +44 1737 836798 * Internal: 8-724 6798 * Tel (R): +442086610646 * Tel (R): +447899033459 * Tel (S): +447736059647 * Mail-Zone : XTW2A * E-Mail: mailto:[EMAIL PROTECTED] Important: Fidelity Investments International, Fidelity Investment Services Limited, Fidelity Pensions Management and Financial Administration Services Limited (a Fidelity Group company) are all authorised and regulated in the UK by the Financial Services Authority and have their registered offices at Oakhill House, 130 Tonbridge Road, Hildenborough, Tonbridge, Kent TN11 9DZ. Tel 01732 361144. Fidelity only gives information on products and does not give investment advice to private clients based on individual circumstances. Any comments or statements made are not necessarily those of Fidelity. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Fidelity may be subject to our monitoring procedures. 'Direct link to Fidelitys website. http://www.fidelity-international.com/world/index.html -Original Message- From: Greg Allen [mailto:[EMAIL PROTECTED] Sent: 21 June 2006 12:37 To: Serlet Jean-Claude; users@tomcat.apache.org Subject: RE: Mod_jk/firewall configuration problems I didn't have socket_keepalive set. But I added it and still have the same problem. From my httpd.conf: JkLogFile /var/log/httpd/mod_jk.log JkLogLevel debug # Just like workers.properties but exact line is prefixed # with JkWorkerProperty # Minimal jk configuration JkWorkerProperty worker.list=ajp13w JkWorkerProperty worker.ajp13w.type=ajp13 JkWorkerProperty worker.ajp13w.host=localhost JkWorkerProperty worker.ajp13w.port=8009 JkWorkerProperty worker.ajp13w.socket_keepalive=1 # enter the full path to the tomcat webapps directory JkAutoAlias /opt/tomcat/webapps # Mount 'testapp' directory. It's physical location # is assumed to be in the /opt/tomcat/webapps/testapp # ajp13w is a worker defined in the workers.properties JkMount /testapp/* ajp13w # Unmount desired static content from testapp webapp. # This content will be served by the httpd directly. JkUnMount /testapp/images/*.gif ajp13w JkUnMount /testapp/images/*.jpg ajp13w -- Greg _ From: Serlet Jean-Claude [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 2:35 AM To: Greg Allen; users@tomcat.apache.org Subject: RE: Mod_jk/firewall configuration problems Please give the configuration of your workers : the workers.properties.file Have you set worker.yourworker.socket_keepalive=1 in it ? Jean-Claude _ De : Greg Allen [mailto:[EMAIL PROTECTED] Envoyé : mardi 20 juin 2006 16:42 À : users@tomcat.apache.org Objet : 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. I'm sure this is some sort of configuration issue. But I don't know what. Can anyone point out what is wrong? Thanks, -- Greg
Re: pdf documents
Is this problem of document access in different directory with 5.5.17? I am running the same build. Someone posted last week under the topic Tomcat configuration error and yesterday Daniel has posted a similar problem under Tomcat 5.5.17 and Ant. suba suresh. Mark Thomas wrote: Bob Wyatt wrote: Mark, I appreciate all of your help and energy on my behalf... But alas, this does not work for me... Hmmm. Can you post your server.xml (with any passwords etc blanked out). Thanks, 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: Mod_jk/firewall configuration problems
Sorry : that 's all i thought Hope that you don't forget to stop and restart your Apache server after modifying workers.properties Jean-Claude _ De : Greg Allen [mailto:[EMAIL PROTECTED] Envoyé : mercredi 21 juin 2006 13:37 À : Serlet Jean-Claude; users@tomcat.apache.org Objet : RE: Mod_jk/firewall configuration problems I didn't have socket_keepalive set. But I added it and still have the same problem. From my httpd.conf: JkLogFile /var/log/httpd/mod_jk.log JkLogLevel debug # Just like workers.properties but exact line is prefixed # with JkWorkerProperty # Minimal jk configuration JkWorkerProperty worker.list=ajp13w JkWorkerProperty worker.ajp13w.type=ajp13 JkWorkerProperty worker.ajp13w.host=localhost JkWorkerProperty worker.ajp13w.port=8009 JkWorkerProperty worker.ajp13w.socket_keepalive=1 # enter the full path to the tomcat webapps directory JkAutoAlias /opt/tomcat/webapps # Mount 'testapp' directory. It's physical location # is assumed to be in the /opt/tomcat/webapps/testapp # ajp13w is a worker defined in the workers.properties JkMount /testapp/* ajp13w # Unmount desired static content from testapp webapp. # This content will be served by the httpd directly. JkUnMount /testapp/images/*.gif ajp13w JkUnMount /testapp/images/*.jpg ajp13w -- Greg _ From: Serlet Jean-Claude [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 2:35 AM To: Greg Allen; users@tomcat.apache.org Subject: RE: Mod_jk/firewall configuration problems Please give the configuration of your workers : the workers.properties.file Have you set worker.yourworker.socket_keepalive=1 in it ? Jean-Claude _ De : Greg Allen [mailto:[EMAIL PROTECTED] Envoyé : mardi 20 juin 2006 16:42 À : users@tomcat.apache.org Objet : 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. I'm sure this is some sort of configuration issue. But I don't know what. Can anyone point out what is wrong? Thanks, -- Greg
Re: Mod_jk/firewall configuration problems
Did you check your OS's keep alive interval and modify it if necessary? This interval has to be more frequent than your firewall's idle connection termination timeout -- otherwise setting keepalive in mod_jk does nothing for you. [This is alluded to in the docs. The details on setting this interval vary between OS'es.] -- Jess Holle Serlet Jean-Claude wrote: Sorry : that 's all i thought Hope that you don't forget to stop and restart your Apache server after modifying workers.properties Jean-Claude _ De : Greg Allen [mailto:[EMAIL PROTECTED] Envoyé : mercredi 21 juin 2006 13:37 À : Serlet Jean-Claude; users@tomcat.apache.org Objet : RE: Mod_jk/firewall configuration problems I didn't have socket_keepalive set. But I added it and still have the same problem. From my httpd.conf: JkLogFile /var/log/httpd/mod_jk.log JkLogLevel debug # Just like workers.properties but exact line is prefixed # with JkWorkerProperty # Minimal jk configuration JkWorkerProperty worker.list=ajp13w JkWorkerProperty worker.ajp13w.type=ajp13 JkWorkerProperty worker.ajp13w.host=localhost JkWorkerProperty worker.ajp13w.port=8009 JkWorkerProperty worker.ajp13w.socket_keepalive=1 # enter the full path to the tomcat webapps directory JkAutoAlias /opt/tomcat/webapps # Mount 'testapp' directory. It's physical location # is assumed to be in the /opt/tomcat/webapps/testapp # ajp13w is a worker defined in the workers.properties JkMount /testapp/* ajp13w # Unmount desired static content from testapp webapp. # This content will be served by the httpd directly. JkUnMount /testapp/images/*.gif ajp13w JkUnMount /testapp/images/*.jpg ajp13w -- Greg _ From: Serlet Jean-Claude [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 2:35 AM To: Greg Allen; users@tomcat.apache.org Subject: RE: Mod_jk/firewall configuration problems Please give the configuration of your workers : the workers.properties.file Have you set worker.yourworker.socket_keepalive=1 in it ? Jean-Claude _ De : Greg Allen [mailto:[EMAIL PROTECTED] Envoyé : mardi 20 juin 2006 16:42 À : users@tomcat.apache.org Objet : 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. I'm sure this is some sort of configuration issue. But I don't 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 creating two threads for one request
ok lets take one thing at a time... I am not an expert on this Running the application locally using IntelliJ and tomcat: java -version: 1.3.1_01 Tomcat Version: 5.0 While running on the server: Sun(TM) ONE Application Server 7 java version 1.4.1_06 Keep in mind that It does not happen all the times -- View this message in context: http://www.nabble.com/Tomcat-creating-two-threads-for-one-request-t1743271.html#a4973139 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]
multiple tomcat services
Hi, I have installed multiple tomcat instances with apche server and mod_jk connector, in windows environment. I have problem in configuring the tomcats as separate services. Could anyone suggest me how to install these tomcats as services. Any help is appreciated. with regards, Bharathi - 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
Pid, Thank you very much for this response... Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now allow http://myipaddr:8100/pdf to display the files in the specified directory. However, my webapp still does not pull it from here; it reports that the resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there is a file within the webapp that is over-riding, or over-ruling the 'default' that is now created? Can someone provide any advice on where to look next? Can someone provide some advice on what to do if I want to use more than one pdf directory, where the second directory is not a subdirectory of the first? Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 05:04 To: Tomcat Users List Subject: Re: pdf documents Don't you need to put the context file pdf.xml in a different place? $CATALINA_HOME/conf/engine-prob-Catalina?/hostname-maybe-webapp?/pdf.xml Once it's there you have to call the correct URL, which will be webapp-path/pdf/file.pdf Bob Wyatt wrote: 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]
Re: file upload speed.
I ment rather how do you handle the upload in tomcat? On 6/21/06, CMSuser [EMAIL PROTECTED] wrote: FYI- I've been using the curl command line client for the uploads and downloads. When I tried the commons HttpClient from a java program, the upload/download throughputs matched !! (at over 85% ). regards, Aman. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4972313 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] - 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, Pid posted a solution that works for me in the testing, but not in my app... I am posting the server.xml to comply with your request, but I am fairly certain that the file was not edited or altered when the app was installed. The app is third-party... So my questions now delve on how to make the app honor the pdf pathing defined... !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Comment these entries out to disable JMX MBeans support -- !-- You may also configure custom components (e.g. Valves/Realms) by including your own mbean-descriptor file(s), and setting the descriptors attribute to point to a ';' seperated list of paths (in the ClassLoader sense) of files to add to the default list. e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Catalina !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 5 documentation bundle for more detailed instructions): * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the enableLookups attribute to false. When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. -- !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector port=8100 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / !-- Note : To disable connection timeouts, set connectionTimeout value to 0 -- !-- Note : To use gzip compression you could set the following properties : compression=on compressionMinSize=2048 noCompressionUserAgents=gozilla, traviata compressableMimeType=text/html,text/xml -- !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- !-- Connector
Re: file upload speed.
Leon Rosenberg-3 wrote: I ment rather how do you handle the upload in tomcat? I have written any custom upload handlers. I just give the appropriate url to the put client and it's done. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4974321 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: file upload speed.
Leon Rosenberg-3 wrote: I ment rather how do you handle the upload in tomcat? I have not written any custom upload handlers on the web server side. I just give the appropriate url to the put client and it's done. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4974353 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 5.5.17 APR/SSL Client Certificat
thanks for your reponse But i find the trouble , tomcat 5.5.17 with tomcat-native-1.1.3 and APR-1.2.7 work well with only openssl-0.9.7 series not with openssl-0.9.8 series. regards, Jean-Michel -- View this message in context: http://www.nabble.com/Tomcat-5.5.17-APR-SSL-Client-Certificat-t1810149.html#a4974402 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
np I don't understand why you're or your webapp is looking here: /myapp/jsp/app/C666119.pdf when the files are available here: /pdf/C666119.pdf Is the first a filesystem path, or a web URL? When you say my webapp does not pull it from here, what do you mean by that? Sorry if I came to this late, but what does your webapp do and why is it looking there, and not at /pdf/C666119.pdf? Is it just a link that you're clicking or does your webapp download/open the PDF file? Bob Wyatt wrote: Pid, Thank you very much for this response... Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now allow http://myipaddr:8100/pdf to display the files in the specified directory. However, my webapp still does not pull it from here; it reports that the resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there is a file within the webapp that is over-riding, or over-ruling the 'default' that is now created? Can someone provide any advice on where to look next? Can someone provide some advice on what to do if I want to use more than one pdf directory, where the second directory is not a subdirectory of the first? Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 05:04 To: Tomcat Users List Subject: Re: pdf documents Don't you need to put the context file pdf.xml in a different place? $CATALINA_HOME/conf/engine-prob-Catalina?/hostname-maybe-webapp?/pdf.xml Once it's there you have to call the correct URL, which will be webapp-path/pdf/file.pdf Bob Wyatt wrote: 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
RE: pdf documents
Pid, I mean that it appears as though the webapp is looking in its own path for the pdf, and not the path of pdf files defined for Tomcat... The webapp true path would be: $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf... We connect to it by http://myipaddr:8100/myapp The app 'myapp' is a third-party application we purchased... In this case, we have some myapp applications that pull up a fax log of all fax transmissions for a user for the past 60 days. We are providing a link in that 'listing' to click to view the fax that was transmitted, which has been saved as a pdf file. As we have 150 users, there are hundreds of these pdf files out there, and I do not want them under $CATALINA_HOME. It would appear that we cannot control (specify) the path in which it searches for the pdf files, although Tomcat can when given the proper url (http://myipaddr:8100/pdf). Can an app supersede the pdf search path, or ignore it entirely? Can this 'feature' be disabled? Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 09:53 To: Tomcat Users List Subject: Re: pdf documents np I don't understand why you're or your webapp is looking here: /myapp/jsp/app/C666119.pdf when the files are available here: /pdf/C666119.pdf Is the first a filesystem path, or a web URL? When you say my webapp does not pull it from here, what do you mean by that? Sorry if I came to this late, but what does your webapp do and why is it looking there, and not at /pdf/C666119.pdf? Is it just a link that you're clicking or does your webapp download/open the PDF file? Bob Wyatt wrote: Pid, Thank you very much for this response... Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now allow http://myipaddr:8100/pdf to display the files in the specified directory. However, my webapp still does not pull it from here; it reports that the resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there is a file within the webapp that is over-riding, or over-ruling the 'default' that is now created? Can someone provide any advice on where to look next? Can someone provide some advice on what to do if I want to use more than one pdf directory, where the second directory is not a subdirectory of the first? Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 05:04 To: Tomcat Users List Subject: Re: pdf documents Don't you need to put the context file pdf.xml in a different place? $CATALINA_HOME/conf/engine-prob-Catalina?/hostname-maybe-webapp?/pdf.xml Once it's there you have to call the correct URL, which will be webapp-path/pdf/file.pdf Bob Wyatt wrote: 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 /
Re: pdf documents
Hi Bob- in your Tomcat servlet code you can read the file directly in this example I am reading fubar.properties from folder /fu/bar BufferedReader reader = new BufferedReader(new FileReader(/fu/bar/fubar.properties)); (If not you will have to supply URI such as http://server:port/WebAppName/RelativePathToFile/filename) Hope this helps, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Bob Wyatt [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org; [EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 10:15 AM Subject: RE: pdf documents Pid, I mean that it appears as though the webapp is looking in its own path for the pdf, and not the path of pdf files defined for Tomcat... The webapp true path would be: $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf... We connect to it by http://myipaddr:8100/myapp The app 'myapp' is a third-party application we purchased... In this case, we have some myapp applications that pull up a fax log of all fax transmissions for a user for the past 60 days. We are providing a link in that 'listing' to click to view the fax that was transmitted, which has been saved as a pdf file. As we have 150 users, there are hundreds of these pdf files out there, and I do not want them under $CATALINA_HOME. It would appear that we cannot control (specify) the path in which it searches for the pdf files, although Tomcat can when given the proper url (http://myipaddr:8100/pdf). Can an app supersede the pdf search path, or ignore it entirely? Can this 'feature' be disabled? Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 09:53 To: Tomcat Users List Subject: Re: pdf documents np I don't understand why you're or your webapp is looking here: /myapp/jsp/app/C666119.pdf when the files are available here: /pdf/C666119.pdf Is the first a filesystem path, or a web URL? When you say my webapp does not pull it from here, what do you mean by that? Sorry if I came to this late, but what does your webapp do and why is it looking there, and not at /pdf/C666119.pdf? Is it just a link that you're clicking or does your webapp download/open the PDF file? Bob Wyatt wrote: Pid, Thank you very much for this response... Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now allow http://myipaddr:8100/pdf to display the files in the specified directory. However, my webapp still does not pull it from here; it reports that the resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there is a file within the webapp that is over-riding, or over-ruling the 'default' that is now created? Can someone provide any advice on where to look next? Can someone provide some advice on what to do if I want to use more than one pdf directory, where the second directory is not a subdirectory of the first? Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 05:04 To: Tomcat Users List Subject: Re: pdf documents Don't you need to put the context file pdf.xml in a different place? $CATALINA_HOME/conf/engine-prob-Catalina?/hostname-maybe-webapp?/pdf.xml Once it's there you have to call the correct URL, which will be webapp-path/pdf/file.pdf Bob Wyatt wrote: 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:
RE: pdf documents
Martin, Thank you for the reply... I have no idea where to make the suggested changes... I am really, really new to this and have zero experience with this... If someone has the patience to help me, I would appreciate it! Regards, Bob -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 10:22 To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: pdf documents Hi Bob- in your Tomcat servlet code you can read the file directly in this example I am reading fubar.properties from folder /fu/bar BufferedReader reader = new BufferedReader(new FileReader(/fu/bar/fubar.properties)); (If not you will have to supply URI such as http://server:port/WebAppName/RelativePathToFile/filename) Hope this helps, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Bob Wyatt [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org; [EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 10:15 AM Subject: RE: pdf documents Pid, I mean that it appears as though the webapp is looking in its own path for the pdf, and not the path of pdf files defined for Tomcat... The webapp true path would be: $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf... We connect to it by http://myipaddr:8100/myapp The app 'myapp' is a third-party application we purchased... In this case, we have some myapp applications that pull up a fax log of all fax transmissions for a user for the past 60 days. We are providing a link in that 'listing' to click to view the fax that was transmitted, which has been saved as a pdf file. As we have 150 users, there are hundreds of these pdf files out there, and I do not want them under $CATALINA_HOME. It would appear that we cannot control (specify) the path in which it searches for the pdf files, although Tomcat can when given the proper url (http://myipaddr:8100/pdf). Can an app supersede the pdf search path, or ignore it entirely? Can this 'feature' be disabled? Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 09:53 To: Tomcat Users List Subject: Re: pdf documents np I don't understand why you're or your webapp is looking here: /myapp/jsp/app/C666119.pdf when the files are available here: /pdf/C666119.pdf Is the first a filesystem path, or a web URL? When you say my webapp does not pull it from here, what do you mean by that? Sorry if I came to this late, but what does your webapp do and why is it looking there, and not at /pdf/C666119.pdf? Is it just a link that you're clicking or does your webapp download/open the PDF file? Bob Wyatt wrote: Pid, Thank you very much for this response... Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now allow http://myipaddr:8100/pdf to display the files in the specified directory. However, my webapp still does not pull it from here; it reports that the resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there is a file within the webapp that is over-riding, or over-ruling the 'default' that is now created? Can someone provide any advice on where to look next? Can someone provide some advice on what to do if I want to use more than one pdf directory, where the second directory is not a subdirectory of the first? Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 05:04 To: Tomcat Users List Subject: Re: pdf documents Don't you need to put the context file pdf.xml in a different place? $CATALINA_HOME/conf/engine-prob-Catalina?/hostname-maybe-webapp?/pdf.xml Once it's there you have to call the correct URL, which will be webapp-path/pdf/file.pdf Bob Wyatt wrote: 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:
Re: Tomcat's scalability
Please see http://java.sun.com/developer/technicalArticles/Programming/linux/ Java on linux has been natively multithreaded since 1.3 Uops, I haven't known. Thank you all for your information (to Alex Turner, Leon Rosenberg, Darryl Milles). I was mistaken about this. - 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
If I am not mistaken jakarta-tomcat-5.0.28 -- View this message in context: http://www.nabble.com/Tomcat-creating-two-threads-for-one-request-t1743271.html#a4975580 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
Alex Turner wrote: Please also note that having a max threads of 750 is pretty much gaurtenteed to cause your system to grind to a halt under high load. (Most linux systems I've seen buckle somewhere around a load average of 75 or so, which means 75 threads waiting for CPU time). You mean 75 Java threads waiting for CPU time, because you can have 75 sleepy and not much CPU consuming processes. Example from my home computer : [EMAIL PROTECTED] ~]$ ps -ely | nl | tail -n 1 105 S 500 4586 4508 0 76 0 540 1008 pipe_w pts/2 00:00:00 tail [EMAIL PROTECTED] ~]$ It means 105 processes in memory and I think is not unusual at all. but doing much more than 3 or 4 times the number of CPUs you have is only going to cause your system to spend more time in context switches, not in actual work time. I spoke recently with guy from Microsoft (project manager from server division). He said that heavily loaded web server don't lose much time to switch processes but when you are out of free memory and server start to swap, performances degrade dramatically. I though that guy definitely knew what he was thought about. Lets see what operating system has to do when switch threads. Just to move all registers to/from memory? Anything else? A number less than 32 is probably more than your system will ever be able to cope with if you are actualy doing any processing during the course of a request and not just serving static content. I believe that is true. Probably you got that number experimental. It's usefull to do 30 seconds of googling to find Suns actual statement prior to posting and demostrating that 'AFAIK' is pretty lame, because you didn't bother to take the time to actualy find out. Actually, I tried to find those information once and searched something like: java windows multi thread and I cannot see it clearly in first entries. Probably I was supposed to refine my search... - 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.
Rick-- 2 options go commercial and buy a monitor app that will display all the CPU, Thread, Memory, I/O metrics http://manageengine.adventnet.com/products/applications_manager/monitor-tomcat.html -OR- I found by hand tuning the startup.sh or startup.bat files I could fine tune the number of invocations /processed launched/threads invoked when the bootstrap.jar and the processor engine starts up-- HTH, 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: Rick Cockerham [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 21, 2006 10:33 AM Subject: Re: Tomcat java processes eat processor. This looks perfect. It's what I need. However... I've been all over the website below. I don't see how to install this through web.xml. I see how to extend a servlet. I'm using JSP. So, that's a little more difficult. Thanks, Rick Leon Rosenberg wrote: 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
Re: Tomcat's scalability
Now that we are moving to the theoretical discussion, you will probably want to have a look at http://www.kegel.com/c10k.html Regards Andrew On 21/06/2006, at 4:56 PM, Mladen Adamovic wrote: I spoke recently with guy from Microsoft (project manager from server division). He said that heavily loaded web server don't lose much time to switch processes but when you are out of free memory and server start to swap, performances degrade dramatically. I though that guy definitely knew what he was thought about. Lets see what operating system has to do when switch threads. Just to move all registers to/from memory? Anything else? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pdf documents
Bob Wyatt wrote: Pid, I mean that it appears as though the webapp is looking in its own path for the pdf, and not the path of pdf files defined for Tomcat... Yes, see below. The webapp true path would be: $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf... OK, that's a filing system path. We connect to it by http://myipaddr:8100/myapp The app 'myapp' is a third-party application we purchased... In this case, we have some myapp applications that pull up a fax log of all fax transmissions for a user for the past 60 days. We are providing a link in that 'listing' to click to view the fax that was transmitted, which has been saved as a pdf file. As we have 150 users, there are hundreds of these pdf files out there, and I do not want them under $CATALINA_HOME. It would appear that we cannot control (specify) the path in which it searches for the pdf files, although Tomcat can when given the proper url (http://myipaddr:8100/pdf). (If I'm understanding this correctly it's not searching for anything.) The user is clicking the PDF link, and getting a 404, yes? If so, do a 'view source' on the HTML page, and tell me what's in the href attribute of the link. Is it href=C666119.pdf or is it href=/myapp/some/path/C666119.pdf or something else? Can an app supersede the pdf search path, or ignore it entirely? Can this 'feature' be disabled? There's no feature I'm afraid. The myapp isn't aware of the PDF context you've installed to map the filing system to a URL, so it's ignoring it. Either you must configure the app to write the correct URL for each PDF*, or you must map the PDF context to the place that is generated by the app**. * By altering the HTML to point to the path you defined in pdf.xml. ** By altering context pdf.xml definition to create the correct path. Regards, Bob P.S. Just reply to the list mate, I'm getting 2 copies... -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 09:53 To: Tomcat Users List Subject: Re: pdf documents np I don't understand why you're or your webapp is looking here: /myapp/jsp/app/C666119.pdf when the files are available here: /pdf/C666119.pdf Is the first a filesystem path, or a web URL? When you say my webapp does not pull it from here, what do you mean by that? Sorry if I came to this late, but what does your webapp do and why is it looking there, and not at /pdf/C666119.pdf? Is it just a link that you're clicking or does your webapp download/open the PDF file? Bob Wyatt wrote: Pid, Thank you very much for this response... Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now allow http://myipaddr:8100/pdf to display the files in the specified directory. However, my webapp still does not pull it from here; it reports that the resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there is a file within the webapp that is over-riding, or over-ruling the 'default' that is now created? Can someone provide any advice on where to look next? Can someone provide some advice on what to do if I want to use more than one pdf directory, where the second directory is not a subdirectory of the first? Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 05:04 To: Tomcat Users List Subject: Re: pdf documents Don't you need to put the context file pdf.xml in a different place? $CATALINA_HOME/conf/engine-prob-Catalina?/hostname-maybe-webapp?/pdf.xml Once it's there you have to call the correct URL, which will be webapp-path/pdf/file.pdf Bob Wyatt wrote: 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:
how do I set up a default context for a virtual host
I trying to setup virtual hosts on tomcat 5.5. and windows. I have added the following to server.xml Host name=wiki.net appBase=c:/wiki Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=wiki_log. suffix=.log timestamp=true/ /Host I have added context.xml to conf/Catalina/wiki.net containing context path=/wiki / Then I have added wiki.war to C:\wiki and restarted tomcat. Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces resource not available. I have tried changing the application name to ROOT.war and the context.xml file to ROOT.xml containing context path= docBase= / But this still produces nothing. How can I set up tomcat so that going to http://wiki.net runs my wiki.war? - 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 set up a default context for a virtual host
Read the docs: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Context path attribute: The value of this field must not be set except when statically defining a Context in server.xml, as it will be infered from the filenames used for either the .xml context file or the docBase. teknokrat wrote: I trying to setup virtual hosts on tomcat 5.5. and windows. I have added the following to server.xml Host name=wiki.net appBase=c:/wiki Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=wiki_log. suffix=.log timestamp=true/ /Host I have added context.xml to conf/Catalina/wiki.net containing context path=/wiki / Then I have added wiki.war to C:\wiki and restarted tomcat. Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces resource not available. I have tried changing the application name to ROOT.war and the context.xml file to ROOT.xml containing context path= docBase= / But this still produces nothing. How can I set up tomcat so that going to http://wiki.net runs my wiki.war? - 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: what happens with the content.xml file
Read the docs: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Context path attribute: The value of this field must not be set except when statically defining a Context in server.xml, as it will be *infered from the filenames* used for either the .xml context file or the docBase. [EMAIL PROTECTED] wrote: Hi folks, I'm quiet new to tomcat, but there is already a thing I can't understand: I have downloaded the Lambda Probe application version 1.5.0.3. I've got the .war file called probe.war. The only thing I did is to rename the file to probe_1.5.0.3.war and deployed it to my tomcat 5.5.17 (I downloaded the tomcat .zip-file and started the startup script - no configuration was changed). I put my probe_1.5.0.3.war into the folder $CATALINA_HOME\webapps. What i identified, what was happening now is: - The .war file was unpacked to $CATALINA_HOME\webapps\probe_1.5.0.3 with all its content - The META-INF/context.xml File (that was in the .war file) is copied to $CATALINA_HOME\conf\Catalina\localhost\probe_1.5.0.3.xml - The application is started. What I was wondering is, that the URL what my application is listening on is http://localhost:8080/probe_1.5.0.3 Does anyone know what I have to do, that my application listens to the following urls (only one at the time): http://localhost:8080/probe or even http://localhost:8080/tom/probe As I read the documentation, it should work with setting the path attribute in the context.xml File in the .war file...but i can change that path attribute to what I want, my applications still listens to: http://localhost:8080/probe_1.5.0.3 Thanks for your help...hope to get an answer soon. Kind regards Tom Please reply to my e-mail adress directly too! - 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
Pid, HREF=C666119.pdf As no file path is in HREF, and pdf.xml is correct (as exhibited by http://myipaddr:8100/pdf), should I be changing the path from /pdf to /myapp/jsp/app, or are you advocating changing the app so the HREF becomes /usr/lg/unformq/C666119.pdf? This latter one, I have no idea of where or how to do it, but that does not mean it cannot be done. Thanks for all of your help! Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 11:11 To: Tomcat Users List Subject: Re: pdf documents Bob Wyatt wrote: Pid, I mean that it appears as though the webapp is looking in its own path for the pdf, and not the path of pdf files defined for Tomcat... Yes, see below. The webapp true path would be: $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf... OK, that's a filing system path. We connect to it by http://myipaddr:8100/myapp The app 'myapp' is a third-party application we purchased... In this case, we have some myapp applications that pull up a fax log of all fax transmissions for a user for the past 60 days. We are providing a link in that 'listing' to click to view the fax that was transmitted, which has been saved as a pdf file. As we have 150 users, there are hundreds of these pdf files out there, and I do not want them under $CATALINA_HOME. It would appear that we cannot control (specify) the path in which it searches for the pdf files, although Tomcat can when given the proper url (http://myipaddr:8100/pdf). (If I'm understanding this correctly it's not searching for anything.) The user is clicking the PDF link, and getting a 404, yes? If so, do a 'view source' on the HTML page, and tell me what's in the href attribute of the link. Is it href=C666119.pdf or is it href=/myapp/some/path/C666119.pdf or something else? Can an app supersede the pdf search path, or ignore it entirely? Can this 'feature' be disabled? There's no feature I'm afraid. The myapp isn't aware of the PDF context you've installed to map the filing system to a URL, so it's ignoring it. Either you must configure the app to write the correct URL for each PDF*, or you must map the PDF context to the place that is generated by the app**. * By altering the HTML to point to the path you defined in pdf.xml. ** By altering context pdf.xml definition to create the correct path. Regards, Bob P.S. Just reply to the list mate, I'm getting 2 copies... -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 09:53 To: Tomcat Users List Subject: Re: pdf documents np I don't understand why you're or your webapp is looking here: /myapp/jsp/app/C666119.pdf when the files are available here: /pdf/C666119.pdf Is the first a filesystem path, or a web URL? When you say my webapp does not pull it from here, what do you mean by that? Sorry if I came to this late, but what does your webapp do and why is it looking there, and not at /pdf/C666119.pdf? Is it just a link that you're clicking or does your webapp download/open the PDF file? Bob Wyatt wrote: Pid, Thank you very much for this response... Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now allow http://myipaddr:8100/pdf to display the files in the specified directory. However, my webapp still does not pull it from here; it reports that the resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there is a file within the webapp that is over-riding, or over-ruling the 'default' that is now created? Can someone provide any advice on where to look next? Can someone provide some advice on what to do if I want to use more than one pdf directory, where the second directory is not a subdirectory of the first? Regards, Bob -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 05:04 To: Tomcat Users List Subject: Re: pdf documents Don't you need to put the context file pdf.xml in a different place? $CATALINA_HOME/conf/engine-prob-Catalina?/hostname-maybe-webapp?/pdf.xml Once it's there you have to call the correct URL, which will be webapp-path/pdf/file.pdf Bob Wyatt wrote: 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
Re: Tomcat's scalability
This discussion focuses primarily on serving static files to a client, not processing dynamic web pages. Most people running tomcat are processing dynamic pages, like getting data from a database and compositing a page based on that data. An FTP site, or a static web site will typically be I/O bound or Network bound, and the only way to increase throughput it to increase the number of I/Os per second that your server can manage or increase the size of your network interface. A java based dynamic website is typically not I/O bound, but CPU bound, which posses a different set of challenges than a static FTP server. Alex. On 6/21/06, Andrew Miehs [EMAIL PROTECTED] wrote: Now that we are moving to the theoretical discussion, you will probably want to have a look at http://www.kegel.com/c10k.html Regards Andrew On 21/06/2006, at 4:56 PM, Mladen Adamovic wrote: I spoke recently with guy from Microsoft (project manager from server division). He said that heavily loaded web server don't lose much time to switch processes but when you are out of free memory and server start to swap, performances degrade dramatically. I though that guy definitely knew what he was thought about. Lets see what operating system has to do when switch threads. Just to move all registers to/from memory? Anything else? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat in-memory session replication
Hi, I am trying to get in-memory session replication working and am testing running 3 seperate tomcat instances on the same server. I am using tomcat-5.5.15 and apache-2.0.54 with jk2. Whenever i run my test app although it should be doing round-robin load balancing it doesn't switch to another instance of tomcat until the eighth request and does not appear to have sent the session information across as the session ID changes. Here are my server.xml and workers2.properties files server.xml Server port=8005 shutdown=SHUTDOWN !-- Comment these entries out to disable JMX MBeans support used for the administration web application -- Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Catalina !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 5 documentation bundle for more detailed instructions): * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the enableLookups attribute to false. When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. -- !-- Define a non-SSL HTTP/1.1 Connector on port 8080 Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / -- !-- Note : To disable connection timeouts, set connectionTimeout value to 0 -- !-- Note : To use gzip compression you could set the following properties : compression=on compressionMinSize=2048 noCompressionUserAgents=gozilla, traviata compressableMimeType=text/html,text/xml -- !-- Define a SSL HTTP/1.1 Connector on port 8443 -- !-- Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS / -- !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / !-- Define a Proxied HTTP/1.1 Connector on port 8082 -- !-- See proxy documentation for more information about using this. -- !-- Connector port=8082 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false acceptCount=100
Question about StandardSession and ApplicationContext
I am profiling our application in jprofiler. I have noticed that the deep size of StandardSession object for each user is VERY large - ~ 11+mb. Yet I know that we are not adding that much data. Where is all that memory coming from? Is it truly non static data that is overhead for each session, or is it static data that each session points to? Does anyone out there have a strategy for finding memory leaks in a Tomcat application? I am not finding ours. John McClain Senior Software Engineer TCS Healthcare [EMAIL PROTECTED] (530)886-1700x235 Skepticism is the first step toward truth - 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 in-memory session replication
you have two issues and would be better off trying to isolate them separately. 1. Session replication not working To Troubleshoot: Isolate the problem, so in this case, get rid of apache/mod_jk Follow these steps: 1. Get a small load balancer like http://siag.nu/pen/ If you are on windows, download http://siag.nu/pub/pen/pen.exe 2. Stop all your apache instances 3. Change the HTTP connector in your server.xml to not have keep alive maxKeepAliveRequests=1 4. Start your load balancer pen.exe -r -f 80 localhost:8080 localhost:8081 localhost:8082 5. Hit your server, http://localhost/yourtestapp and see round robin working. 6. Is your session data replicating? If not follow these steps: 1. Have you give each tomcat a unique TCP listen port for replication see tcpListenPort in the Cluster config, should be a unique value for each tomcat 2. Are your tomcat instances discovering each other Should show up in the logs Filip Sean O'Reilly wrote: Hi, I am trying to get in-memory session replication working and am testing running 3 seperate tomcat instances on the same server. I am using tomcat-5.5.15 and apache-2.0.54 with jk2. Whenever i run my test app although it should be doing round-robin load balancing it doesn't switch to another instance of tomcat until the eighth request and does not appear to have sent the session information across as the session ID changes. Here are my server.xml and workers2.properties files server.xml Server port=8005 shutdown=SHUTDOWN !-- Comment these entries out to disable JMX MBeans support used for the administration web application -- Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Catalina !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 5 documentation bundle for more detailed instructions): * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the enableLookups attribute to false. When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. -- !-- Define a non-SSL HTTP/1.1 Connector on port 8080 Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / -- !-- Note : To disable connection timeouts, set connectionTimeout value to 0 -- !-- Note : To use gzip compression you could set the following properties : compression=on compressionMinSize=2048
Re: tomcat in-memory session replication
also, use Tomcat 5.5.17 Sean O'Reilly wrote: Hi, I am trying to get in-memory session replication working and am testing running 3 seperate tomcat instances on the same server. I am using tomcat-5.5.15 and apache-2.0.54 with jk2. Whenever i run my test app although it should be doing round-robin load balancing it doesn't switch to another instance of tomcat until the eighth request and does not appear to have sent the session information across as the session ID changes. Here are my server.xml and workers2.properties files server.xml Server port=8005 shutdown=SHUTDOWN !-- Comment these entries out to disable JMX MBeans support used for the administration web application -- Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Catalina !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 5 documentation bundle for more detailed instructions): * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the enableLookups attribute to false. When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. -- !-- Define a non-SSL HTTP/1.1 Connector on port 8080 Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / -- !-- Note : To disable connection timeouts, set connectionTimeout value to 0 -- !-- Note : To use gzip compression you could set the following properties : compression=on compressionMinSize=2048 noCompressionUserAgents=gozilla, traviata compressableMimeType=text/html,text/xml -- !-- Define a SSL HTTP/1.1 Connector on port 8443 -- !-- Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS / -- !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / !-- Define a Proxied HTTP/1.1 Connector on port 8082 -- !-- See proxy documentation for more information about using this. -- !-- Connector port=8082 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false acceptCount=100 connectionTimeout=2
Re: how do I set up a default context for a virtual host
If you put wiki.war into c:/wiki it will deploy and create c:/wiki/wiki/contents of war then the app will (if it's working) be available at: http://server:port/wiki/ teknokrat wrote: Yeah, I have. If you have a look at the bottom I have a ROOT.xml with Read it again. context path= docBase= / I have tried using just context / with no success Pid wrote: Read the docs: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Context path attribute: The value of this field must not be set except when statically defining a Context in server.xml, as it will be infered from the filenames used for either the .xml context file or the docBase. This means that if you put the context element inside the host in server.xml, you CAN set the path, BUT if you put it in $CATALINA/conf/Catalina/host/ then the path attribute *is ignored*. By not setting the docBase the server is looking in c:/wiki, but as we've established, your app is in c:/wiki/wiki What does the context.xml in the wiki.war/META-INF contain? Configure it so: tomcat/conf/Catalina/wiki.net/ROOT.xml contains Context path= docBase=ROOT ... And server.xml contains ... Host name=wiki.net appBase=c:/wiki And c:/wiki/ contains a directory called ROOT with the application completely deployed inside it. (Deploying it as ROOT.war should do the trick). Oh, and it is auto-deploying the war file, right? teknokrat wrote: I trying to setup virtual hosts on tomcat 5.5. and windows. I have added the following to server.xml Host name=wiki.net appBase=c:/wiki Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=wiki_log. suffix=.log timestamp=true/ /Host I have added context.xml to conf/Catalina/wiki.net containing context path=/wiki / Then I have added wiki.war to C:\wiki and restarted tomcat. Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces resource not available. I have tried changing the application name to ROOT.war and the context.xml file to ROOT.xml containing context path= docBase= / But this still produces nothing. How can I set up tomcat so that going to http://wiki.net runs my wiki.war? - 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 in-memory session replication
On Wed, 21 Jun 2006 11:26:28 -0500 Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote: also, use Tomcat 5.5.17 Sean O'Reilly wrote: Hi, I am trying to get in-memory session replication working and am testing running 3 seperate tomcat instances on the same server. I am using tomcat-5.5.15 and apache-2.0.54 with jk2. Whenever i run my test app although it should be doing round-robin load balancing it doesn't switch to another instance of tomcat until the eighth request and does not appear to have sent the session information across as the session ID changes. Here are my server.xml and workers2.properties files server.xml Server port=8005 shutdown=SHUTDOWN !-- Comment these entries out to disable JMX MBeans support used for the administration web application -- Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Catalina !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 5 documentation bundle for more detailed instructions): * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the enableLookups attribute to false. When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. -- !-- Define a non-SSL HTTP/1.1 Connector on port 8080 Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / -- !-- Note : To disable connection timeouts, set connectionTimeout value to 0 -- !-- Note : To use gzip compression you could set the following properties : compression=on compressionMinSize=2048 noCompressionUserAgents=gozilla, traviata compressableMimeType=text/html,text/xml -- !-- Define a SSL HTTP/1.1 Connector on port 8443 -- !-- Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS / -- !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / !-- Define a Proxied
mod_jk Status Busy Number
We are doing load balancing with Apache and mod_jk. We have five instances of Tomcat running on three servers. Two Tomcat instances are fine. But, Three Tomcat instances show really high Busy numbers on the Status page. Here is what it looks like: NameTypeHostAddrStatFVAccErrWr RdBusyMaxRRCd tomcat24ajp1310.9.100.2:2400910.9.100.2:24009Stopped 1659803960 0 429496729448 tomcat14ajp1310.9.100.1:1400910.9.100.1:14009OK1 91669452320 0 1976 tomcat15ajp1310.9.100.1:1500910.9.100.1:15009Stopped 1659812990 0 429496729258 tomcat34ajp1310.9.100.3:3400910.9.100.3:34009OK1 81669452110 0 1197 tomcat35ajp1310.9.100.3:3500910.9.100.3:35009Stopped 1759878860 0 429496729351 The number of Busy connections are over 4 billion?!?! I didn't think we were that popular. ;) The strange thing is that these numbers come and go with each refresh of the page. They will be there, hit refresh, and they are gone. Hit refresh again, and they are back. The numbers will only bounce between those three instances. The tomcat14 and tomcat34 won't see them, and work fine. We have had to stop those three since it was affecting the app. It seems session replication was affected. As soon as those three were stopped, things work fine. The configs of the five instances are identical except for ports obviously. Has anyone seen a similar behavior? Thanks. -- ++ Troy Davidson Java Programmer PC/Web Team CMC/Flex 8520 South Sandy Parkway Sandy, UT 84070 (801) 365-5000 www.cmcflex.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: mod_jk Status Busy Number
Here is that data a bit better: NameTypeHostAddrStatFVAccErrWr RdBusyMaxRRCd tomcat24ajp1310.9.100.2:2400910.9.100.2:24009Stopped 1659803960 0 429496729448 tomcat14ajp1310.9.100.1:1400910.9.100.1:14009OK1 91669452320 0 1976 tomcat15ajp1310.9.100.1:1500910.9.100.1:15009Stopped 1659812990 0 429496729258 tomcat34ajp1310.9.100.3:3400910.9.100.3:34009OK1 81669452110 0 1197 tomcat35ajp1310.9.100.3:3500910.9.100.3:35009Stopped 1759878860 0 429496729351 Troy Davidson wrote: We are doing load balancing with Apache and mod_jk. We have five instances of Tomcat running on three servers. Two Tomcat instances are fine. But, Three Tomcat instances show really high Busy numbers on the Status page. Here is what it looks like: NameTypeHostAddrStatFVAccErrWr RdBusyMaxRRCd tomcat24ajp1310.9.100.2:2400910.9.100.2:24009 Stopped1659803960 0 4294967294 48 tomcat14ajp1310.9.100.1:14009 10.9.100.1:14009OK191669452320 0 19 76 tomcat15ajp1310.9.100.1:15009 10.9.100.1:15009Stopped1659812990 0 429496729258 tomcat34ajp1310.9.100.3:34009 10.9.100.3:34009OK181669452110 0 11 97 tomcat35ajp1310.9.100.3:35009 10.9.100.3:35009Stopped1759878860 0 429496729351 The number of Busy connections are over 4 billion?!?! I didn't think we were that popular. ;) The strange thing is that these numbers come and go with each refresh of the page. They will be there, hit refresh, and they are gone. Hit refresh again, and they are back. The numbers will only bounce between those three instances. The tomcat14 and tomcat34 won't see them, and work fine. We have had to stop those three since it was affecting the app. It seems session replication was affected. As soon as those three were stopped, things work fine. The configs of the five instances are identical except for ports obviously. Has anyone seen a similar behavior? Thanks. -- ++ Troy Davidson Java Programmer PC/Web Team CMC/Flex 8520 South Sandy Parkway Sandy, UT 84070 (801) 365-5000 www.cmcflex.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: How does Tomcat detect whether a browser accepts cookies
Martin - I guess I'm being obtuse, but WHAT won't work? What I want to know is how Tomcat detects whether the browser accepts cookies, that is, whether it is set to accept cookies or not? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Martin Gainty wrote: Garey- Unfortunately that wont work if your Browser disallows cookies If its IE Check out the IE options- Tools Internet Options Privacy Advanced look at switched on Always allow Session Cookies HTH, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Garey Mills [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 21, 2006 12:50 PM Subject: Re: How does Tomcat detect whether a browser accepts cookies Leon - Thank you for your response, but I don't understand it. I have a key question: how does Tomcat detect that a browser does not accept cookies? There are a number of different ways to detect it inside my application, but all of them seem to need a roundtrip to the browser. If, as I suspect, Tomcat can tell without the redirect, I would like to use Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use Tomcat's knowledge, so that I don't have to duplicate the work inside my app. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Leon Rosenberg wrote: You could check for your cookie in first request and if not present just set the cookie in the request and redirect to another page which reads the cookie (btw, it can also be done with javascript without user-visible-reload). The difference to your approach that each user will be redirected exactly once, since you are checking for your cookie in first request and it should remain persistent for next visits. regards Leon On 6/21/06, Garey Mills [EMAIL PROTECTED] wrote: 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] - 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: How does Tomcat detect whether a browser accepts cookies
I think what he's getting at is that Tomcat (or any other web server) cannot tell how a browser is set wrt cookies without trying to set one and then seeing if it's there. Garey Mills wrote: Martin - I guess I'm being obtuse, but WHAT won't work? What I want to know is how Tomcat detects whether the browser accepts cookies, that is, whether it is set to accept cookies or not? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Martin Gainty wrote: Garey- Unfortunately that wont work if your Browser disallows cookies If its IE Check out the IE options- Tools Internet Options Privacy Advanced look at switched on Always allow Session Cookies HTH, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Garey Mills [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 21, 2006 12:50 PM Subject: Re: How does Tomcat detect whether a browser accepts cookies Leon - Thank you for your response, but I don't understand it. I have a key question: how does Tomcat detect that a browser does not accept cookies? There are a number of different ways to detect it inside my application, but all of them seem to need a roundtrip to the browser. If, as I suspect, Tomcat can tell without the redirect, I would like to use Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use Tomcat's knowledge, so that I don't have to duplicate the work inside my app. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Leon Rosenberg wrote: You could check for your cookie in first request and if not present just set the cookie in the request and redirect to another page which reads the cookie (btw, it can also be done with javascript without user-visible-reload). The difference to your approach that each user will be redirected exactly once, since you are checking for your cookie in first request and it should remain persistent for next visits. regards Leon On 6/21/06, Garey Mills [EMAIL PROTECTED] wrote: 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: How does Tomcat detect whether a browser accepts cookies
David - Well, okay then, but how can my app find out what Tomcat knows about whether the browser accepts cookies or not? And when does Tomcat try? Before control is passed to my app? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Kerber wrote: I think what he's getting at is that Tomcat (or any other web server) cannot tell how a browser is set wrt cookies without trying to set one and then seeing if it's there. Garey Mills wrote: Martin - I guess I'm being obtuse, but WHAT won't work? What I want to know is how Tomcat detects whether the browser accepts cookies, that is, whether it is set to accept cookies or not? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Martin Gainty wrote: Garey- Unfortunately that wont work if your Browser disallows cookies If its IE Check out the IE options- Tools Internet Options Privacy Advanced look at switched on Always allow Session Cookies HTH, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Garey Mills [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 21, 2006 12:50 PM Subject: Re: How does Tomcat detect whether a browser accepts cookies Leon - Thank you for your response, but I don't understand it. I have a key question: how does Tomcat detect that a browser does not accept cookies? There are a number of different ways to detect it inside my application, but all of them seem to need a roundtrip to the browser. If, as I suspect, Tomcat can tell without the redirect, I would like to use Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use Tomcat's knowledge, so that I don't have to duplicate the work inside my app. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Leon Rosenberg wrote: You could check for your cookie in first request and if not present just set the cookie in the request and redirect to another page which reads the cookie (btw, it can also be done with javascript without user-visible-reload). The difference to your approach that each user will be redirected exactly once, since you are checking for your cookie in first request and it should remain persistent for next visits. regards Leon On 6/21/06, Garey Mills [EMAIL PROTECTED] wrote: 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] - 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.
I really should have added instructions :-) but ok, here they are goto http://moskito.anotheria.net/download/nightly/ and download the nightly (actually daily) build http://moskito.anotheria.net/download/nightly/moskito-dist.2006-06-21.tar.gz you can check the contents of the demowebapp (moskitodemo.war) on how to integrate but actually you need to perform few steps: unjar moskito-webui-jsps.jar into webapps/YOURWEBAPP unjar moskito-webui-config.jar into webapps/YOURWEBAPP/WEB-INF/classes add moskito-core.jar, moskito-webui.jar and moskito-web.jar into webapps/YOURWEBAPP/WEB-INF/lib copy all libs from moskito-dist/lib into webapps/YOURWEBAPP/WEB-INF/lib add following to the web.xml: filter filter-nameRequestURIFilter/filter-name filter-classnet.java.dev.moskito.web.filters.RequestURIFilter/filter-class init-param param-namelimit/param-name param-value100/param-value /init-param /filter filter-mapping filter-nameRequestURIFilter/filter-name url-pattern/*/url-pattern /filter-mapping this way the filter will monitor each request to the root webapp. change the url-pattern to your webapp name. The limit parameter to the filter-class definition should correspond with the your apps uris. The background is that moskito adds uris dynamically, as the requests come, so if you don't limit it, some bad guys could fire nonsense request at your webapp and force an OutOfMemory. Therefore set it to 1000 or something. with the above steps you are fine, and the filter should monitor by now. However, for moskito-user-interface you need two more steps, since it requires struts 1. add the moskitoui servlet to your webxml: servlet servlet-namemoskitoUI/servlet-name servlet-classnet.java.dev.moskito.webui.MoskitoUIServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value /WEB-INF/classes/struts-config-moskito.xml, /param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-namemoskitoUI/servlet-name url-pattern/mui/*/url-pattern /servlet-mapping 2. add struts tlds to your webapp, for example webapps/YOURWEBAPP/WEB-INF/tld and then to your web.xml: (note if you are using web.xml version 2.4 you have to surround taglib tags with jsp-config tag. taglib taglib-uri/tags/struts-html/taglib-uri taglib-location/WEB-INF/tld/struts-html.tld/taglib-location /taglib taglib taglib-uri/tags/struts-bean/taglib-uri taglib-location/WEB-INF/tld/struts-bean.tld/taglib-location /taglib taglib taglib-uri/tags/struts-logic/taglib-uri taglib-location/WEB-INF/tld/struts-logic.tld/taglib-location /taglib that all feel free to contact me off list if you are stuck somewhere leon On 6/21/06, Rick Cockerham [EMAIL PROTECTED] wrote: This looks perfect. It's what I need. However... I've been all over the website below. I don't see how to install this through web.xml. I see how to extend a servlet. I'm using JSP. So, that's a little more difficult. Thanks, Rick Leon Rosenberg wrote: 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
Re: How does Tomcat detect whether a browser accepts cookies
Why would it try until your app tells it to? AFAIK (admittedly, not very far; I don't use cookies) think it needs to be handled by your app. Garey Mills wrote: David - Well, okay then, but how can my app find out what Tomcat knows about whether the browser accepts cookies or not? And when does Tomcat try? Before control is passed to my app? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Kerber wrote: I think what he's getting at is that Tomcat (or any other web server) cannot tell how a browser is set wrt cookies without trying to set one and then seeing if it's there. Garey Mills wrote: Martin - I guess I'm being obtuse, but WHAT won't work? What I want to know is how Tomcat detects whether the browser accepts cookies, that is, whether it is set to accept cookies or not? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Martin Gainty wrote: Garey- Unfortunately that wont work if your Browser disallows cookies If its IE Check out the IE options- Tools Internet Options Privacy Advanced look at switched on Always allow Session Cookies HTH, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Garey Mills [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 21, 2006 12:50 PM Subject: Re: How does Tomcat detect whether a browser accepts cookies Leon - Thank you for your response, but I don't understand it. I have a key question: how does Tomcat detect that a browser does not accept cookies? There are a number of different ways to detect it inside my application, but all of them seem to need a roundtrip to the browser. If, as I suspect, Tomcat can tell without the redirect, I would like to use Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use Tomcat's knowledge, so that I don't have to duplicate the work inside my app. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Leon Rosenberg wrote: You could check for your cookie in first request and if not present just set the cookie in the request and redirect to another page which reads the cookie (btw, it can also be done with javascript without user-visible-reload). The difference to your approach that each user will be redirected exactly once, since you are checking for your cookie in first request and it should remain persistent for next visits. regards Leon On 6/21/06, Garey Mills [EMAIL PROTECTED] wrote: 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: file upload speed.
sorry, maybe i'm misunderstand a whole bunch of things here, but what exactly is your appropriate url? I mean, you can test download speed by accessing your own servlet or even static content, ok, but you can't upload anything without having a receiver for it. leon On 6/21/06, CMSuser [EMAIL PROTECTED] wrote: Leon Rosenberg-3 wrote: I ment rather how do you handle the upload in tomcat? I have not written any custom upload handlers on the web server side. I just give the appropriate url to the put client and it's done. -- View this message in context: http://www.nabble.com/file-upload-speed.-t1816944.html#a4974353 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] - 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 does Tomcat detect whether a browser accepts cookies
David - Tomcat uses cookies to establish a session with the browser. If it can't use cookies, it uses URL rewriting. So whenever someone uses my app, Tomcat tries to set a cookie. If it was the case that Tomcat didn't know whether the browser accepted cookies until after it tried to set one at the first access, users of browsers that did not accept cookies would not have a session that recorded their first access. I don't think that would be considered acceptable, so I assume that Tomcat knows, before my app is reached, whether the browser accepts cookies. But is my assumption correct, I don't know. That is what I am asking. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Kerber wrote: Why would it try until your app tells it to? AFAIK (admittedly, not very far; I don't use cookies) think it needs to be handled by your app. Garey Mills wrote: David - Well, okay then, but how can my app find out what Tomcat knows about whether the browser accepts cookies or not? And when does Tomcat try? Before control is passed to my app? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Kerber wrote: I think what he's getting at is that Tomcat (or any other web server) cannot tell how a browser is set wrt cookies without trying to set one and then seeing if it's there. Garey Mills wrote: Martin - I guess I'm being obtuse, but WHAT won't work? What I want to know is how Tomcat detects whether the browser accepts cookies, that is, whether it is set to accept cookies or not? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Martin Gainty wrote: Garey- Unfortunately that wont work if your Browser disallows cookies If its IE Check out the IE options- Tools Internet Options Privacy Advanced look at switched on Always allow Session Cookies HTH, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Garey Mills [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 21, 2006 12:50 PM Subject: Re: How does Tomcat detect whether a browser accepts cookies Leon - Thank you for your response, but I don't understand it. I have a key question: how does Tomcat detect that a browser does not accept cookies? There are a number of different ways to detect it inside my application, but all of them seem to need a roundtrip to the browser. If, as I suspect, Tomcat can tell without the redirect, I would like to use Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use Tomcat's knowledge, so that I don't have to duplicate the work inside my app. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Leon Rosenberg wrote: You could check for your cookie in first request and if not present just set the cookie in the request and redirect to another page which reads the cookie (btw, it can also be done with javascript without user-visible-reload). The difference to your approach that each user will be redirected exactly once, since you are checking for your cookie in first request and it should remain persistent for next visits. regards Leon On 6/21/06, Garey Mills [EMAIL PROTECTED] wrote: 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
Re: How does Tomcat detect whether a browser accepts cookies
Ok, now I understand what you're getting at, but I still don't see how tomcat could know if a browser accepts cookies on the initial request from the browser (which seems to be what your assumption would require). I wouldn't mind a bit if I were proven wrong, though... Dave Garey Mills wrote: David - Tomcat uses cookies to establish a session with the browser. If it can't use cookies, it uses URL rewriting. So whenever someone uses my app, Tomcat tries to set a cookie. If it was the case that Tomcat didn't know whether the browser accepted cookies until after it tried to set one at the first access, users of browsers that did not accept cookies would not have a session that recorded their first access. I don't think that would be considered acceptable, so I assume that Tomcat knows, before my app is reached, whether the browser accepts cookies. But is my assumption correct, I don't know. That is what I am asking. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Kerber wrote: Why would it try until your app tells it to? AFAIK (admittedly, not very far; I don't use cookies) think it needs to be handled by your app. Garey Mills wrote: David - Well, okay then, but how can my app find out what Tomcat knows about whether the browser accepts cookies or not? And when does Tomcat try? Before control is passed to my app? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Kerber wrote: I think what he's getting at is that Tomcat (or any other web server) cannot tell how a browser is set wrt cookies without trying to set one and then seeing if it's there. Garey Mills wrote: Martin - I guess I'm being obtuse, but WHAT won't work? What I want to know is how Tomcat detects whether the browser accepts cookies, that is, whether it is set to accept cookies or not? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Martin Gainty wrote: Garey- Unfortunately that wont work if your Browser disallows cookies If its IE Check out the IE options- Tools Internet Options Privacy Advanced look at switched on Always allow Session Cookies HTH, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Garey Mills [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 21, 2006 12:50 PM Subject: Re: How does Tomcat detect whether a browser accepts cookies Leon - Thank you for your response, but I don't understand it. I have a key question: how does Tomcat detect that a browser does not accept cookies? There are a number of different ways to detect it inside my application, but all of them seem to need a roundtrip to the browser. If, as I suspect, Tomcat can tell without the redirect, I would like to use Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use Tomcat's knowledge, so that I don't have to duplicate the work inside my app. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Leon Rosenberg wrote: You could check for your cookie in first request and if not present just set the cookie in the request and redirect to another page which reads the cookie (btw, it can also be done with javascript without user-visible-reload). The difference to your approach that each user will be redirected exactly once, since you are checking for your cookie in first request and it should remain persistent for next visits. regards Leon On 6/21/06, Garey Mills [EMAIL PROTECTED] wrote: 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
Re: mod_jk failover and preferring localhost
you've setup sticky_sessions to be false, (btw, I thought that only took 0/1 values) so how can you expect session affinity from that? Filip thuss2 wrote: We have 10 web servers with Tomcat's running on them and a mod_jk configuration to prefer the tomcat on localhost and only failover to another machine if the local one fails. This worked fine under our older mod_jk, however, we just upgraded to 1.2.15 and now it that the local_worker properties are no longer supported, it's load balancing every request. So I checked out the workers.properties options page: http://tomcat.apache.org/connectors-doc/config/workers.html and noticed the new distance option so that I can give localhost a distance of 0 and everything else a greater distance so that the load balancer should always prefer localhost. However, it seems to be ignoring the distance property completely and load balancing every request. Can anyone suggest what I might try to get it to always use the local tomcat for requests unless it fails: worker.list=tomcat worker.tomcat.type=lb worker.tomcat.socket_timeout=195 worker.tomcat.balance_workers=localhost,latin1,latin2,... worker.tomcat.sticky_session=False worker.localhost.port=8009 worker.localhost.host=localhost worker.localhost.type=ajp13 worker.localhost.lbfactor=1 worker.localhost.distance=0 worker.latin1.port=8009 worker.latin1.host=latin1 worker.latin1.type=ajp13 worker.latin1.lbfactor=1 worker.latin1.distance=1 worker.latin2.port=8009 worker.latin2.host=latin2 worker.latin2.type=ajp13 worker.latin2.lbfactor=1 worker.latin2.distance=1 Thanks, Todd -- View this message in context: http://www.nabble.com/mod_jk-failover-and-preferring-localhost-t1825380.html#a4979143 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] -- Filip Hanik - 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: mod_jk failover and preferring localhost
Filip, we're not using sessions so we don't need sessions affinity, but if we did we'd use session replication rather than sticky sessions. The sticky option does accept true/false according to the documentation http://tomcat.apache.org/connectors-doc/config/workers.html . I think that's all unrelated to the issue we're seeing though which is that mod_jk seems to be completely ignoring the distance parameter. -Todd -- View this message in context: http://www.nabble.com/mod_jk-failover-and-preferring-localhost-t1825380.html#a4980476 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: mod_jk failover and preferring localhost
Filip Hanik - Dev Lists wrote: you've setup sticky_sessions to be false, (btw, I thought that only took 0/1 values) so how can you expect session affinity from that? Recent mod_jk versions can take True/False instead 1/0 just as an convenience method. Also the 'distance' param will be supported with the next 1.2.16 release. Regards, Mladen. - 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: mod_jk failover and preferring localhost
That explains it, thanks. I've just set the lbfactor extremely high on the localhost in the interim to get mod_jk to prefer it over remote tomcats. -Todd -- View this message in context: http://www.nabble.com/mod_jk-failover-and-preferring-localhost-t1825380.html#a4980806 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]
JNDI Resource Factories questions
Hi, I've fot a couple of questions regarding Tomcat's JNDI implementation. In the JNDI resources howto of Tomcat 5.5 (http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html) at paragraph 'Adding Custom Resource Factories', just under '1. Write A Resource Factory Class' one can read this: ...Every time your web application calls lookup() on a context entry that is bound to this factory, the getObjectInstance() method is called... I tried with Tomcat 5.5.17 and it seems that this statement is wrong: getObjectInstance() only get called only at the first lookup() call then it seems the result is cached somewhere by Tomcat to serve future request. I also noticed that the 2nd parameter of getObjectInstance() method (Name jndiNameObject) seems to loose the path information. Let me explain: I've got a web app with this context.xml file located in the META-INF folder: Context Environment name=config/someKey value=someValue type=java.lang.String/ /Context The string get properly bound to the ENC so you can look it up with ctx.lookup(java:comp/env/config/someKey); Unfortunately, in the getObjectInstance() method the jndiNameObject parameter only appears to be 'someKey'. It seems there is no way to find back that it was bound as 'config/someKey'. Is that on purpose ? Did I miss something ? Another thing: is there a good reason why bindings configured in the server.xml's GlobalNamingResources tag have to be linked by web app contexts ? Why isn't there a way to access this content using some global URL, like /config/someKey ? Last but not least, I found the answer to Remy's question: http://www.nabble.com/Re%3A-UserTransaction%2C-JOTM-and-Tomcat-5.5.x-p2803063.html Just do this to hijack the java: ENC: System.setProperty(java.naming.factory.initial, the.carol.factory); Thanks in advance, Ludovic -- View this message in context: http://www.nabble.com/JNDI-Resource-Factories-questions-t1826017.html#a4980937 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: query
My first thought is Oracle will install its own Java Virtual Machine. Oracle likes to be the entire world. Is Tomcat still finding a JVM that it can use? Do you have the Oracle Universal Installer running? What happens if you run Oracle and Tomcat on two different computers? If that's not it, perhaps you could say what Oracle products you installed (just the server?) and what symptoms you see when Tomcat is not working. -- Glenn Holliday Computer Sciences Corporation [EMAIL PROTECTED] 540-644-6636 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. veena v [EMAIL PROTECTED] 06/21/2006 02:11 PM Please respond to Tomcat Users List users@tomcat.apache.org To users@tomcat.apache.org cc Subject query I have windows xp installed on my system. Inbsp;installed tomcat 4.1 and it was working properly. But after installing oracle 9i tomcat is not working though i have installed tomcat and oracle on different port. Please do help me. - 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 does Tomcat detect whether a browser accepts cookies
On first response, Tomcat both set's a cookie JSESSIONID and appends the same to the page links (when properly coded). If the cookie comes back on the next request, url rewriting is dropped in favor of the cookie. No magic, tomcat just covers all it's bases up front. See HttpServletResponse.encodeURL(String) in the servlet spec for more info. -- David Garey Mills wrote: David - Tomcat uses cookies to establish a session with the browser. If it can't use cookies, it uses URL rewriting. So whenever someone uses my app, Tomcat tries to set a cookie. If it was the case that Tomcat didn't know whether the browser accepted cookies until after it tried to set one at the first access, users of browsers that did not accept cookies would not have a session that recorded their first access. I don't think that would be considered acceptable, so I assume that Tomcat knows, before my app is reached, whether the browser accepts cookies. But is my assumption correct, I don't know. That is what I am asking. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Kerber wrote: Why would it try until your app tells it to? AFAIK (admittedly, not very far; I don't use cookies) think it needs to be handled by your app. Garey Mills wrote: David - Well, okay then, but how can my app find out what Tomcat knows about whether the browser accepts cookies or not? And when does Tomcat try? Before control is passed to my app? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Kerber wrote: I think what he's getting at is that Tomcat (or any other web server) cannot tell how a browser is set wrt cookies without trying to set one and then seeing if it's there. Garey Mills wrote: Martin - I guess I'm being obtuse, but WHAT won't work? What I want to know is how Tomcat detects whether the browser accepts cookies, that is, whether it is set to accept cookies or not? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Martin Gainty wrote: Garey- Unfortunately that wont work if your Browser disallows cookies If its IE Check out the IE options- Tools Internet Options Privacy Advanced look at switched on Always allow Session Cookies HTH, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Garey Mills [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 21, 2006 12:50 PM Subject: Re: How does Tomcat detect whether a browser accepts cookies Leon - Thank you for your response, but I don't understand it. I have a key question: how does Tomcat detect that a browser does not accept cookies? There are a number of different ways to detect it inside my application, but all of them seem to need a roundtrip to the browser. If, as I suspect, Tomcat can tell without the redirect, I would like to use Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use Tomcat's knowledge, so that I don't have to duplicate the work inside my app. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Leon Rosenberg wrote: You could check for your cookie in first request and if not present just set the cookie in the request and redirect to another page which reads the cookie (btw, it can also be done with javascript without user-visible-reload). The difference to your approach that each user will be redirected exactly once, since you are checking for your cookie in first request and it should remain persistent for next visits. regards Leon On 6/21/06, Garey Mills [EMAIL PROTECTED] wrote: 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
Re: How does Tomcat detect whether a browser accepts cookies
David - Thanks for the clear, concise answer. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Smith wrote: On first response, Tomcat both set's a cookie JSESSIONID and appends the same to the page links (when properly coded). If the cookie comes back on the next request, url rewriting is dropped in favor of the cookie. No magic, tomcat just covers all it's bases up front. See HttpServletResponse.encodeURL(String) in the servlet spec for more info. -- David Garey Mills wrote: David - Tomcat uses cookies to establish a session with the browser. If it can't use cookies, it uses URL rewriting. So whenever someone uses my app, Tomcat tries to set a cookie. If it was the case that Tomcat didn't know whether the browser accepted cookies until after it tried to set one at the first access, users of browsers that did not accept cookies would not have a session that recorded their first access. I don't think that would be considered acceptable, so I assume that Tomcat knows, before my app is reached, whether the browser accepts cookies. But is my assumption correct, I don't know. That is what I am asking. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Kerber wrote: Why would it try until your app tells it to? AFAIK (admittedly, not very far; I don't use cookies) think it needs to be handled by your app. Garey Mills wrote: David - Well, okay then, but how can my app find out what Tomcat knows about whether the browser accepts cookies or not? And when does Tomcat try? Before control is passed to my app? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, David Kerber wrote: I think what he's getting at is that Tomcat (or any other web server) cannot tell how a browser is set wrt cookies without trying to set one and then seeing if it's there. Garey Mills wrote: Martin - I guess I'm being obtuse, but WHAT won't work? What I want to know is how Tomcat detects whether the browser accepts cookies, that is, whether it is set to accept cookies or not? Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Martin Gainty wrote: Garey- Unfortunately that wont work if your Browser disallows cookies If its IE Check out the IE options- Tools Internet Options Privacy Advanced look at switched on Always allow Session Cookies HTH, Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Garey Mills [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, June 21, 2006 12:50 PM Subject: Re: How does Tomcat detect whether a browser accepts cookies Leon - Thank you for your response, but I don't understand it. I have a key question: how does Tomcat detect that a browser does not accept cookies? There are a number of different ways to detect it inside my application, but all of them seem to need a roundtrip to the browser. If, as I suspect, Tomcat can tell without the redirect, I would like to use Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use Tomcat's knowledge, so that I don't have to duplicate the work inside my app. Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Wed, 21 Jun 2006, Leon Rosenberg wrote: You could check for your cookie in first request and if not present just set the cookie in the request and redirect to another page which reads the cookie (btw, it can also be done with javascript without user-visible-reload). The difference to your approach that each user will be redirected exactly once, since you are checking for your cookie in first request and it should remain persistent for next visits. regards Leon On 6/21/06, Garey Mills [EMAIL PROTECTED] wrote: 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
Tomcat shutdown Problems - Process Does Not Die
I've been searching the list but so far I have not been able to find a solution to problem. I am running tomcat 4.1.31 using java 1.4.2 on a Solaris 8 machine. In our configuration we are running two tomcat instances sharing binaries and webapps directories by CATALINE_HOME and CATALINE_BASE to the specific tomcat config. Tomcat starts without a problem but for some reason when running the shutdown script it doesn't kill the process however it does close it's sockets. It's configured to listen on 9080 for requests and 9005 for shutdown requests and after executing the shutdown script those ports are no longer being listened to and it is possible to start another tomcat. Anyone have any idea on why the actual process would not be dieing? Derek
Re: query
Good Afternoon Glenn- For the reasons you just enumerated I ALWAYS install Oracle on its own box and ALWAYS point it to its own installed version of JVM.. Conversely- I ALWAYS install Tomcat on its own box and point it to its own JVM The thought of one (set of) processes exhausting the thread pool to the detriment of the other process may require planning- Running Tomcat on a box dedicated to Oracle is a definite maybe..(assuming Oracle has been installed, configured to its own JVM) Running latest versions of Oracle (10G Enterprise) on a box already running Tomcat might very well exhaust the orginal JVM's thread pool.. Many Thanks for the thoughtful post- Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Glenn Holliday To: Tomcat Users List users@tomcat.apache.org Cc: users@tomcat.apache.org Sent: Wednesday, June 21, 2006 4:36 PM Subject: Re: query My first thought is Oracle will install its own Java Virtual Machine. Oracle likes to be the entire world. Is Tomcat still finding a JVM that it can use? Do you have the Oracle Universal Installer running? What happens if you run Oracle and Tomcat on two different computers? If that's not it, perhaps you could say what Oracle products you installed (just the server?) and what symptoms you see when Tomcat is not working. -- Glenn Holliday Computer Sciences Corporation [EMAIL PROTECTED] 540-644-6636 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. veena v [EMAIL PROTECTED] 06/21/2006 02:11 PM Please respond to Tomcat Users List users@tomcat.apache.org To users@tomcat.apache.org cc Subject query I have windows xp installed on my system. Inbsp;installed tomcat 4.1 and it was working properly. But after installing oracle 9i tomcat is not working though i have installed tomcat and oracle on different port. Please do help me. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Differences in tomcat on linux and windows???
Hi there!! What are the differences in apache-tomcat performance (in fact I have a weird behaviour over an oracle database that´s the reason on my question to the list) on windows and linux?? ... I have this doubt because my develop environment is over windows and I have no problems updating information in my database, but in my linux server on production sometimes seems the data aren´t updating.I have check the logs on my linux box, but I can´t find a logical reason (on win apache-tomcat release is 5.5 and on my linux apache-tomcat 5.5.14 ) Tnxs a lot!!!
Re: query
On at least one version of Oracle (10 IIRC), the default install hijacks port 8080 for Oracle XDB. When you say you have installed Oracle on a different port, perhaps you are referring to the Oracle port for database traffic, which is normally 1521 - this is a different port which I think is web management tool). I had trouble getting Oracle to stop grabbing 8080 and in the end I had to change tomcat's port. I'm sure you can change Oracle somehow though. On 6/22/06, veena v [EMAIL PROTECTED] wrote: I have windows xp installed on my system. Inbsp;installed tomcat 4.1 and it was working properly. But after installing oracle 9i tomcat is not working though i have installed tomcat and oracle on different port. Please do help me.
Re: looking for memory profiler or dump analyzer for production use
The monitoring component works for the first hour after the VM is started in the free version. In the commercial version, the monitoring information is availble the whole time - as for pricing - no idea.. There as an article about JRocket in one of the last IX magazines (DE) Andrew Leon Rosenberg wrote: not sure, the vm itself is free, but i think the monitoring isn't. we couldn't find any prices ourself too leon On 6/21/06, charly [EMAIL PROTECTED] wrote: Thanks! Doesn't this mean that it is free: - 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
hi GB, From catalina.bat rem CATALINA_HOME May point at your Catalina build directory. rem rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions rem of a Catalina installation. If not present, resolves to rem the same directory that CATALINA_HOME points to. rem you can have multiple instances of tomcat with multiple directories for CATALINA_BASE. I'm not sure if there's any easy mechanism to predict if multiple CATALINA_BASE will work better than multiple independent JVMs each pointing to separate tomcat directories. As an earlier user mentioned, run top to figure out how much CPU is being sucked by Tomcat. BTW, which version of Tomcat and JVM are you using ? We found Tomcat 5.5 to be much better(40% - 120%) than 4.x or even 5.0x series when used with JAVA 1.5.X. Can you add some logging around your JDBC calls to SQL Server -- that way you can find out the time consumed by the DB at 100 users versuse the timings at 300 users. BR, ~A On 6/19/06, GB Developer [EMAIL PROTECTED] wrote: How do you propose to add a 'separate instance of Tomcat' without 'adding a separate JVM'? Or do you/others mean by 'instance of tomcat' = 'a separate physical server with single instance of JVM/Tomcat' ? So far it sounds that the approach of adding separate instance of Tomcat and using round robin is better than adding a separate JVM. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- BR, Anjan Bacchu Summit Information Systems
Re: mod_jk failover and preferring localhost
Mladen Turk wrote: Filip Hanik - Dev Lists wrote: you've setup sticky_sessions to be false, (btw, I thought that only took 0/1 values) so how can you expect session affinity from that? Recent mod_jk versions can take True/False instead 1/0 just as an convenience method. instead or as well, the latter right? Filip -- Filip Hanik - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple tomcat services
Here's a how-to that was posted to this mailing list: http://www.nabble.com/Re%3A-running-two-instances-of-tomcat-p3560229.html I haven't tried it myself, but it looks pretty complicated so it must be right. :-) -- Len On 6/21/06, Bharathi Kattamuri [EMAIL PROTECTED] wrote: Hi, I have installed multiple tomcat instances with apche server and mod_jk connector, in windows environment. I have problem in configuring the tomcats as separate services. Could anyone suggest me how to install these tomcats as services. Any help is appreciated. with regards, Bharathi - 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]