Re: JMX Perform GC TOMCAT 5.5.23
Hi Pardon me for Re Posting the content , had posted the same some day's ago The Web application is simple and uses JNI to connect to UNIX LOCAL Application O/s = UNIX 11 PA Risc 2 CPU SDK : J2SDK16 TOMCAT 5.5.23 RAM = 8 GB JAVA_OPTS=-server -Xms200m -Xmx2548m -XX:+UseParallelGC -verbose:gc SERVER.xml !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 maxHttpHeaderSize=8192 maxThreads=400 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=1 disableUploadTimeout=true / Am i doing wrong anything in here. with regards Karthik Michael Simmons wrote: I havent used JMX so this might not be relevant But I'd suggest the following. 1) Install jvmstat it works with java 1.6 and use Visualgc to visual monitor the garbage collection. Note: you need to run tomcat as the same user as the account running visualgc use jps to find out the java vm ID 2) Use the server jvm (ie one in JAVA_HOME/jre/bin/server 3) Tweak your GC settings (try seeting your initial memory pool and Max mem pool to he same value (say 128MB) and your Thread stack size to say 32KB then add the a java options -XX:+UseConcMarkSweepGC -XX:NewSize=32M -XX:MaxNewSize=32M). Note on windows the Java options need to be on separate lines. Allocating more memory to the JVM isn't always best. Although it means the GC runs less often it causes it to take longer to run. Ie large pauses. Large pauses can cause timeouts resulting in retries causing more work resulting in more pauses and things go down hill from there. Ensure that your app is closing database connections as soon as it is finished with them and that error conditions are correctly handled such that database connections are aways closed. See Random Connection Closed Exceptions in (http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto. html) For template code. Michael Simmons Technical Advisor/Programmer Information Technology Services (ITS) (Office of Finance and Resources) Telephone: 6488 4792 Fax: 6488 3861 MBDP: M463 Email: [EMAIL PROTECTED] -Original Message- From: karthikn [mailto:[EMAIL PROTECTED] Sent: Wednesday, 4 June 2008 10:16 PM To: Tomcat Users List Subject: Re: JMX Perform GC TOMCAT 5.5.23 Hi On a simulator System (same as Production ) with JMeter Load test performance was good and CPU utilization was not beyond 40% for 900+ users But for the same application in Production, We notice Constantly JAVA is 100% CPU utilization. Any Ideas ? with regards Karthik we were able to Caldarale, Charles R wrote: From: karthikn [mailto:[EMAIL PROTECTED] Subject: Re: JMX Perform GC TOMCAT 5.5.23 Reason : We have a Production TOMCAT 5.5.23 where in CPU Utilization for JAVA is going 100% , And for some reason you think a GC will fix that? This Tomcat needs to be restarted started every 12+ hrs We suspect HP supported JDK1.6 bing the culprit for the same A slight possibility, but in nearly all such cases, it's the application, not the JVM or Tomcat. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Single sign on issue with Tomcat and Apache
Johnny Kewl wrote: - Original Message - From: Propes, Barry L [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Hi, I am integrating two websites using single sign on. I have two sites namely aaa.com and bbb.com. I enabled SingleSignOn valve in server.xml file, and trying to access Its not going to work... Its not because of TC, its because of the way cookies are handled by the browser. Its been a long long time since I wrote a filter to do this, and there are probably better third party products out there. But this is what I remember... The SingleSignOn is addressing the issue of sign on across web apps and within a single TC... not across machines. ie Tomcat has to at least be able to track the session. If thats covered then... Then and I forget the terminology. A browser will consider this the same domain aaa.com/webapp/servlet1 aaa.com/webapp/servlet2 and I think even aaa.com/webapp2/servlet1 but as soon as that becomes bbb.com the browser treats it like a stranger and does not return the session key, nor auth info for the other domain... so TC/Apache is screwed because the browser doesnt want to play. Vaguely I remember setting persistent cookies in the browser, and then tracking my own cookies across machines... but it also meant a complete redo of all the security and TC's generic security could not be used. I remember seeing thrid party tools... but if you cant change the one webapp, you into something really creative, creating a filter wont work because security happens before the filter you have a creative problem on your hands ;) E.g. OpenID, JOSSO etc Search google for Java Single Sign On. As has been stated, SingleSignOnValve isn't a true SSO solution. p I think if you can put TC behind Apache, thus getting it back to the same domain name, and the distinguishing only on sub context... ie aaa.com/images/in apache aaa.com/webapp/someservlet and the call is passed thru to TC Then the browser will like it and return the authentication details otherwise is going to be some kind of complex proxy type thing to trick the browser. Good luck... --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - 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: Authenticate with X509 certification
Thanks, Bill, I use the JIO connector. That's my server.xml: ?xml version=1.0 encoding=UTF-8? Server port=8006 shutdown=SHUTDOWN 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/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8081 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / Connector acceptCount=100 clientAuth=false disableUploadTimeout=true keystoreFile=/X/x.p12 keystorePass=XX keystoreType=PKCS12 port=8443 scheme=https secure=true sslProtocol=TLS truststoreFile=/XXX/trustcacerts truststorePass=XXX truststoreType=JKS/ Connector port=8010 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Realm className=com.ival.tomcat.X509Realm debug=0 / Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context docBase=cavi path=/cavi reloadable=true / Context docBase=x509 path=/x509 reloadable=true allowLinking=true / /Host /Engine /Service /Server Bill Barker escribió: Luis Pascual Forner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I need autheticate ONLY with client certificate (i.e., I don't want to check any user's database) . I did that follow: 1. I write a X509Realm, with a method authenticate that only check the validity of each certificate in the certification's chain (don't check if the user exists in any database). 2. Declare this new class in org/apache/catalina/realm/mbeans-descriptors.xml and rg/apache/catalina/mbeans/mbeans-descriptors.xml. 3. Edit server.xml and configure the realm. 4. Edit web.xml to set the auth-method to CLIENT-CERT 5. Put X509Realm.class and mbeans-descriptors.xml in server/classes, with the correct path. 6. Restart Tomcat. Now, I can authenticate with X509 certificate, and get the client certificate with getAttribute(javax.servlet.request.X509Certificate). But, sometimes, this method returns null. Why? Almost certainly means that the client didn't send a cert. But more info on your setup would get a better response. For example are you using the APR or the JIO Connector? regards - 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: Authenticate with X509 certification
More information: If I use Internet Explorer, in the log appears: java.net.SocketException: Socket Closed at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:201) at java.net.Socket.setSoTimeout(Socket.java:997) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.setSoTimeout(SSLSocketImpl.java:2047) at org.apache.tomcat.util.net.jsse.JSSE14Support.synchronousHandshake(JSSE14Support.java:99) at org.apache.tomcat.util.net.jsse.JSSE14Support.handShake(JSSE14Support.java:67) at org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:121) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:1131) at org.apache.coyote.Request.action(Request.java:349) at org.apache.catalina.authenticator.SSLAuthenticator.authenticate(SSLAuthenticator.java:138) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:619) But not if I use Firefox with Linux. Luis Pascual Forner escribió: Thanks, Bill, I use the JIO connector. That's my server.xml: ?xml version=1.0 encoding=UTF-8? Server port=8006 shutdown=SHUTDOWN 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/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8081 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / Connector acceptCount=100 clientAuth=false disableUploadTimeout=true keystoreFile=/X/x.p12 keystorePass=XX keystoreType=PKCS12 port=8443 scheme=https secure=true sslProtocol=TLS truststoreFile=/XXX/trustcacerts truststorePass=XXX truststoreType=JKS/ Connector port=8010 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Realm className=com.ival.tomcat.X509Realm debug=0 / Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context docBase=cavi path=/cavi reloadable=true / Context docBase=x509 path=/x509 reloadable=true allowLinking=true / /Host /Engine /Service /Server Bill Barker escribió: Luis Pascual Forner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I need autheticate ONLY with client certificate (i.e., I don't want to check any user's database) . I did that follow: 1. I write a X509Realm, with a method authenticate that only check the validity of each certificate in the certification's chain (don't check if the user exists in any database). 2. Declare this new class in org/apache/catalina/realm/mbeans-descriptors.xml and rg/apache/catalina/mbeans/mbeans-descriptors.xml. 3. Edit server.xml and configure the realm. 4. Edit web.xml to set the auth-method to CLIENT-CERT 5. Put X509Realm.class and mbeans-descriptors.xml in server/classes, with the correct path. 6. Restart Tomcat. Now, I can authenticate with X509 certificate, and get the client certificate with getAttribute(javax.servlet.request.X509Certificate). But, sometimes, this method returns null. Why? Almost certainly means that the client didn't send a cert. But more info on your setup would get a better
Error with content-type application/pdf and Internet Explorer
Hello, The JSP script that follows produces an error when accessing with Internet Explorer: %@ page contentType=application/pdf % %@ page import=java.io.File % %@ page import=java.io.FileInputStream % %@ page import=java.io.InputStreamReader % % InputStreamReader in = new InputStreamReader( new FileInputStream(new File(document.pdf)), ISO-8859-1); char[] b = new char[128]; int i = in.read(b, 0, 128); while (i = 0) { out.write(b, 0, i); i = in.read(b, 0, 128); } in.close(); % More info: * Tomcat version: 5.5.26. * Internet Explorer open a download window, and then the error No puede descargar xx de www..es. El archivo no pudo ser escrito en la caché (my IE is localized in spanish). * The same script runs OK with Firefox in Linux and with Mozilla in Windows. * The same script runs OK with Internet Explorer and Tomcat 5.0.19 + Apache 2.0.49. * No messages in log. * In the conf/web.xml file appears the mime-type application/pdf. regards, Luis - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Get bean from servletContext on context destruction
Hy! I have a bean on a jsp page (jsp:UseBean) , with application scope, that uses some resources that must be freed when the application is stopped/reset. I'm currently using a context listener to detect when does the servelt context gets destroyed, but I cannot get the bean from it. What I want to accomplish is: 1:public void contextDestroyed(ServletContextEvent e){ 2: ServletContext t = e.getServletContext(); 3: myBean b =(myBean)t.getAttribute(newsbean); 4: if(b!=null){ 5: System.out.println(Bean is: +(b.holdsResource() ? !ok : ok)); 6: }else{ 7: System.out.println(No bean =(); 8: } 9:} where line 3 should do the trick. How can this be done? Googling only turned up the reverse, accessing context from a bean, and the listener is by the webapp in web.xml. Thanks, nam3l3ss - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Fwd: client authentication issues]
Hello all, Any comments? Thanks, Pavlos Original Message Subject:client authentication issues Date: Tue, 03 Jun 2008 18:06:49 +0300 From: Pavlos Drandakis [EMAIL PROTECTED] To: users@tomcat.apache.org Hi all, I have configured a stand alone tomcat server with apr support that hosts a web application. I wanted to enable client authentication so I put in server.xml the following: Connector protocol=org.apache.coyote.http11.Http11AprProtocol executor=ThreadPool-port-8443 port=8443 address=my_server SSLEnabled=true scheme=https secure=true SSLVerifyClient=require SSLVerifyDepth=4 SSLCertificateChainFile=/path/to/certs/bundle_cert.pem SSLCACertificateFile=/path/to/certs/root_bundle_cert.pem SSLCertificateFile=/path/to/certs/my_server.crt SSLCertificateKeyFile=/path/to/certs/my_server.key SSLCARevocationFile=/path/to/certs/crl/tomcat.pem / Everything seems ok, but there are some issues ... 1) When CRL expires, Tomcat rejects every client certificate as expired, even for certificates that were revoked before the expiration of the CRL and CRL was aware of (IMHO they should be treated as revoked ones). 2) If a certificate is revoked, user can still authenticate even though CRL is automatically updated. It seems to me that tomcat reads CRL once (when starting) and never again. Is that true? If I restart tomcat everything works well. Is there any other way to reload the CRL? 3) I cannot find information about OCSP directives like SSLOCSPEnable (http://httpd.apache.org/docs/trunk/mod/mod_ssl.html). Is OCSP supported for my configuration? If not, is there any plan for supporting it? Thanks, in advance, Pavlos Server Configuration: Tomcat: 6.0.16 APR: 1.2.12 Tomcat Native: 1.1.13 OpenSSL: 0.9.8g Java: 1.6.0_06 - 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: Authenticate with X509 certification
Hi, you have to set clientAuth=true andreas Luis Pascual Forner schrieb: Thanks, Bill, I use the JIO connector. That's my server.xml: ?xml version=1.0 encoding=UTF-8? Server port=8006 shutdown=SHUTDOWN 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/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8081 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / Connector acceptCount=100 clientAuth=false disableUploadTimeout=true keystoreFile=/X/x.p12 keystorePass=XX keystoreType=PKCS12 port=8443 scheme=https secure=true sslProtocol=TLS truststoreFile=/XXX/trustcacerts truststorePass=XXX truststoreType=JKS/ Connector port=8010 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Realm className=com.ival.tomcat.X509Realm debug=0 / Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context docBase=cavi path=/cavi reloadable=true / Context docBase=x509 path=/x509 reloadable=true allowLinking=true / /Host /Engine /Service /Server Bill Barker escribió: Luis Pascual Forner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I need autheticate ONLY with client certificate (i.e., I don't want to check any user's database) . I did that follow: 1. I write a X509Realm, with a method authenticate that only check the validity of each certificate in the certification's chain (don't check if the user exists in any database). 2. Declare this new class in org/apache/catalina/realm/mbeans-descriptors.xml and rg/apache/catalina/mbeans/mbeans-descriptors.xml. 3. Edit server.xml and configure the realm. 4. Edit web.xml to set the auth-method to CLIENT-CERT 5. Put X509Realm.class and mbeans-descriptors.xml in server/classes, with the correct path. 6. Restart Tomcat. Now, I can authenticate with X509 certificate, and get the client certificate with getAttribute(javax.servlet.request.X509Certificate). But, sometimes, this method returns null. Why? Almost certainly means that the client didn't send a cert. But more info on your setup would get a better response. For example are you using the APR or the JIO Connector? regards - 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 only responds to first request
Hello again, I guess the -server option only reliefed a bit the situation by incresing the number of threads or something, because I'm still getting a Tomcat freeze (dumper valve stops logging requests) after a dozen clicks on refresh for the Tomcat root page. This is happening with any Tomcat I have, I'm running J2SE1.5.0_12. It is still not showing all images on each refresh. Any suggestion? Tx, JN From: Noronha, Joao Sent: quarta-feira, 4 de Junho de 2008 18:38 To: 'users@tomcat.apache.org' Subject: RE: Tomcat only responds to first request I managed to solve the problem, by making 3 things, didn't figure out which one did the trick: a) commenting AJP connector (I'm using standalone); b) changing port from 8082 to 10080 c) using -server option in JVM options My guess would be option b)... By the way, Eclipse is messing a little with Eclipse config (replaces server.xml), because I have the option Run modules directly from the workspace unchecked. Tip: If you change the configuration (server.xml) and want Eclipse to use it, you have to delete server from servers list and add a new one. I unchecked it because I want Eclipse to use the webapps in the Tomcat directory. I can also launch Tomcat from Eclipse and it is now processing several HTTP requests. Now when I want to debug, Eclipse is always Starting..., checking why, but I guess you would like the good news... Cheers, JN From: Noronha, Joao Sent: quarta-feira, 4 de Junho de 2008 11:47 To: 'users@tomcat.apache.org' Subject: Tomcat only responds to first request Hi, I started having this problems with Tomcat(s) in my PC a few days ago. For bug purposes, I have a Tomcat 6.0.16 simple install with default examples, no app of my own. For any app Tomcat only gets the first request, showing DumperValve request info. The browser (either IE or Opera) generally does not show (keeps downloading forever) one or two images, usually the largest (asf-logo-wide.gif). For a second or other page requests it does respond and does not show any console output for DumperValve (does not get the request). A second thread dump before closing the browser has a new thread waiting on JIoEndpoint. Even after closing the browser, which leads to closing the HTTP connection - seen with procexp.exe -, this new thread is still waiting on the same spot (I attach the 3 thread dumps and dumper valve info between 1 and 2). Where could it be the problem? Tx4help, JN This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Re: Singleton in Tomcat 6.0 not working
Hello, Is there any particular reason you can't just use ServletContext Attribute instead of a static singleton? Greetings, Lilianne E. Blaze ktou Ho wrote: Hi, I am using Tomcat 6.0.16 with JDK 1.6. I created a web application and deployed it as ROOT. (I removed the default ROOT which comes with tomcat). The problem I am facing is the Singleton is not working at all in the servlet. I tried to synchnozed the constructor or make it static. I still get two instances of the objects. How can I solve the problem? e.g. === public class RemoteDBConnections { private static RemoteDBConnections sInstance = new RemoteDBConnections(); private static int counter=0; private RemoteDBConnections() { System.out.println(counter = + (counter++)); }; public static synchronized RemoteDBConnections getInstance() { return sInstance; } } == Thanks in advance Elwin _ Search that pays you back! Introducing Live Search cashback. http://search.live.com/cashback/?pkw=form=MIJAAF/publ=HMTGL/crea=srchpaysyouback - 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: Error with content-type application/pdf and Internet Explorer
Date sent: Thu, 05 Jun 2008 10:36:32 +0200 From: Luis Pascual Forner [EMAIL PROTECTED] Subject:Error with content-type application/pdf and Internet Explorer To: Tomcat Users List users@tomcat.apache.org Send reply to: Tomcat Users List users@tomcat.apache.org Organization: IVAL informática http://www.ival. com Hello, The JSP script that follows produces an error when accessing with Internet Explorer: Your problem seems to be very similar to some previous postings, including this: http://www.nabble.com/PDF-problem-on-IE-from-JSP-td14879788.html I would search via google or one of the tomcat users archive. %@ page contentType=application/pdf % %@ page import=java.io.File % %@ page import=java.io.FileInputStream % %@ page import=java.io.InputStreamReader % % InputStreamReader in = new InputStreamReader( new FileInputStream(new File(document.pdf)), ISO-8859-1); char[] b = new char[128]; int i = in.read(b, 0, 128); while (i = 0) { out.write(b, 0, i); i = in.read(b, 0, 128); } in.close(); % More info: * Tomcat version: 5.5.26. * Internet Explorer open a download window, and then the error No puede descargar xx de www..es. El archivo no pudo ser escrito en la caché (my IE is localized in spanish). * The same script runs OK with Firefox in Linux and with Mozilla in Windows. * The same script runs OK with Internet Explorer and Tomcat 5.0.19 + Apache 2.0.49. * No messages in log. * In the conf/web.xml file appears the mime-type application/pdf. regards, Luis - 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]
PHP support in tomcat
Hi, is it possible to configure tomcat to support PHP? I need to execute some PHP scripts. The scripts should be located in the same directory with Java web application. Please send links onto howto if it is possible. Thanks! - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: PHP support in tomcat
It's possible with Quercus (PHP5 only): http://quercus.caucho.com regards, Stefan Oestreicher -- Dr. Maté GmbH Stefan Oestreicher / Entwicklung [EMAIL PROTECTED] http://www.netdoktor.at Tel Buero: + 43 1 405 55 75 24 Fax Buero: + 43 1 405 55 75 55 Alser Str. 4 1090 Wien Altes AKH Hof 1 1.6.6 -Ursprüngliche Nachricht- Von: Antonio Petrelli [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 05. Juni 2008 15:55 An: Tomcat Users List Betreff: Re: PHP support in tomcat 2008/6/5 Jury Levykin [EMAIL PROTECTED]: is it possible to configure tomcat to support PHP? GIYF: http://wiki.apache.org/tomcat/UsingPhp Antonio - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PHP support in tomcat
2008/6/5 Jury Levykin [EMAIL PROTECTED]: is it possible to configure tomcat to support PHP? GIYF: http://wiki.apache.org/tomcat/UsingPhp Antonio - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does HTTPRequest.getParameter() return encoded or decoded?
Sorry, I didn't fully specify the problem. I do refer to URI-(en|de)coding, not to character encoding issues. So, if I've understood the answers I've seen so far, the value returned by getParameter() should *not* be subjected to URI-decoding, because it has already been URI-decoded and doing so again would lead to trouble with a parameter value which, before URI-encoding, contained a percent character. I'm debugging code we got from elsewhere which URI-decodes stuff it got from getParameter(), and as I am not very familiar with the code in question and am only a beginner in working with servlet code myself I want to be very sure there is not a good reason for these calls. I think now I'm sure enough to take them out. Thanks! -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is intuitive he means the exact opposite. pgpTAr9oPO11H.pgp Description: PGP signature
RE: Singleton in Tomcat 6.0 not working
From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Get some hints from this link http://books.google.com/books?id=bgMKmsXVbTACpg=PA304vq=sing letondq=tomcat+6+singleton+not+workingsource=gbs_search_ssi g=t4ZT0XuVQsO2vs7PbKgTktLMarU#PPA141,M1 The above is why Mark T asked if your webapp was being deployed more than once. That would not explain why you're seeing the counter incremented twice; having the class loaded by separate classloaders would produce two print lines, but both of them would display a zero for the counter. There's something else going on here... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Single sign on issue with Tomcat and Apache
Many thanks to all of you for responding to my problem. I apologize, I hope I didnot mention my system architecture clearly. (As I mentioned, it is an old application, which was developed 9 yrs ago, and no documentation at all :-( ) I am accessing those applications like.. www.mywebsite.com/aaa - (aaa webapp) Its based on Tomcat FORM based authentication. (JDBC Realm) www.mywebsite.com/bbb - Here some static pages are deployed into Apache and based on BASIC authentication.(mod_auth_mysql) www.mywebsite.com/ccc - (ccc webapp) Here dynamic pages are deployed on Tomcat based on BASIC authentication.(JDBC Realm) All the above applications are using same usertable for credentials. Scenario 1: When I logs into the bbb, (Apache-BASIC) it is poping up a dialog box with username and password and after providing the details it is authenticating using mod_auth_mysql. I have a link to the ccc (Tomcat-BASIC) from bbb pages. When I clicked that link, I am able to navigate those pages without providing the credentials again. (I hope, here tomcat is finding auth headers which are set by Apache) Scenario 2: When I directly logs into ccc (Tomcat-BASIC) it is poping up a dialog box with username and password and after providing the details, it is authenticating using Tomcat BASIC authentication. If I click a link to bbb, I am able to navigate to it without providing the details 2nd time. (I hope, here Apache is finding the credentials which are set by Tomcat). Scenario 3: When I logs into aaa, (TOMCAT-FORM) after authentication, I am able to access ccc (TOMCAT-BASIC) without providing the credentials again. (I hope, here Tomcat is sharing the credentials between FORM and BASIC authentication credentials, as SingleSignOnValve is enabled). These Scenarios 1,2,3 are working perfectly, and I need those as is. Scenario 4: When I logs into aaa, (Tomcat-Form) after authentication, If I click a link to bbb (Apache-BASIC) again its poping up a window for username and password. This is (Scenario 4) what I need to change. When a user logs into aaa using Tomcat-Form based authentication and clicks a link to bbb, he should be directly allowed to it without asking the credentials 2nd time. Is there any way to do it, without modifying the Apache Authencitation? I am really sorry if I am confusing you. Please let me know still if you need any other details. Thanks, Sridhar Pid-2 wrote: Johnny Kewl wrote: - Original Message - From: Propes, Barry L [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Hi, I am integrating two websites using single sign on. I have two sites namely aaa.com and bbb.com. I enabled SingleSignOn valve in server.xml file, and trying to access Its not going to work... Its not because of TC, its because of the way cookies are handled by the browser. Its been a long long time since I wrote a filter to do this, and there are probably better third party products out there. But this is what I remember... The SingleSignOn is addressing the issue of sign on across web apps and within a single TC... not across machines. ie Tomcat has to at least be able to track the session. If thats covered then... Then and I forget the terminology. A browser will consider this the same domain aaa.com/webapp/servlet1 aaa.com/webapp/servlet2 and I think even aaa.com/webapp2/servlet1 but as soon as that becomes bbb.com the browser treats it like a stranger and does not return the session key, nor auth info for the other domain... so TC/Apache is screwed because the browser doesnt want to play. Vaguely I remember setting persistent cookies in the browser, and then tracking my own cookies across machines... but it also meant a complete redo of all the security and TC's generic security could not be used. I remember seeing thrid party tools... but if you cant change the one webapp, you into something really creative, creating a filter wont work because security happens before the filter you have a creative problem on your hands ;) E.g. OpenID, JOSSO etc Search google for Java Single Sign On. As has been stated, SingleSignOnValve isn't a true SSO solution. p I think if you can put TC behind Apache, thus getting it back to the same domain name, and the distinguishing only on sub context... ie aaa.com/images/in apache aaa.com/webapp/someservlet and the call is passed thru to TC Then the browser will like it and return the authentication details otherwise is going to be some kind of complex proxy type thing to trick the browser. Good luck... --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
Re: PHP support in tomcat
Jury Levykin wrote: is it possible to configure tomcat to support PHP? I need to execute some PHP scripts. The scripts should be located in the same directory with Java web application. Well, I just don't believe it will work correctly. I'd rather do one of the following: 1. run apache httpd with php in front and then mod_proxy_ajp to tomcat. httpd's mod_rewrite is very very flexible 2. run tomcat in front and implement a proxy filter which will do the proxying requests to other apache httpd with php -- Mikolaj Rydzewski [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: JMX Perform GC TOMCAT 5.5.23
From: Michael Simmons [mailto:[EMAIL PROTECTED] Subject: RE: JMX Perform GC TOMCAT 5.5.23 So.. giving the JVM many 1000s of times the space taken by live objects (even under very high load) is a waste. Not at all. Having lots of room for short-lived object creation extends the time between GCs. Should I have said Allocating a huge amount of memory to the JVM isn't always useful.? Depends on the characteristics of the application. Usually, the largest heap possible that doesn't push the system in paging is the most efficient. In my experience using UseConcMarkSweepGC (or whatever it is under 1.6) and tuning the Eden heap size does make a big difference to a server application (tomcat) under continuous high load. Not unexpected. The concurrent GC mechanism is designed to minimize pause times but at the expense of quite a bit more overhead during collections. It's not on by default because of the throughput impact; if response time is more important than throughput, then it *might* be useful to enable the concurrent algorithm. You'd have to test in your own environment to see if it's beneficial. Changing the eden size can also have a dramatic effect on GC frequency, since nearly all objects are created in eden and then moved to a survivor space when eden fills (if still referenceable). If there's an imbalance between eden, survivor, and tenured space sizes, GC efficiency can fall off rapidly. The GC ergonomics feature in 1.5 and 1.6 is an ongoing effort by the HotSpot developers to dynamically balance the heap regions based on current conditions within the JVM; specifying explicit sizes for any of the regions may well end up with worse performance than just letting GC figure it out. If your webapps create lots of short-lived objects, you might want to experiment with different values for TLABSize; we found that had a major affect on performance in multi-processor systems. Also try setting -XX:+AggressiveHeap; it may or may not be beneficial, depending on your situation. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Obtaining the app server install path from the running servlet
From: Darrell Esau [mailto:[EMAIL PROTECTED] Subject: Obtaining the app server install path from the running servlet I'm not sure if this is possible, and I realize it'll be container specific, but I'm wondering if it's possible to find the app server's install path from the servlet code. The installation path is set in the catalina.base and catalina.home system properties. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Get bean from ServletContext on context destruction
Hy! I have a bean on a jsp page (jsp:UseBean) , with application scope, that uses some resources that must be freed when the application is stopped/reset. I'm currently using a context listener to detect when does the servelt context gets destroyed, but I cannot get the bean from it. What I want to accomplish is: 1:public void contextDestroyed(ServletContextEvent e){ 2: ServletContext t = e.getServletContext(); 3: myBean b =(myBean)t.getAttribute(newsbean); 4: if(b!=null){ 5: System.out.println(Bean is: +(b.holdsResource() ? !ok : ok)); 6: }else{ 7: System.out.println(No bean =(); 8: } 9:} where line 3 should do the trick. How can this be done? Googling only turned up the reverse, accessing context from a bean, and the listener is by the webapp in web.xml. Thanks, nam3l3ss - 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: PHP support in tomcat
- Original Message - From: Jury Levykin [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, June 05, 2008 3:50 PM Subject: PHP support in tomcat Hi, is it possible to configure tomcat to support PHP? I need to execute some PHP scripts. The scripts should be located in the same directory with Java web application. Please send links onto howto if it is possible. Thanks! Jury Not a very popular technology on TC. I think because Apache httpd (likes PHP) and TC(servlets) are so well integrated. Its less hassle to use both. Resin a competitor to Tomcat has a thing called Quercus and they offer paid support. I like Caucho's innovations but even there I think you will find PHP a subset of HTTPd Quercus Caucho does seem to be a more popular servlet solution. I dont think Apache (the organization) itself has ever made a servlet to run PHP, they do have one for CGI (built into tomcat). Google doesnt lie, and the PHP articles on tomcat are scarce, which means you may find it very lonely out there ;) The Httpd Apache (php) - jk - tomcat type solution seems to be the most popular solution. I wouldnt recommend PHP on tomcat, although some have done it. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - 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: Singleton in Tomcat 6.0 not working
ktou Ho wrote: The problem I am facing is the Singleton is not working at all in the servlet. I tried to synchnozed the constructor or make it static. I still get two instances of the objects. How can I solve the problem? Is anyone able to reproduce this? public class RemoteDBConnections { private static RemoteDBConnections sInstance = new RemoteDBConnections(); private static int counter=0; private RemoteDBConnections() { System.out.println(counter = + (counter++)); Add following line (assuming you do not override default toString method): System.out.println(this.toString()); and compare results. -- Mikolaj Rydzewski [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: PHP support in tomcat
Check out jbossweb.It's a fork of tomcat and has support for running php. -Original Message- From: Johnny Kewl [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2008 9:57 AM To: Tomcat Users List Subject: Re: PHP support in tomcat - Original Message - From: Jury Levykin [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, June 05, 2008 3:50 PM Subject: PHP support in tomcat Hi, is it possible to configure tomcat to support PHP? I need to execute some PHP scripts. The scripts should be located in the same directory with Java web application. Please send links onto howto if it is possible. Thanks! Jury Not a very popular technology on TC. I think because Apache httpd (likes PHP) and TC(servlets) are so well integrated. Its less hassle to use both. Resin a competitor to Tomcat has a thing called Quercus and they offer paid support. I like Caucho's innovations but even there I think you will find PHP a subset of HTTPd Quercus Caucho does seem to be a more popular servlet solution. I dont think Apache (the organization) itself has ever made a servlet to run PHP, they do have one for CGI (built into tomcat). Google doesnt lie, and the PHP articles on tomcat are scarce, which means you may find it very lonely out there ;) The Httpd Apache (php) - jk - tomcat type solution seems to be the most popular solution. I wouldnt recommend PHP on tomcat, although some have done it. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - 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: Get bean from ServletContext on context destruction
Nam3l3ss wrote: I have a bean on a jsp page (jsp:UseBean) , with application scope, that uses some resources that must be freed when the application is stopped/reset. I'm currently using a context listener to detect when does the servelt context gets destroyed, but I cannot get the bean from it. Do I understand you correctly: you create a bean in JSP page and then you want to destroy it in listener? I usually do both in listener. -- Mikolaj Rydzewski [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: Singleton in Tomcat 6.0 not working
- Original Message - From: Mikolaj Rydzewski [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, June 05, 2008 5:06 PM Subject: Re: Singleton in Tomcat 6.0 not working ktou Ho wrote: The problem I am facing is the Singleton is not working at all in the servlet. I tried to synchnozed the constructor or make it static. I still get two instances of the objects. How can I solve the problem? Is anyone able to reproduce this? No, for fun I gave it a spin... it worked, one count Think ktou is going to have to post his code Like chuck said, something fishy ;) On NB its easy to mistakenly set up glassfish as the server - ha ha public class RemoteDBConnections { private static RemoteDBConnections sInstance = new RemoteDBConnections(); private static int counter=0; private RemoteDBConnections() { System.out.println(counter = + (counter++)); Add following line (assuming you do not override default toString method): System.out.println(this.toString()); and compare results. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - 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: Single sign on issue with Tomcat and Apache
sridharmnj wrote: Many thanks to all of you for responding to my problem. I apologize, I hope I didnot mention my system architecture clearly. (As I mentioned, it is an old application, which was developed 9 yrs ago, and no documentation at all :-( ) I am accessing those applications like.. www.mywebsite.com/aaa - (aaa webapp) Its based on Tomcat FORM based authentication. (JDBC Realm) www.mywebsite.com/bbb - Here some static pages are deployed into Apache and based on BASIC authentication.(mod_auth_mysql) www.mywebsite.com/ccc - (ccc webapp) Here dynamic pages are deployed on Tomcat based on BASIC authentication.(JDBC Realm) That makes it clearer, and provides some good news also. What I guess from the above is : - there is only one Apache, and one Tomcat, on the same physical server - there are no Apache VirtualHosts (or there is only one), and there is only one Tomcat Host section in server.xml - the back-end for the authentication is the same MySql database system, and the same table. In one case it is accessed by an Apache module (mod_auth_mysql), in the other by some Java module under Tomcat (that's my own weak point by the way, I'm not really a Java/Tomcat guy) - there is only one single DNS domain (which simplifies certain issues) - all authentication is of type Basic, which means based on the exchange of HTTP headers from browser to server. But that last item troubles me. I believe that you mentioned initially that the Tomcat authentication of www.mywebsite.com/aaa was Basic, even if it is form-based. That troubles me because, as far as I know, that cannot be the case. There must be some other mechanism used there, and that may be the very base of your problem. My guess at this point is that the form-based authentication sets the credentials in Tomcat, and keeps these alive in some form of Tomcat session mechanism, but that it is never seen by the browser as a Basic authentication. In other words, the browser knows nothing about it, and so can never pass this authentication from aaa to bbb. If so, a very quick fix, would be to change the authentication setup of your aaa webapp (in webapps/aaa/WEB-INF/web.xml), to make it the same as in webapps ccc (webapps/aaa/WEB-INF/web.xml). It's in the section at the end, in security-constraints or something. The only visible difference in application aaa, would be that instead of receiving the html login form, the user would see the same browser popup than for application bbb and ccc. You do not need to change the webapp application itself for this, just the web.xml, and restart Tomcat, and maybe it will just magically start working !! ?? Go on, try it, I'm curious ! If it works, then I will explain why. But it would be consistent with the detailed explanation that you give below, of the behaviour of the different applications. If that does not work, then there are still a couple of details missing. Can you then give us a copy of the relevant sections of the Apache configuration (simplified/edited if you want), showing how exactly the requests that initially all go through Apache (I suppose from the above), get passed to Tomcat if needed ? There should be things like this : Location /aaa JkMount /aaa ajp13 JkMount /aaa/* ajp13 ... /Location Location /bbb AuthType Basic Require valid-user ... /Location (or, maybe, it is not JkMount and it is some other Apache-Tomcat connector ?) André All the above applications are using same usertable for credentials. Scenario 1: When I logs into the bbb, (Apache-BASIC) it is poping up a dialog box with username and password and after providing the details it is authenticating using mod_auth_mysql. I have a link to the ccc (Tomcat-BASIC) from bbb pages. When I clicked that link, I am able to navigate those pages without providing the credentials again. (I hope, here tomcat is finding auth headers which are set by Apache) Scenario 2: When I directly logs into ccc (Tomcat-BASIC) it is poping up a dialog box with username and password and after providing the details, it is authenticating using Tomcat BASIC authentication. If I click a link to bbb, I am able to navigate to it without providing the details 2nd time. (I hope, here Apache is finding the credentials which are set by Tomcat). Scenario 3: When I logs into aaa, (TOMCAT-FORM) after authentication, I am able to access ccc (TOMCAT-BASIC) without providing the credentials again. (I hope, here Tomcat is sharing the credentials between FORM and BASIC authentication credentials, as SingleSignOnValve is enabled). These Scenarios 1,2,3 are working perfectly, and I need those as is. Scenario 4: When I logs into aaa, (Tomcat-Form) after authentication, If I click a link to bbb (Apache-BASIC) again its poping up a window for username and password. This is (Scenario 4) what I need to change. When a user logs into aaa using Tomcat-Form based authentication and clicks a link to bbb, he should be directly
Re: Single sign on issue with Tomcat and Apache
- Original Message - From: sridharmnj [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, June 05, 2008 4:33 PM Subject: Re: Single sign on issue with Tomcat and Apache Many thanks to all of you for responding to my problem. I apologize, I hope I didnot mention my system architecture clearly. (As I mentioned, it is an old application, which was developed 9 yrs ago, and no documentation at all :-( ) I am accessing those applications like.. www.mywebsite.com/aaa - (aaa webapp) Its based on Tomcat FORM based authentication. (JDBC Realm) www.mywebsite.com/bbb - Here some static pages are deployed into Apache and based on BASIC authentication.(mod_auth_mysql) www.mywebsite.com/ccc - (ccc webapp) Here dynamic pages are deployed on Tomcat based on BASIC authentication.(JDBC Realm) All the above applications are using same usertable for credentials. Scenario 1: When I logs into the bbb, (Apache-BASIC) it is poping up a dialog box with username and password and after providing the details it is authenticating using mod_auth_mysql. I have a link to the ccc (Tomcat-BASIC) from bbb pages. When I clicked that link, I am able to navigate those pages without providing the credentials again. (I hope, here tomcat is finding auth headers which are set by Apache) Scenario 2: When I directly logs into ccc (Tomcat-BASIC) it is poping up a dialog box with username and password and after providing the details, it is authenticating using Tomcat BASIC authentication. If I click a link to bbb, I am able to navigate to it without providing the details 2nd time. (I hope, here Apache is finding the credentials which are set by Tomcat). Scenario 3: When I logs into aaa, (TOMCAT-FORM) after authentication, I am able to access ccc (TOMCAT-BASIC) without providing the credentials again. (I hope, here Tomcat is sharing the credentials between FORM and BASIC authentication credentials, as SingleSignOnValve is enabled). These Scenarios 1,2,3 are working perfectly, and I need those as is. Scenario 4: When I logs into aaa, (Tomcat-Form) after authentication, If I click a link to bbb (Apache-BASIC) again its poping up a window for username and password. sridharmnj Ok this is very different to what we first thought. This is a guess... I think the problem is that you mixing auth methods... You have to make them all BASIC in this case. The browser is on the same domain... so I think it will be returning the auth header info, can check with a dump valve or get wireshark and just make sure it is returning header info... but I think it is, the problem is that the auth info is not the same. I've never used FORM authentication, but I guess it just reads the UID and Password fields and then TC starts tracking that cookie as authenticated. BASIC does not do that... there the browser returns a Base64 encoded mash and that is interpreted. So if you go to say ccc (BASIC) and then bbb (BASIC). you havnt said... but I think that will work. But when you go to FORM all the browser sends Apache is a little old cookie... and the BASIC logic will go what the hell... and challenges the browser. So the initial thought that it was a domain problem is not correct... you just mixing incompatible auth schemes. I think you have to lose the FORM auth... and even though you cant change the web app, I think that is is possible externally... all thats going to happen is that the browser pops up a password box... and that auth FORM is now going to be redundant. I think the FORM auth has to go, must be made BASIC... my guess. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - 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: Relative internal links
I am talking about servlet code and configuration file information and links in the htlm pages on the server under the root directory. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 5:00 PM To: Tomcat Users List Subject: Re: Relative internal links You mention links like ../webapps/MCRCServlets/logs/MCRCServlets.log which implies these are presented in the browser, but then your talk about absolute paths like C:/www/ implying a local read of the file system. These don't normally go together. Could you clarify how you are using these paths (from browser or servlet code)? --David Walter Thompson wrote: I have run into an issue with Tomcat6. In Tomcat5 we were using links like ../webapps/MCRCServlets/logs/MCRCServlet.log in the Java Code. I copied all of the folders over from Tomcat5 to Tomcat6 so that they have the same directory structure: webapps root MCRCServlets Balancer In all of the Java Code for the servlets and config files I have had to put absolute paths in like C:/www/Tomcat6/MCRCSerlets/logs/MCRCServlet.log for it to find the files. Is there a configuration file that I can change to make the relative references work? What would the config code would I add? I have searched everywhere for an answer to this quest and found no answers. Thanks for any help anyone can offer! Walter Thompson Midland Certified Reagent Company 3112 W Cuthbert Avenue Midland, Texas 79701 432-694-7950 Ph 432-694-2387 Fx - 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: Does HTTPRequest.getParameter() return encoded or decoded?
Correct. With regard to URI encoded GET requests, what you get from request.getParameter() is already decoded for %nn character encoding among others. No need to decode it again. --David Mark H. Wood wrote: Sorry, I didn't fully specify the problem. I do refer to URI-(en|de)coding, not to character encoding issues. So, if I've understood the answers I've seen so far, the value returned by getParameter() should *not* be subjected to URI-decoding, because it has already been URI-decoded and doing so again would lead to trouble with a parameter value which, before URI-encoding, contained a percent character. I'm debugging code we got from elsewhere which URI-decodes stuff it got from getParameter(), and as I am not very familiar with the code in question and am only a beginner in working with servlet code myself I want to be very sure there is not a good reason for these calls. I think now I'm sure enough to take them out. Thanks! - 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: Single sign on issue with Tomcat and Apache
sridharmnj wrote: Many thanks to all of you for responding to my problem. I apologize, I hope I didnot mention my system architecture clearly. (As I mentioned, it is an old application, which was developed 9 yrs ago, and no documentation at all :-( ) I am accessing those applications like.. www.mywebsite.com/aaa - (aaa webapp) Its based on Tomcat FORM based authentication. (JDBC Realm) www.mywebsite.com/bbb - Here some static pages are deployed into Apache and based on BASIC authentication.(mod_auth_mysql) www.mywebsite.com/ccc - (ccc webapp) Here dynamic pages are deployed on Tomcat based on BASIC authentication.(JDBC Realm) All the above applications are using same usertable for credentials. Scenario 1: When I logs into the bbb, (Apache-BASIC) it is poping up a dialog box with username and password and after providing the details it is authenticating using mod_auth_mysql. I have a link to the ccc (Tomcat-BASIC) from bbb pages. When I clicked that link, I am able to navigate those pages without providing the credentials again. (I hope, here tomcat is finding auth headers which are set by Apache) Scenario 2: When I directly logs into ccc (Tomcat-BASIC) it is poping up a dialog box with username and password and after providing the details, it is authenticating using Tomcat BASIC authentication. If I click a link to bbb, I am able to navigate to it without providing the details 2nd time. (I hope, here Apache is finding the credentials which are set by Tomcat). Scenario 3: When I logs into aaa, (TOMCAT-FORM) after authentication, I am able to access ccc (TOMCAT-BASIC) without providing the credentials again. (I hope, here Tomcat is sharing the credentials between FORM and BASIC authentication credentials, as SingleSignOnValve is enabled). These Scenarios 1,2,3 are working perfectly, and I need those as is. Scenario 4: When I logs into aaa, (Tomcat-Form) after authentication, If I click a link to bbb (Apache-BASIC) again its poping up a window for username and password. This is (Scenario 4) what I need to change. When a user logs into aaa using Tomcat-Form based authentication and clicks a link to bbb, he should be directly allowed to it without asking the credentials 2nd time. Is there any way to do it, without modifying the Apache Authencitation? Not to my knowledge. AFAIK Tomcat sets a user principal that is not visible to the HTTPD server's authentication/authorization module. HTTPD's authenticated remote user header can be visible downwards to the container with the right configuration, and the two Tomcat webapps can co-operate, but I don't believe that there is anything in JK to allow it to propagate a principal upwards. Maybe one of the mod_jk committers has better info. p I am really sorry if I am confusing you. Please let me know still if you need any other details. Thanks, Sridhar Pid-2 wrote: Johnny Kewl wrote: - Original Message - From: Propes, Barry L [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Hi, I am integrating two websites using single sign on. I have two sites namely aaa.com and bbb.com. I enabled SingleSignOn valve in server.xml file, and trying to access Its not going to work... Its not because of TC, its because of the way cookies are handled by the browser. Its been a long long time since I wrote a filter to do this, and there are probably better third party products out there. But this is what I remember... The SingleSignOn is addressing the issue of sign on across web apps and within a single TC... not across machines. ie Tomcat has to at least be able to track the session. If thats covered then... Then and I forget the terminology. A browser will consider this the same domain aaa.com/webapp/servlet1 aaa.com/webapp/servlet2 and I think even aaa.com/webapp2/servlet1 but as soon as that becomes bbb.com the browser treats it like a stranger and does not return the session key, nor auth info for the other domain... so TC/Apache is screwed because the browser doesnt want to play. Vaguely I remember setting persistent cookies in the browser, and then tracking my own cookies across machines... but it also meant a complete redo of all the security and TC's generic security could not be used. I remember seeing thrid party tools... but if you cant change the one webapp, you into something really creative, creating a filter wont work because security happens before the filter you have a creative problem on your hands ;) E.g. OpenID, JOSSO etc Search google for Java Single Sign On. As has been stated, SingleSignOnValve isn't a true SSO solution. p I think if you can put TC behind Apache, thus getting it back to the same domain name, and the distinguishing only on sub context... ie aaa.com/images/in apache aaa.com/webapp/someservlet and the call is passed thru to TC Then the browser will like it and return the authentication details otherwise is going to be some kind of complex
Re: Relative internal links
So we are still dealing with two separate issues here. a) relative links in the browser -- these are expanded to full URIs by the browser based on the current page's uri and the link's relative uri. Nothing tomcat can do about that and nothing that should behaviorally change from tomcat 5 to tomcat 6. b) relative file paths in servlet code -- relative paths are flaky no matter what version of tomcat you use since it dependes on the working directory at the time tomcat was started as opposed to the webapp's path or current file's path. I'd highly recommend using ServletContext.getResource() or ServletContext.getResourceAsStream() to read files stored within the webapp. Both will properly provide access to resources within the same webapp. Just use the full path relative to the top of your webapp like '/logs/MCRCServlets.log'. --David Walter Thompson wrote: I am talking about servlet code and configuration file information and links in the htlm pages on the server under the root directory. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 5:00 PM To: Tomcat Users List Subject: Re: Relative internal links You mention links like ../webapps/MCRCServlets/logs/MCRCServlets.log which implies these are presented in the browser, but then your talk about absolute paths like C:/www/ implying a local read of the file system. These don't normally go together. Could you clarify how you are using these paths (from browser or servlet code)? --David Walter Thompson wrote: I have run into an issue with Tomcat6. In Tomcat5 we were using links like ../webapps/MCRCServlets/logs/MCRCServlet.log in the Java Code. I copied all of the folders over from Tomcat5 to Tomcat6 so that they have the same directory structure: webapps root MCRCServlets Balancer In all of the Java Code for the servlets and config files I have had to put absolute paths in like C:/www/Tomcat6/MCRCSerlets/logs/MCRCServlet.log for it to find the files. Is there a configuration file that I can change to make the relative references work? What would the config code would I add? I have searched everywhere for an answer to this quest and found no answers. Thanks for any help anyone can offer! Walter Thompson Midland Certified Reagent Company 3112 W Cuthbert Avenue Midland, Texas 79701 432-694-7950 Ph 432-694-2387 Fx - 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: Singleton in Tomcat 6.0 not working
Have you tried to put in it the ROOT? I guess may be something work it that. Also I created a filter (MyFilter) to test it, the following got executed twice : - MyFilter.init() line: 30 NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native method] NativeConstructorAccessorImpl.newInstance(Object[]) line: 39 DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 27 ConstructorT.newInstance(Object...) line: 513 ClassT.newInstance0() line: 355 ClassT.newInstance() line: 308 ApplicationFilterConfig.getFilter() line: 255 ApplicationFilterConfig.setFilterDef(FilterDef) line: 397 ApplicationFilterConfig.init(Context, FilterDef) line: 108 StandardContext.filterStart() line: 3709 StandardContext.start() line: 4356 StandardHost(ContainerBase).start() line: 1045 StandardHost.start() line: 719 StandardEngine(ContainerBase).start() line: 1045 StandardEngine.start() line: 443 StandardService.start() line: 516 StandardServer.start() line: 710 Catalina.start() line: 578 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Bootstrap.start() line: 288 Bootstrap.main(String[]) line: 413 -- From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Singleton in Tomcat 6.0 not working Date: Thu, 5 Jun 2008 17:19:57 +0200 - Original Message - From: Mikolaj Rydzewski [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, June 05, 2008 5:06 PM Subject: Re: Singleton in Tomcat 6.0 not workingktou Ho wrote: The problem I am facing is the Singleton is not working at all in the servlet. I tried to synchnozed the constructor or make it static. I still get two instances of the objects. How can I solve the problem? Is anyone able to reproduce this? No, for fun I gave it a spin... it worked, one count Think ktou is going to have to post his code Like chuck said, something fishy ;) On NB its easy to mistakenly set up glassfish as the server - ha hapublic class RemoteDBConnections { private static RemoteDBConnections sInstance = new RemoteDBConnections(); private static int counter=0; private RemoteDBConnections() { System.out.println(counter = + (counter++)); Add following line (assuming you do not override default toString method): System.out.println(this.toString()); and compare results. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Now you can invite friends from Facebook and other groups to join you on Windows Live™ Messenger. Add now. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_AddNow_Now
RE: Singleton in Tomcat 6.0 not working
I tried to change the web app to other name, it works fine now. (only one instance). Look like it is the ROOT cause all problem. Any one know why the ROOT is being called twice? Thanks Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: RE: Singleton in Tomcat 6.0 not working Date: Thu, 5 Jun 2008 17:03:30 + Have you tried to put in it the ROOT? I guess may be something work it that. Also I created a filter (MyFilter) to test it, the following got executed twice : - MyFilter.init() line: 30 NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native method] NativeConstructorAccessorImpl.newInstance(Object[]) line: 39 DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 27 ConstructorT.newInstance(Object...) line: 513 ClassT.newInstance0() line: 355 ClassT.newInstance() line: 308 ApplicationFilterConfig.getFilter() line: 255 ApplicationFilterConfig.setFilterDef(FilterDef) line: 397 ApplicationFilterConfig.init(Context, FilterDef) line: 108 StandardContext.filterStart() line: 3709 StandardContext.start() line: 4356 StandardHost(ContainerBase).start() line: 1045 StandardHost.start() line: 719 StandardEngine(ContainerBase).start() line: 1045 StandardEngine.start() line: 443 StandardService.start() line: 516 StandardServer.start() line: 710 Catalina.start() line: 578 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 597 Bootstrap.start() line: 288 Bootstrap.main(String[]) line: 413 -- From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Singleton in Tomcat 6.0 not working Date: Thu, 5 Jun 2008 17:19:57 +0200 - Original Message - From: Mikolaj Rydzewski [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, June 05, 2008 5:06 PM Subject: Re: Singleton in Tomcat 6.0 not workingktou Ho wrote: The problem I am facing is the Singleton is not working at all in the servlet. I tried to synchnozed the constructor or make it static. I still get two instances of the objects. How can I solve the problem? Is anyone able to reproduce this? No, for fun I gave it a spin... it worked, one count Think ktou is going to have to post his code Like chuck said, something fishy ;) On NB its easy to mistakenly set up glassfish as the server - ha hapublic class RemoteDBConnections { private static RemoteDBConnections sInstance = new RemoteDBConnections(); private static int counter=0; private RemoteDBConnections() { System.out.println(counter = + (counter++)); Add following line (assuming you do not override default toString method): System.out.println(this.toString()); and compare results. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Now you can invite friends from Facebook and other groups to join you on Windows Live™ Messenger. Add now. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_AddNow_Now _ Now you can invite friends from Facebook and other groups to join you on Windows Live™ Messenger. Add now. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_AddNow_Now
RE: Singleton in Tomcat 6.0 not working
From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Have you tried to put in it the ROOT? Yes, I've tried putting it in ROOT, and I get only a single instance, using Tomcat 6.0.16 under JDK 1.6.0_06. For more information, add these lines to your constructor, immediately after printing out the counter: StackTraceElement[] traces = Thread.currentThread().getStackTrace(); for (StackTraceElement ste : traces) System.out.println( + ste); This is what mine displays: counter = 0 java.lang.Thread.getStackTrace(Thread.java:1426) RemoteDBConnections.init(RemoteDBConnections.java:9) RemoteDBConnections.clinit(RemoteDBConnections.java:3) Hello.doGet(Hello.java:84) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568) org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) java.lang.Thread.run(Thread.java:619) I'm not using any filters. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Singleton in Tomcat 6.0 not working
I got twice of the following: == [EMAIL PROTECTED] java.lang.Thread.getStackTrace(Thread.java:1426) com.elwin.RemoteDBConnections.init(RemoteDBConnections.java:30) com.elwin.sql.RemoteDBConnections.clinit(RemoteDBConnections.java:22) com.elwin.ElwinFilter.readConfig(ElwinFilter.java:52) com.elwin.ElwinFilter.init(ElwinFilter.java:31) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) java.lang.Class.newInstance0(Class.java:355) java.lang.Class.newInstance(Class.java:308) org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:255) org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:108) org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709) org.apache.catalina.core.StandardContext.start(StandardContext.java:4356) org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) org.apache.catalina.core.StandardHost.start(StandardHost.java:719) org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) org.apache.catalina.core.StandardService.start(StandardService.java:516) org.apache.catalina.core.StandardServer.start(StandardServer.java:710) org.apache.catalina.startup.Catalina.start(Catalina.java:578) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) = Thanks Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Date: Thu, 5 Jun 2008 12:11:24 -0500 Subject: RE: Singleton in Tomcat 6.0 not working From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Have you tried to put in it the ROOT? Yes, I've tried putting it in ROOT, and I get only a single instance, using Tomcat 6.0.16 under JDK 1.6.0_06. For more information, add these lines to your constructor, immediately after printing out the counter: StackTraceElement[] traces = Thread.currentThread().getStackTrace(); for (StackTraceElement ste : traces) System.out.println( + ste); This is what mine displays: counter = 0 java.lang.Thread.getStackTrace(Thread.java:1426) RemoteDBConnections.init(RemoteDBConnections.java:9) RemoteDBConnections.clinit(RemoteDBConnections.java:3) Hello.doGet(Hello.java:84) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568) org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) java.lang.Thread.run(Thread.java:619) I'm not using any filters. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Now you can invite friends from Facebook and other groups to join you on Windows Live™ Messenger. Add now. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_AddNow_Now
Re: request for simplistic Tomcat 5.5 log config
André Warnier wrote: (This is Linux Debian Etch, with Tomcat5.5 out of the box, standard apt-get install.) Without knowing if/how 5.5.x has been mangled by the packaging process it is going to be difficult to help you. The packaging process tends to play all sorts of games with file locations and default configurations. If you use a packaged version rather than the standard tar you limit the pool of people able to help to those running the same package as you. If you can, switch to the standard tar.gz from one of the Apache mirrors. 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: Singleton in Tomcat 6.0 not working
From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working I got twice of the following: == com.elwin.sql.RemoteDBConnections.clinit(RemoteDBConnections.java:22) Let's double-check here: both traces include the clinit call for RemoteDBConnections? Exactly which JDK do you have installed? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem regarding the connector..
Hi installed apache and tomcat in my unix systems... and i m trying to connect them using the mod_jk... I had set JkMount to the appropriate workers1 in the httpd.conf filebut still whenever i type the URL the apache is not redirecting it to the tomcat... Can anyone let me know where would the error be...?? Thanks Ramya
RE: Singleton in Tomcat 6.0 not working
And yes, both have the clinit call. I double checked, both trace log are exact the same. Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Date: Thu, 5 Jun 2008 12:30:53 -0500 Subject: RE: Singleton in Tomcat 6.0 not working From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working I got twice of the following: == com.elwin.sql.RemoteDBConnections.clinit(RemoteDBConnections.java:22) Let's double-check here: both traces include the clinit call for RemoteDBConnections? Exactly which JDK do you have installed? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends
Re: Problem regarding the connector..
ramya lekha wrote: Hi installed apache and tomcat in my unix systems... and i m trying to connect them using the mod_jk... I had set JkMount to the appropriate workers1 in the httpd.conf filebut still whenever i type the URL the apache is not redirecting it to the tomcat... Can anyone let me know where would the error be...?? Somewhere in your configuration? The people on this list are good but they aren't psychic ;) You'll need to post the relevant extracts from your configuration files. 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: Singleton in Tomcat 6.0 not working
From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Context from the server.xml Context docBase=ROOT path=/ROOT reloadable=true source=org.eclipse.jst.jee.server:ROOT//Host Right there is a problem: the path attribute should be , not /ROOT, when you're defining the default webapp. However, you should never be putting Context elements in server.xml; the Context element belongs in the webapp's META-INF/context.xml file, if you need it at all. When the Context element is not in server.xml, you must not use the docBase or path attributes; also note that there is no source attribute for the Context element, so all it should contain is the reloadable setting. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Singleton in Tomcat 6.0 not working
From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working -- Filter--- public class ElwinFilter implements Filter -- web.xml - filter filter-nameElwin Filter/filter-name filter-class com.elwin.IMeraFilter /filter-class Looks like you're not giving us exactly what you are running. For example, both the filter and the RemoteDBConnections sources omit any package statements, and the declared filter-class doesn't match the name of the filter class. Your credibility just took a hit. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Singleton in Tomcat 6.0 not working
Did you mean I should just remove this Context element from the server.xml? Thanks Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Date: Thu, 5 Jun 2008 12:55:58 -0500 Subject: RE: Singleton in Tomcat 6.0 not working From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Context from the server.xml Context docBase=ROOT path=/ROOT reloadable=true source=org.eclipse.jst.jee.server:ROOT//Host Right there is a problem: the path attribute should be , not /ROOT, when you're defining the default webapp. However, you should never be putting Context elements in server.xml; the Context element belongs in the webapp's META-INF/context.xml file, if you need it at all. When the Context element is not in server.xml, you must not use the docBase or path attributes; also note that there is no source attribute for the Context element, so all it should contain is the reloadable setting. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Enjoy 5 GB of free, password-protected online storage. http://www.windowslive.com/skydrive/overview.html?ocid=TXT_TAGLM_WL_Refresh_skydrive_062008
RE: Singleton in Tomcat 6.0 not working
I changed the package name. (by only removed the compay name), as I am not supposed to expose the source code. Sorry about that. Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Date: Thu, 5 Jun 2008 13:08:14 -0500 Subject: RE: Singleton in Tomcat 6.0 not working From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working -- Filter--- public class ElwinFilter implements Filter -- web.xml - filter filter-nameElwin Filter/filter-name filter-class com.elwin.IMeraFilter /filter-class Looks like you're not giving us exactly what you are running. For example, both the filter and the RemoteDBConnections sources omit any package statements, and the declared filter-class doesn't match the name of the filter class. Your credibility just took a hit. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends
RE: Singleton in Tomcat 6.0 not working
From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Did you mean I should just remove this Context element from the server.xml? You should never have put it in there, so definitely remove it. If you need to set the reloadable attribute, then put just this: Context reloadable=true/ in the file META-INF/context.xml inside the webapp. Note that setting reloadable incurs some additional overhead inside Tomcat, so it is normally not used for production. The doc reference: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Singleton in Tomcat 6.0 not working
It works. You are the best : Thanks a lot. Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Date: Thu, 5 Jun 2008 13:15:03 -0500 Subject: RE: Singleton in Tomcat 6.0 not working From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Did you mean I should just remove this Context element from the server.xml? You should never have put it in there, so definitely remove it. If you need to set the reloadable attribute, then put just this: Context reloadable=true/ in the file META-INF/context.xml inside the webapp. Note that setting reloadable incurs some additional overhead inside Tomcat, so it is normally not used for production. The doc reference: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ It’s easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow
RE: Singleton in Tomcat 6.0 not working
By the way, I was using the Eclipse 3.3, it integrated the Tomcat development tool. It was the Eclipse add that line to the server.xml. May be we need to let them know about this. Thanks Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Date: Thu, 5 Jun 2008 13:15:03 -0500 Subject: RE: Singleton in Tomcat 6.0 not working From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Did you mean I should just remove this Context element from the server.xml? You should never have put it in there, so definitely remove it. If you need to set the reloadable attribute, then put just this: Context reloadable=true/ in the file META-INF/context.xml inside the webapp. Note that setting reloadable incurs some additional overhead inside Tomcat, so it is normally not used for production. The doc reference: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends
It��s amazing, apache make TC performance decrease dramatically.
Hi, all I post a topic about the performance of apache+mod_jk_tomcat yesterday, and just now, I tried apache ab as the tool to do a benchmark. But the result is amazing. My steps: 1, Using a jsp as the target ONE. 1.1, ab ¨Cn 25000 ¨Cc 1000 URL_via_apache Concurrency Level: 1000 Time taken for tests: 410.105255 seconds Complete requests: 25000 1.2,ab ¨Cn 25000 ¨Cc 1000 URL_direct_to_tomcat Concurrency Level: 1000 Time taken for tests: 12.297322 seconds Complete requests: 25000 2, Using a html page as the target TWO. 2.1, ab ¨Cn 25000 ¨Cc 1000 URL_via_apache Concurrency Level: 1000 Time taken for tests: 25.655253 seconds Complete requests: 25000 2.2, ab ¨Cn 25000 ¨Cc 1000 URL_direct_to_tomcat Concurrency Level: 1000 Time taken for tests: 24.132493 seconds Complete requests: 25000 So this really make me amazing and there are two questions: 1, According to my configurations, apache(2.2.4) has NO advantage against tomcat(5.5.15) in processing static content. 2, In processing dynamic content, apache make performance decrease dramatically. It¡¯s the matter of MPM-prefork/worker??? FYI: IfModule prefork.c StartServers 50 MinSpareServers 50 MaxSpareServers 100 ServerLimit 2000 MaxClients 1500 MaxRequestsPerChild 0 /IfModule -- maxThreads=1500 minSpareThreads=20 maxSpareThreads=50 enableLookups=false redirectPort=8443 acceptCount=300
Re: Single sign on issue with Tomcat and Apache
Well, Johnny, we seem to agree.. Johnny Kewl wrote: - Original Message - From: sridharmnj [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, June 05, 2008 4:33 PM Subject: Re: Single sign on issue with Tomcat and Apache Many thanks to all of you for responding to my problem. I apologize, I hope I didnot mention my system architecture clearly. (As I mentioned, it is an old application, which was developed 9 yrs ago, and no documentation at all :-( ) I am accessing those applications like.. www.mywebsite.com/aaa - (aaa webapp) Its based on Tomcat FORM based authentication. (JDBC Realm) www.mywebsite.com/bbb - Here some static pages are deployed into Apache and based on BASIC authentication.(mod_auth_mysql) www.mywebsite.com/ccc - (ccc webapp) Here dynamic pages are deployed on Tomcat based on BASIC authentication.(JDBC Realm) All the above applications are using same usertable for credentials. Scenario 1: When I logs into the bbb, (Apache-BASIC) it is poping up a dialog box with username and password and after providing the details it is authenticating using mod_auth_mysql. I have a link to the ccc (Tomcat-BASIC) from bbb pages. When I clicked that link, I am able to navigate those pages without providing the credentials again. (I hope, here tomcat is finding auth headers which are set by Apache) Scenario 2: When I directly logs into ccc (Tomcat-BASIC) it is poping up a dialog box with username and password and after providing the details, it is authenticating using Tomcat BASIC authentication. If I click a link to bbb, I am able to navigate to it without providing the details 2nd time. (I hope, here Apache is finding the credentials which are set by Tomcat). Scenario 3: When I logs into aaa, (TOMCAT-FORM) after authentication, I am able to access ccc (TOMCAT-BASIC) without providing the credentials again. (I hope, here Tomcat is sharing the credentials between FORM and BASIC authentication credentials, as SingleSignOnValve is enabled). These Scenarios 1,2,3 are working perfectly, and I need those as is. Scenario 4: When I logs into aaa, (Tomcat-Form) after authentication, If I click a link to bbb (Apache-BASIC) again its poping up a window for username and password. sridharmnj Ok this is very different to what we first thought. This is a guess... I think the problem is that you mixing auth methods... You have to make them all BASIC in this case. The browser is on the same domain... so I think it will be returning the auth header info, can check with a dump valve or get wireshark and just make sure it is returning header info... but I think it is, the problem is that the auth info is not the same. I've never used FORM authentication, but I guess it just reads the UID and Password fields and then TC starts tracking that cookie as authenticated. BASIC does not do that... there the browser returns a Base64 encoded mash and that is interpreted. So if you go to say ccc (BASIC) and then bbb (BASIC). you havnt said... but I think that will work. But when you go to FORM all the browser sends Apache is a little old cookie... and the BASIC logic will go what the hell... and challenges the browser. So the initial thought that it was a domain problem is not correct... you just mixing incompatible auth schemes. I think you have to lose the FORM auth... and even though you cant change the web app, I think that is is possible externally... all thats going to happen is that the browser pops up a password box... and that auth FORM is now going to be redundant. I think the FORM auth has to go, must be made BASIC... my guess. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem regarding the connector..
Mark Thomas wrote: ramya lekha wrote: Hi installed apache and tomcat in my unix systems... and i m trying to connect them using the mod_jk... I had set JkMount to the appropriate workers1 in the httpd.conf filebut still whenever i type the URL the apache is not redirecting it to the tomcat... Can anyone let me know where would the error be...?? Somewhere in your configuration? The people on this list are good but they aren't psychic ;) You'll need to post the relevant extracts from your configuration files. Taking the words out of my mouth ;-) You know ramya, we believe you when you say that you set everything to the appropriate workers etc.., we really do. But we'd like to see anyway, just in case ;-) - 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 upgrade and JSTL XML library
Hello, I have a web application that uses JSP 2.0 tag files and the Jakarta standard implementation of the JSTL. Essentially, I have JSP files that use custom tag files, both of which use the JSTL XML tag libraries for XML manipulation. Under Tomcat 5.5.17 and earlier, in my tag file, I was able to do something like: %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; % x:parse var=fooDoc foo bar bazThis is some content/baz /bar /foo /x:parse 'x:out select=$fooDoc/foo/bar/baz/' And this would correctly display 'This is some content' in the generated HTML. Once I tried to deploy the above in any Tomcat version 5.5.20 or above, this failed to work, and would only display the single brackets, not the content (''). What does work is changing the line above to: 'x:out select=$fooDoc/bar/baz/' Basically removing the foo part of the xpath. I am using the same version of the jstl jars in both cases, the only difference is Tomcat. Obviously, I could go through and change every place where the x:out is used, but would rather not have the code be specific to the servlet container. I am unable to find any description of a change that could possibly cause this, and am wondering if there is anyone who has encountered this same problem. Am I missing some setting in my web.xml that would control this? Any help is greatly appreciated. thanks! sam -- Sam Weinger Consultant at Wrycan, Inc. sam dot weinger at wrycan dot 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: Single sign on issue with Tomcat and Apache
If there is no way to do this, what changes do you suggest? except aaa changes. Is it a better idea to move apache pages (bbb) into the tomcat (ccc)? (so that there will be only tomcat authentication exists) Thanks, Sridhar awarnier wrote: Well, Johnny, we seem to agree.. Johnny Kewl wrote: - Original Message - From: sridharmnj [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, June 05, 2008 4:33 PM Subject: Re: Single sign on issue with Tomcat and Apache Many thanks to all of you for responding to my problem. I apologize, I hope I didnot mention my system architecture clearly. (As I mentioned, it is an old application, which was developed 9 yrs ago, and no documentation at all :-( ) I am accessing those applications like.. www.mywebsite.com/aaa - (aaa webapp) Its based on Tomcat FORM based authentication. (JDBC Realm) www.mywebsite.com/bbb - Here some static pages are deployed into Apache and based on BASIC authentication.(mod_auth_mysql) www.mywebsite.com/ccc - (ccc webapp) Here dynamic pages are deployed on Tomcat based on BASIC authentication.(JDBC Realm) All the above applications are using same usertable for credentials. Scenario 1: When I logs into the bbb, (Apache-BASIC) it is poping up a dialog box with username and password and after providing the details it is authenticating using mod_auth_mysql. I have a link to the ccc (Tomcat-BASIC) from bbb pages. When I clicked that link, I am able to navigate those pages without providing the credentials again. (I hope, here tomcat is finding auth headers which are set by Apache) Scenario 2: When I directly logs into ccc (Tomcat-BASIC) it is poping up a dialog box with username and password and after providing the details, it is authenticating using Tomcat BASIC authentication. If I click a link to bbb, I am able to navigate to it without providing the details 2nd time. (I hope, here Apache is finding the credentials which are set by Tomcat). Scenario 3: When I logs into aaa, (TOMCAT-FORM) after authentication, I am able to access ccc (TOMCAT-BASIC) without providing the credentials again. (I hope, here Tomcat is sharing the credentials between FORM and BASIC authentication credentials, as SingleSignOnValve is enabled). These Scenarios 1,2,3 are working perfectly, and I need those as is. Scenario 4: When I logs into aaa, (Tomcat-Form) after authentication, If I click a link to bbb (Apache-BASIC) again its poping up a window for username and password. sridharmnj Ok this is very different to what we first thought. This is a guess... I think the problem is that you mixing auth methods... You have to make them all BASIC in this case. The browser is on the same domain... so I think it will be returning the auth header info, can check with a dump valve or get wireshark and just make sure it is returning header info... but I think it is, the problem is that the auth info is not the same. I've never used FORM authentication, but I guess it just reads the UID and Password fields and then TC starts tracking that cookie as authenticated. BASIC does not do that... there the browser returns a Base64 encoded mash and that is interpreted. So if you go to say ccc (BASIC) and then bbb (BASIC). you havnt said... but I think that will work. But when you go to FORM all the browser sends Apache is a little old cookie... and the BASIC logic will go what the hell... and challenges the browser. So the initial thought that it was a domain problem is not correct... you just mixing incompatible auth schemes. I think you have to lose the FORM auth... and even though you cant change the web app, I think that is is possible externally... all thats going to happen is that the browser pops up a password box... and that auth FORM is now going to be redundant. I think the FORM auth has to go, must be made BASIC... my guess. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - 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] -- View this message in context: http://www.nabble.com/Single-sign-on-issue-with-Tomcat-and-Apache-tp17633391p17677750.html Sent from the Tomcat - User mailing list archive at Nabble.com.
RE: Singleton in Tomcat 6.0 not working
I think the Tomcat support in Eclipse WTP is pretty reasonable, but it isn't perfect. For example, if you name your project ROOT, Eclipse won't tell you that you are asking for trouble because some web servers, like Tomcat, may give that particular name special treatment. This would explain the: Context docBase=ROOT path=/ROOT reloadable=true source=org.eclipse.jst.jee.server:ROOT/ Thus, I would recommend not naming a Dynamic Web Project ROOT. You can make a Dynamic Web Project the default webapp by opening the Web Project Setting page of the project's Properties dialog and set the Context Root field to a blank string. When published to a Tomcat server in Eclipse, it will become the default (i.e. ROOT) webapp. Because putting Contexts in server.xml is supported by all versions of Tomcat, this is the default behavior. For Tomcat 5.x and later, you can enable the Publish module contexts to separate XML files option in the server editor. This will remove the Contexts from the server.xml (the one found under the Servers project in your workspace) and write the Contexts to separate files when publishing the server. Obviously, this implies the server.xml you find under the Servers project in your workspace is not the one used by Tomcat when it is running. Tomcat runs off a modified copy created when the server is published. See http://wiki.eclipse.org/WTP_Tomcat_FAQ for more details about the Tomcat support in Eclipse. Cheers, Larry -Original Message- From: ktou Ho [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2008 2:24 PM To: Tomcat Users List Subject: RE: Singleton in Tomcat 6.0 not working By the way, I was using the Eclipse 3.3, it integrated the Tomcat development tool. It was the Eclipse add that line to the server.xml. May be we need to let them know about this. Thanks Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Date: Thu, 5 Jun 2008 13:15:03 -0500 Subject: RE: Singleton in Tomcat 6.0 not working From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Did you mean I should just remove this Context element from the server.xml? You should never have put it in there, so definitely remove it. If you need to set the reloadable attribute, then put just this: Context reloadable=true/ in the file META-INF/context.xml inside the webapp. Note that setting reloadable incurs some additional overhead inside Tomcat, so it is normally not used for production. The doc reference: http://tomcat.apache.org/tomcat-6.0- doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Instantly invite friends from Facebook and other social networks to join you on Windows Live(tm) Messenger. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends - 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: Single sign on issue with Tomcat and Apache
From: sridharmnj [mailto:[EMAIL PROTECTED] Subject: Re: Single sign on issue with Tomcat and Apache Is it a better idea to move apache pages (bbb) into the tomcat (ccc)? If you're not using httpd for anything other than serving static content, then yes, get rid of it. Tomcat by itself does that quite well. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Singleton in Tomcat 6.0 not working
Thanks. I willl try that. Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Date: Thu, 5 Jun 2008 15:32:29 -0400 Subject: RE: Singleton in Tomcat 6.0 not working I think the Tomcat support in Eclipse WTP is pretty reasonable, but it isn't perfect. For example, if you name your project ROOT, Eclipse won't tell you that you are asking for trouble because some web servers, like Tomcat, may give that particular name special treatment. This would explain the: Context docBase=ROOT path=/ROOT reloadable=true source=org.eclipse.jst.jee.server:ROOT/ Thus, I would recommend not naming a Dynamic Web Project ROOT. You can make a Dynamic Web Project the default webapp by opening the Web Project Setting page of the project's Properties dialog and set the Context Root field to a blank string. When published to a Tomcat server in Eclipse, it will become the default (i.e. ROOT) webapp. Because putting Contexts in server.xml is supported by all versions of Tomcat, this is the default behavior. For Tomcat 5.x and later, you can enable the Publish module contexts to separate XML files option in the server editor. This will remove the Contexts from the server.xml (the one found under the Servers project in your workspace) and write the Contexts to separate files when publishing the server. Obviously, this implies the server.xml you find under the Servers project in your workspace is not the one used by Tomcat when it is running. Tomcat runs off a modified copy created when the server is published. See http://wiki.eclipse.org/WTP_Tomcat_FAQ for more details about the Tomcat support in Eclipse. Cheers, Larry -Original Message- From: ktou Ho [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2008 2:24 PM To: Tomcat Users List Subject: RE: Singleton in Tomcat 6.0 not workingBy the way, I was using the Eclipse 3.3, it integrated the Tomcat development tool. It was the Eclipse add that line to the server.xml. May be we need to let them know about this. Thanks Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Date: Thu, 5 Jun 2008 13:15:03 -0500 Subject: RE: Singleton in Tomcat 6.0 not working From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Did you mean I should just remove this Context element from the server.xml? You should never have put it in there, so definitely remove it. If you need to set the reloadable attribute, then put just this: Context reloadable=true/ in the file META-INF/context.xml inside the webapp. Note that setting reloadable incurs some additional overhead inside Tomcat, so it is normally not used for production. The doc reference: http://tomcat.apache.org/tomcat-6.0- doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Instantly invite friends from Facebook and other social networks to join you on Windows Live(tm) Messenger. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends
Re: Tomcat sporadically hangs(long)
We actually did make good progress this week. It was the firewall clipping idle connections to the database, so we played around with the connection pool configurations and haven't have the problem ever since. I can't imagine we didn't think of this earlyer on:) On Mon, Jun 2, 2008 at 8:50 AM, Mark Thomas [EMAIL PROTECTED] wrote: Lars Bo Hansen wrote: Hi, We've been having this issue with tomcat that sporadically hangs once in a while (startet happening just after an apache was put up front, so I'm not quite sure if this is the correct list) Have you tried taking a thread dump whilst this is happening? If you take two ~30s apart it should be obvious which thread is hanging where. 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: Single sign on issue with Tomcat and Apache
sridharmnj wrote: - there is only one Apache, and one Tomcat, on the same physical server yes - there are no Apache VirtualHosts (or there is only one), and there is only one Tomcat Host section in server.xml Apache virtualhost is there, and tomcat host is Host name=localhost... - the back-end for the authentication is the same MySql database system, and the same table. In one case it is accessed by an Apache module (mod_auth_mysql), in the other by some Java module under Tomcat (that's my own weak point by the way, I'm not really a Java/Tomcat guy) yes, authentication is mysql database - there is only one single DNS domain (which simplifies certain issues) yes like www.mywebsite.com - all authentication is of type Basic, which means based on the exchange of HTTP headers from browser to server. No, aaa is based on FORM authentication, and it should not be changed [...] Hmm, I am sorry, if I mislead you. aaa is based on FORM authentication only and my client doesnot want to chage it. As Johnny and I are telling you in different words but with the same meaning, you are mixing two different kinds of authentication, and Apache (and the browser) unfortunately never see the authentication that happens with the Tomcat FORM method. And there is even no way, at the Tomcat level, to pass this information back to Apache (and neither does it need to be passed back to Apache, it should passed to the browser, see below). Or, let me put this another way, there is no simple way, using just the standard Apache and Tomcat configuration and standard add-on modules. If your client absolutely wants to keep the FORM authentication for aaa, and still wants to have a single-sign-on between the 3 areas aaa/ccc/bbb, then the other solution would be to change the authentication method for bbb and ccc. One general solution, roughly outlined in one of my previous emails : do all the authentication(s) at the Apache level, and pass the Apache authentication to Tomcat. You could do something, at the Apache level, that will authenticate the user always with a form (for aaa/bbb/ccc), and it could even be the same look as the login.jsp currently used on Tomcat/aaa. And it would be single-sign-on for all aaa/bbb/ccc. That would be the cleanest solution. (Note : the Tomcat applications would still be protected and authenticated. They just would no longer handle the login dialog themselves). Or, another solution : cut out Apache, and use Tomcat also as the HTTP server for the static pages of bbb. If what happens on Apache is no more than serving static html pages for bbb, Tomcat can do that too. And this way, you could protect bbb by a Tomcat-level Basic authentication, and it would also fall within your Tomcat single-sign-on. Or, leave Apache in-between, but have it pass all requests for bbb to Tomcat also (like it does for aaa and ccc), and serve the static pages from Tomcat, subject to basic authentication on Tomcat. This way, after the first authentication, no matter where in aaa/bbb/ccc, Tomcat would know and keep the authentication even if you later switch between aaa/bbb/ccc. In Basic authentication, it is the browser basically that decides to send the authorization : Basic U3JpZGabkyuUZXN0aW5n header, in function of what it knows (that the realm xxx requires authorization). It knows that, because in a previous attempt to access this same realm, it received a 401 response from the server, telling him authorization required for realm xxx. But in your case, when the user accesses aaa first, the browser never receives a 401 response, so it never knows that it must send the authorization header, and it never does. So when you go from aaa to bbb, it does not send the header either, even if the realm is the same, because it does not know (yet) that an authorization is required. The result is that Apache sends back a 401 response then, and the result of that is that the browser pops up the login dialog (again). That's a bit simplified, but it's the essence. On the other hand, Tomcat *never* sends any authentication information back to Apache. When you access ccc first, it is Tomcat that sends the 401 response to the browser, and that is how *the browser* then knows. Apache never knows. [...] André - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem regarding the connector..
Hi I had attached the httpd.conf file along with this mail... The Directory root is set to usr/abcd-web and our application testapp is under usr/apache/tomcat/webapp So when ever the url spixxl.xxx.com/testapp is called it is searching under usr/abcd-web instead of usr/apache/tomcat/webapp The error in the mod_jk.log file is displayed below: [Wed Jun 04 20:51:44 2008] [943571:3223019520] [debug] jk_shm.c (471): Reseting the shared memory for child 6 [Wed Jun 04 20:51:44 2008] [943571:3223019520] [debug] jk_shm.c (262): Duplicated shared memory lock /usr/apache/logs/mod_jk.shm.942337.lock [Wed Jun 04 20:51:44 2008] [943571:3223019520] [debug] mod_jk.c (2730): Attached shm:/usr/apache/logs/mod_jk.shm.942337 (28672 bytes) [Wed Jun 04 20:51:44 2008] [943571:3223019520] [debug] mod_jk.c (2740): Initialized mod_jk/1.2.26 [Wed Jun 04 21:04:16 2008] [943458:3223019520] [debug] mod_jk.c (3033): missing uri map for spixxl.xxx.com:/testapp/test.jsp And the workers.properties I wrote is : # Define some properties workers.tomcat_home=/usr/apache/tomcat workers.java_home=/usr/opt/java141 ps=/ worker.list=worker1 # Set properties for worker1(ajp13) worker.worker1.type=ajp13 worker.worker1.host=spixxl.xxx.com worker.worker1.port=2004 worker.worker1.connection_pool_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=60 Do let me know if anything more is needed.. Regards, Ramya On 6/5/08, André Warnier [EMAIL PROTECTED] wrote: Mark Thomas wrote: ramya lekha wrote: Hi installed apache and tomcat in my unix systems... and i m trying to connect them using the mod_jk... I had set JkMount to the appropriate workers1 in the httpd.conf filebut still whenever i type the URL the apache is not redirecting it to the tomcat... Can anyone let me know where would the error be...?? Somewhere in your configuration? The people on this list are good but they aren't psychic ;) You'll need to post the relevant extracts from your configuration files. Taking the words out of my mouth ;-) You know ramya, we believe you when you say that you set everything to the appropriate workers etc.., we really do. But we'd like to see anyway, just in case ;-) - 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: Single sign on issue with Tomcat and Apache
Many thanks!! I am planning to follow the below approach only. Or, leave Apache in-between, but have it pass all requests for bbb to Tomcat also (like it does for aaa and ccc), and serve the static pages from Tomcat, subject to basic authentication on Tomcat. This way, after the first authentication, no matter where in aaa/bbb/ccc, Tomcat would know and keep the authentication even if you later switch between aaa/bbb/ccc. I am planning to move bbb (Apache static pages) to Tomcat and make it Tomcat Basic authentication. So I can access aaa/bbb/ccc. This seems to be the best solution for me. (Because, there are some other applications which are running on tomcat and this may be useful for future enhancements also) Now I am looking on feasibility of moving those pages to Tomcat. Thanks to you all and thanks to the wonderful forum. awarnier wrote: sridharmnj wrote: - there is only one Apache, and one Tomcat, on the same physical server yes - there are no Apache VirtualHosts (or there is only one), and there is only one Tomcat Host section in server.xml Apache virtualhost is there, and tomcat host is Host name=localhost... - the back-end for the authentication is the same MySql database system, and the same table. In one case it is accessed by an Apache module (mod_auth_mysql), in the other by some Java module under Tomcat (that's my own weak point by the way, I'm not really a Java/Tomcat guy) yes, authentication is mysql database - there is only one single DNS domain (which simplifies certain issues) yes like www.mywebsite.com - all authentication is of type Basic, which means based on the exchange of HTTP headers from browser to server. No, aaa is based on FORM authentication, and it should not be changed [...] Hmm, I am sorry, if I mislead you. aaa is based on FORM authentication only and my client doesnot want to chage it. As Johnny and I are telling you in different words but with the same meaning, you are mixing two different kinds of authentication, and Apache (and the browser) unfortunately never see the authentication that happens with the Tomcat FORM method. And there is even no way, at the Tomcat level, to pass this information back to Apache (and neither does it need to be passed back to Apache, it should passed to the browser, see below). Or, let me put this another way, there is no simple way, using just the standard Apache and Tomcat configuration and standard add-on modules. If your client absolutely wants to keep the FORM authentication for aaa, and still wants to have a single-sign-on between the 3 areas aaa/ccc/bbb, then the other solution would be to change the authentication method for bbb and ccc. One general solution, roughly outlined in one of my previous emails : do all the authentication(s) at the Apache level, and pass the Apache authentication to Tomcat. You could do something, at the Apache level, that will authenticate the user always with a form (for aaa/bbb/ccc), and it could even be the same look as the login.jsp currently used on Tomcat/aaa. And it would be single-sign-on for all aaa/bbb/ccc. That would be the cleanest solution. (Note : the Tomcat applications would still be protected and authenticated. They just would no longer handle the login dialog themselves). Or, another solution : cut out Apache, and use Tomcat also as the HTTP server for the static pages of bbb. If what happens on Apache is no more than serving static html pages for bbb, Tomcat can do that too. And this way, you could protect bbb by a Tomcat-level Basic authentication, and it would also fall within your Tomcat single-sign-on. Or, leave Apache in-between, but have it pass all requests for bbb to Tomcat also (like it does for aaa and ccc), and serve the static pages from Tomcat, subject to basic authentication on Tomcat. This way, after the first authentication, no matter where in aaa/bbb/ccc, Tomcat would know and keep the authentication even if you later switch between aaa/bbb/ccc. In Basic authentication, it is the browser basically that decides to send the authorization : Basic U3JpZGabkyuUZXN0aW5n header, in function of what it knows (that the realm xxx requires authorization). It knows that, because in a previous attempt to access this same realm, it received a 401 response from the server, telling him authorization required for realm xxx. But in your case, when the user accesses aaa first, the browser never receives a 401 response, so it never knows that it must send the authorization header, and it never does. So when you go from aaa to bbb, it does not send the header either, even if the realm is the same, because it does not know (yet) that an authorization is required. The result is that Apache sends back a 401 response then, and the result of that is that the browser pops up the login dialog (again). That's a bit simplified, but it's
Re: jsp:include versus % include %
Andrei Tchijov wrote: they are identical. you will want to use jsp:include if you care to have your JSP pages in form of valid XML. They are most definitely not identical. [EMAIL PROTECTED] ... % happens at compile time. That is, only the first time the JSP page is loaded. The included data ends up in the compiled servlet. It has been my experience that you can have other JSP directives in the included file and they will be properly interpreted. jsp:include ... / happens at run time, every time the JSP page is loaded. The included data is not compiled into the servlet, rather the generated servlet has code to re-read the included file every time it runs. It has been my experience that JSP tags in the included file will not be interpreted so you're pretty much limited to HTML (or whatever your final output format to the user agent is) in the included file. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk api?
Is there any way/api to talk to mod_jk to tell it of a new Tomcat instance to register it automatically to take load? The only way I can see of doing this is to POST to /jkstatus. Ideas? MikeD
Re: jsp:include versus % include %
Bill Davidson wrote: [EMAIL PROTECTED] ... % happens at compile time. That is, only the first time the JSP page is loaded. The included data ends up in the compiled servlet. It has been my experience that you can have other JSP directives in the included file and they will be properly interpreted. I forgot to add, if the included file changes, then the JSP will not reflect that change unless you force it to be recompiled. jsp:include ... / happens at run time, every time the JSP page is loaded. The included data is not compiled into the servlet, rather the generated servlet has code to re-read the included file every time it runs. It has been my experience that JSP tags in the included file will not be interpreted so you're pretty much limited to HTML (or whatever your final output format to the user agent is) in the included file. In this case, if the included file changes, the JSP should reflect the changes on the next page load, without a recompile. - 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: Session lost when switching from https to http after upgrade to Tomcat 6
krusek wrote: I have Apache 2 with SSL, mod_jk connection, and Tomcat. Everything has worked peachy from one tomcat upgrade after another. However now I upgraded to tomcat 6 and I am loosing the session when switching from https to http within the same domain. For clarity, Apache 2 is handling SSL not tomcat. Does anyone know why this is happening? I appear to be having the exact same problem. If I figure it out, I'll reply here. Likewise, please let us know if you figure it out. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Memory Settings in Tomcat 5.5.25
Hi, I am getting java.lang.OutOfMemoryError: PermGen space error in my application. I need to find what how much memory have been allocation for tomcat 5.5.25 server. The server is running as a Windows Service, but there is no sys tray. So, I cannot do Properties - Configure in sys tray to configure jvm memory options. There is no JAVA_OPTS settings for memory in catalina.bat. How much memory have been allocated for tomcat? maximum and minimum heap size and perm gen size Thank you, semaj -- View this message in context: http://www.nabble.com/Memory-Settings-in-Tomcat-5.5.25-tp17679745p17679745.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Memory Settings in Tomcat 5.5.25
From: semaj.najraham [mailto:[EMAIL PROTECTED] Subject: Memory Settings in Tomcat 5.5.25 I am getting java.lang.OutOfMemoryError: PermGen space error in my application. http://wiki.apache.org/tomcat/FAQ/Memory I need to find what how much memory have been allocation for tomcat 5.5.25 server. Use jconsole to look at the state of the heap in a running Tomcat. I cannot do Properties - Configure in sys tray to configure jvm memory options. Run the bin\tomcat5w.exe program to access the heap settings. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsp:include versus % include %
That's not really what I see here. I think of %@ include=file% directives as akin to a C compiler's #include, or a shell's source, directive in that the content of the file is interpreted as if it were directly typed into the containing file. On the old-ish version of Tomcat that I have, changes to the included file are picked up automatically (i.e. no need to force a recompile). I think of jsp:include page=relative url directives as essentially making an HTTP request and including the output at the point of the tag (though the analogy isn't quite perfect). It's been my experience that the page included via jsp:include can be static HTML or a dynamically-interpreted JSP page. For example, try the following: [EMAIL PROTECTED] cat test.inc %! int the_number_in_test_inc = 1 ; % [EMAIL PROTECTED] cat test-inc.jsp The value passed to test-inc.jsp was %=request.getParameter(for-test-inc)% [EMAIL PROTECTED] cat test.jsp %@ include file=test.inc % The number in test.inc is %=the_number_in_test_inc% jsp:include flush=true page=test-inc.jsp jsp:param name=for-test-inc value=/ /jsp:include [EMAIL PROTECTED] wget http://localhost/voxis/test.jsp The number in test.inc is 1 The value passed to test-inc.jsp was # ...change test.inc to see if we get auto-recompile [EMAIL PROTECTED] cat test.inc %! int the_number_in_test_inc = 1000 ; % [EMAIL PROTECTED] wget http://localhost/voxis/test.jsp The number in test.inc is 1000 The value passed to test-inc.jsp was On Thu, Jun 5, 2008 at 4:50 PM, Bill Davidson [EMAIL PROTECTED] wrote: Bill Davidson wrote: [EMAIL PROTECTED] ... % happens at compile time. That is, only the first time the JSP page is loaded. The included data ends up in the compiled servlet. It has been my experience that you can have other JSP directives in the included file and they will be properly interpreted. I forgot to add, if the included file changes, then the JSP will not reflect that change unless you force it to be recompiled. jsp:include ... / happens at run time, every time the JSP page is loaded. The included data is not compiled into the servlet, rather the generated servlet has code to re-read the included file every time it runs. It has been my experience that JSP tags in the included file will not be interpreted so you're pretty much limited to HTML (or whatever your final output format to the user agent is) in the included file. In this case, if the included file changes, the JSP should reflect the changes on the next page load, without a recompile. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem regarding the connector..
ramya lekha wrote: Hi I had attached the httpd.conf file along with this mail... The Directory root is set to usr/abcd-web and our application testapp is under usr/apache/tomcat/webapp So when ever the url spixxl.xxx.com/testapp is called it is searching under usr/abcd-web instead of usr/apache/tomcat/webapp The error in the mod_jk.log file is displayed below: [Wed Jun 04 20:51:44 2008] [943571:3223019520] [debug] jk_shm.c (471): Reseting the shared memory for child 6 [Wed Jun 04 20:51:44 2008] [943571:3223019520] [debug] jk_shm.c (262): Duplicated shared memory lock /usr/apache/logs/mod_jk.shm.942337.lock [Wed Jun 04 20:51:44 2008] [943571:3223019520] [debug] mod_jk.c (2730): Attached shm:/usr/apache/logs/mod_jk.shm.942337 (28672 bytes) [Wed Jun 04 20:51:44 2008] [943571:3223019520] [debug] mod_jk.c (2740): Initialized mod_jk/1.2.26 [Wed Jun 04 21:04:16 2008] [943458:3223019520] [debug] mod_jk.c (3033): missing uri map for spixxl.xxx.com:/testapp/test.jsp And the workers.properties I wrote is : # Define some properties workers.tomcat_home=/usr/apache/tomcat workers.java_home=/usr/opt/java141 ps=/ worker.list=worker1 # Set properties for worker1(ajp13) worker.worker1.type=ajp13 worker.worker1.host=spixxl.xxx.com worker.worker1.port=2004 worker.worker1.connection_pool_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=60 Do let me know if anything more is needed.. Well, yes probably. 1) You should have, in your Apache configuration, some instructions telling Apache which URI's should be handled by mod_jk. Something like JkMount /testapp ajp13 JkMount /testapp/* ajp13 or Location /testapp SetHandler Jakarta-servlet .. /Location 2) in your spixxl.xxx.com Tomcat server.xml configuration, you should have a Connector element referencing port 2004 Something like !-- Define an AJP 1.3 Connector on port 2004 -- Connector port=2004 enableLookups=false redirectPort= protocol=AJP/1.3 / From the error message you show, it looks like it's the first item above that may be incorrect. [Wed Jun 04 21:04:16 2008] [943458:3223019520] [debug] mod_jk.c (3033): missing uri map for spixxl.xxx.com:/testapp/test.jsp - 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: jsp:include versus % include %
Jim Cox wrote: That's not really what I see here. I think of %@ include=file% directives as akin to a C compiler's #include, or a shell's source, directive in that the content of the file is interpreted as if it were directly typed into the containing file. On the old-ish version of Tomcat that I have, changes to the included file are picked up automatically (i.e. no need to force a recompile). When I last tried testing this, it was with Sun Java System Application Server and it was a while back. It didn't recompile if the included file changed. I'll have to try it with a recent version of Tomcat when I get a chance. According to what you're saying, Tomcat is smart enough to notice that include files have changed. I think of jsp:include page=relative url directives as essentially making an HTTP request and including the output at the point of the tag (though the analogy isn't quite perfect). It's been my experience that the page included via jsp:include can be static HTML or a dynamically-interpreted JSP page. Maybe it was that I was including files with extension .jspf since I considered them to be fragments, and not full JSP's. I guess I should be thinking of them as full JSP's instead. Would they therefore have their own request/page scope separate from the page including including them? I guess as long as I'm only using session data, it might be OK. - 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: request for simplistic Tomcat 5.5 log config
Mark Thomas wrote: André Warnier wrote: (This is Linux Debian Etch, with Tomcat5.5 out of the box, standard apt-get install.) Without knowing if/how 5.5.x has been mangled by the packaging process it is going to be difficult to help you. The packaging process tends to play all sorts of games with file locations and default configurations. Yes, it mangles quite a bit. Tomcat5.5 is split (as files and links) between /etc/tomcat5.5, /var/lib/tomcat5.5, and /usr/share/tomcat5.5. I suppose the Debian packagers have their very good and smart reasons for doing this, but it doesn't make searching config files easier. If you use a packaged version rather than the standard tar you limit the pool of people able to help to those running the same package as you. Understood. But there must be some logic as to where log settings for given hosts or applications are defined, no ? If you can, switch to the standard tar.gz from one of the Apache mirrors. That I can't, or my main system maintainer would be very unhappy. Now, again, I see the following files in the /var/log/tomcat5.5 directory (that at least is easy, it seems to be the only location for logfiles) : catalina.out catalina_2008-06-04.log catalina.2008-06-04.log localhost.2008-06-04.log admin.2008-06-04.log host-manager.2008-06-04.log manager.2008-06-04.log To take the issue one little bit at a time : 1) I would like to know for instance, in which configuration file(s) one would be likely to find out where it says to create 2 logfiles, one named catalina_2008-06-04.log and one named catalina.2008-06-04.log, and how to join them into a single file maybe ? They contain different things : catalina_x.log tends to contain this kind of info : SessionId=AD335A46F14779A900FFB73B2CBC66A4 MaxTimeOut = 6120 SessionId=AD335A46F14779A900FFB73B2CBC66A4 SessionId=AD335A46F14779A900FFB73B2CBC66A4 while cataline..log tends to contain this kind of stuff : Jun 3, 2008 1:17:58 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO: Pausing Coyote HTTP/1.1 on http-8180 Jun 3, 2008 1:17:59 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Jun 3, 2008 1:18:03 PM org.apache.coyote.http11.Http11BaseProtocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8180 Jun 3, 2008 1:18:03 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Failed shutdown of Apache Portable Runtime 03-Jun-2008 13:18:14 org.apache.catalina.core.AprLifecycleListener lifecycleEvent 2) admin, host-manager and manager are applications. If they each produce an individual logfile, I would imagine that it is defined somewhere that they should. I have followed the path /var/lib/tomcat5.5/conf/Catalina/localhost, and in that directory I find 3 files : admin.xml host-manager.xml manager.xml All 3 files contain a Context element, but only in admin.xml was there a Logger element. I commented it out. Then I stop Tomcat, delete all logfiles in /var/log/tomcat5.5, restart Tomcat, and presto, all files re-appear *including admin.2008-06-05.log* ?? where does it come from ? And what was the Logger element doing before I commented it out ? In the other 2 files, there is no Logger. So why do these apps then still produce their own logfiles ? For example, if I consider the manager application, and it has no Logger defined in it's context file /var/lib/tomcat5.5/conf/Catalina/localhost/manager.xml, then where else could it be defined ? Thanks in advance, André - 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: Moving from a very old Tomcat to a new Tomcat.
Christopher Schultz wrote: Are you using cookies or URL-rewriting (or both) for your application? Can you use a tool like LiveHTTPHeaders to observe the headers being exchanged during the interaction described above? We are using cookies to track sessions. I don't think we're using URL rewriting. Servlets and jsp's are handed off to Tomcat. Everything else is Apache httpd. We seem to be losing the cookie when a page being served from the SSL virtual host forwards to a page that is not SSL (back in the regular host on port 80). No cookie means the server doesn't know that the browser is attached to the session it created for the user. My lack of Apache skills is no doubt showing. Is there a way to have Apache 2.2 serve both 80 (clear) and 443 (SSL) from the primary host instead of a virtual host? I'm guessing that the switch from the virtual host to the main host (both with the same hostname and IP but listening on different ports) is what's causing the cookie to get lost. - 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: request for simplistic Tomcat 5.5 log config
From: André Warnier [mailto:[EMAIL PROTECTED] Subject: Re: request for simplistic Tomcat 5.5 log config Now, again, I see the following files in the /var/log/tomcat5.5 directory Which further shows how the 3rd-party repackagers have corrupted the Tomcat distribution. You really need to throw that away and install an actual Tomcat - or make it the sys admin's problem. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Moving from a very old Tomcat to a new Tomcat.
One other thing I just noticed. The login servlet runs under https. After successful login, including creating a valid session, it calls HttpServletResponse.sendRedirect(http://myHost.myDomain.com/context/servlets/main;); which is the one that ends up with no cookie. - 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: quick question regarding jsvc
I'm seeing that as well. The root user jsvc process is parent to the tomcat user jsvc process. You'll also notice from analysis of netstat's output that the tomcat user jsvc process is the only one listening to ports. The one running as root is just there to spawn the true tomcat process with access to privileged ports. I'm sure the root user jsvc process is also the one that takes a kill signal and sends a normal shutdown command to the other. --David Adam Hardy wrote: I'm running tomcat as user 'tomcat' on linux with jsvc.exec, using the associated shell script as the SysVinit start-up script. I see tomcat running as 2 processes - one as root and one as tomcat. This doesn't seem right. Is it? Or should I change the command in the start-up script? Thanks Adam - 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: Moving from a very old Tomcat to a new Tomcat.
if your client doesnt want to write cookies URL-rewrite is the answer http://tuckey.org/urlrewrite/ Apache analog is mod_rewrite HTH Martin - Original Message - From: André Warnier [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, June 05, 2008 7:56 PM Subject: Re: Moving from a very old Tomcat to a new Tomcat. Bill Davidson wrote: Christopher Schultz wrote: Are you using cookies or URL-rewriting (or both) for your application? Can you use a tool like LiveHTTPHeaders to observe the headers being exchanged during the interaction described above? We are using cookies to track sessions. I don't think we're using URL rewriting. Servlets and jsp's are handed off to Tomcat. Everything else is Apache httpd. We seem to be losing the cookie when a page being served from the SSL virtual host forwards to a page that is not SSL (back in the regular host on port 80). No cookie means the server doesn't know that the browser is attached to the session it created for the user. This may not be the cause of your problem, but I remember vaguely that there can be a flag in a cookie saying for SSL only. If such was the case, the browser may just decide to not send the cookie anymore, even to the same host, once you switch back to a non-SSL connection. losing the cookie is also maybe a misnomer here. The entity that has the cookie and decides to send it or not is the browser. The only way the server can tell the browser to lose a cookie, is by resending the same cookie with an expiration date in the past. That should cause the browser to delete the cookie and not send it anymore. What I mean is : to set a cookie in the browser, the server sends a Set-Cookie HTTP header to the browser, along with some normal result page. It does this once (or more, but once is enough). After that, the browser will always send back the cookie with each request to the same server, as a Cookie: HTTP header, until this cookie expires. When the expiration date/time of the cookie is reached, the browser purges the cookie from its memory, and that is when it stops sending it. There is no Unset-Cookie or Stop-sending-this-cookie HTTP header that the server can send to the browser. My lack of Apache skills is no doubt showing. Is there a way to have Apache 2.2 serve both 80 (clear) and 443 (SSL) from the primary host instead of a virtual host? I'm guessing that the switch from the virtual host to the main host (both with the same hostname and IP but listening on different ports) is what's causing the cookie to get lost. As far as I know, a cookie is not port-specific. Host or domain-specific yes, but port not. - 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: quick question regarding jsvc
David Smith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm seeing that as well. The root user jsvc process is parent to the tomcat user jsvc process. You'll also notice from analysis of netstat's output that the tomcat user jsvc process is the only one listening to ports. The one running as root is just there to spawn the true tomcat process with access to privileged ports. I'm sure the root user jsvc process is also the one that takes a kill signal and sends a normal shutdown command to the other. Yeah, this is pretty much right. Only the un-privilged child will handle incoming requests. The privileged parent just sits there and waits for signals normally. It is the same way that Apache httpd works. It works around the fact that most JVM vendors on *nix systems register their own signal handler for SIGTERM and SIGHUP. --David Adam Hardy wrote: I'm running tomcat as user 'tomcat' on linux with jsvc.exec, using the associated shell script as the SysVinit start-up script. I see tomcat running as 2 processes - one as root and one as tomcat. This doesn't seem right. Is it? Or should I change the command in the start-up script? Thanks Adam - 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: It��s amazing, apache make TC performance decrease dramatically.
You haven't given your O/S details, but yes, AJP will s*ck big time on older Linux kernals with this test. Older kernals can't handle having 1000+ threads active efficiently. You could try testing again with the APR and/or (experimental) NIO AJP Connectors. These usually get the difference down to somewhat acceptable. However, using Apache+mod_jk just to increase performance is a myth, based on the state of Tomcat 8+ years ago ;). It will almost always be slower with any current version. Zufeng Huang [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, all I post a topic about the performance of apache+mod_jk_tomcat yesterday, and just now, I tried apache ab as the tool to do a benchmark. But the result is amazing. My steps: 1, Using a jsp as the target ONE. 1.1, ab ¨Cn 25000 ¨Cc 1000 URL_via_apache Concurrency Level: 1000 Time taken for tests: 410.105255 seconds Complete requests: 25000 1.2,ab ¨Cn 25000 ¨Cc 1000 URL_direct_to_tomcat Concurrency Level: 1000 Time taken for tests: 12.297322 seconds Complete requests: 25000 2, Using a html page as the target TWO. 2.1, ab ¨Cn 25000 ¨Cc 1000 URL_via_apache Concurrency Level: 1000 Time taken for tests: 25.655253 seconds Complete requests: 25000 2.2, ab ¨Cn 25000 ¨Cc 1000 URL_direct_to_tomcat Concurrency Level: 1000 Time taken for tests: 24.132493 seconds Complete requests: 25000 So this really make me amazing and there are two questions: 1, According to my configurations, apache(2.2.4) has NO advantage against tomcat(5.5.15) in processing static content. 2, In processing dynamic content, apache make performance decrease dramatically. It¡¯s the matter of MPM-prefork/worker??? FYI: IfModule prefork.c StartServers 50 MinSpareServers 50 MaxSpareServers 100 ServerLimit 2000 MaxClients 1500 MaxRequestsPerChild 0 /IfModule -- maxThreads=1500 minSpareThreads=20 maxSpareThreads=50 enableLookups=false redirectPort=8443 acceptCount=300 - 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: It¡¯s amazing, apache make TC performance decrease dramatically.
Bill Barker wrote: You haven't given your O/S details, but yes, AJP will s*ck big time on older Linux kernals with this test. Older kernals can't handle having 1000+ threads active efficiently. You could try testing again with the APR and/or (experimental) NIO AJP Connectors. These usually get the difference down to somewhat acceptable. However, using Apache+mod_jk just to increase performance is a myth, based on the state of Tomcat 8+ years ago ;). It will almost always be slower with any current version. Yet until there's a Java equivalent of mod_jk/mod_proxy_ajp load balancing some of us are wed to Apache for that if no other reason. I suspect it is possible to out-do Apache with Java in this capacity, but no such thing exists today. Of course Apache 2.2's handling of authentication against multiple LDAPs, credential caching, etc -- all without extra work -- is also pretty nice [Tomcat does not yet have this last I checked...], but wouldn't by itself be sufficient justification for Apache in a primarily JSP/servlet environment. -- Jess Holle - 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: It��s amazing, apache make TC performance decrease dramatically.
Bill, OS: CentOS V4, 2.6.9-42.ELsmp #1 SMP Dell 6850 with 4*3.1Ghz CPU, 8G memory This is a website service, if connections 800+, some requests become very very slow. I have two reasons for using apache+mod_jk+tomcat: 1, URL rewrite 2, Load Balance According to the result of my benchmark, and if this is the REAL fact, then I meet a headache problem. I can give up the purpose of LB, but URL rewrite(www.b.comwww.a.com--www.b.com) is needed. So, any more sugesstions? thanks, Bill Barker [EMAIL PROTECTED] wrote: You haven't given your O/S details, but yes, AJP will s*ck big time on older Linux kernals with this test. Older kernals can't handle having 1000+ threads active efficiently. You could try testing again with the APR and/or (experimental) NIO AJP Connectors. These usually get the difference down to somewhat acceptable. However, using Apache+mod_jk just to increase performance is a myth, based on the state of Tomcat 8+ years ago ;). It will almost always be slower with any current version. Zufeng Huang wrote in message news:[EMAIL PROTECTED] Hi, all I post a topic about the performance of apache+mod_jk_tomcat yesterday, and just now, I tried apache ab as the tool to do a benchmark. But the result is amazing. My steps: 1, Using a jsp as the target ONE. 1.1, ab ¨Cn 25000 ¨Cc 1000 URL_via_apache Concurrency Level: 1000 Time taken for tests: 410.105255 seconds Complete requests: 25000 1.2,ab ¨Cn 25000 ¨Cc 1000 URL_direct_to_tomcat Concurrency Level: 1000 Time taken for tests: 12.297322 seconds Complete requests: 25000 2, Using a html page as the target TWO. 2.1, ab ¨Cn 25000 ¨Cc 1000 URL_via_apache Concurrency Level: 1000 Time taken for tests: 25.655253 seconds Complete requests: 25000 2.2, ab ¨Cn 25000 ¨Cc 1000 URL_direct_to_tomcat Concurrency Level: 1000 Time taken for tests: 24.132493 seconds Complete requests: 25000 So this really make me amazing and there are two questions: 1, According to my configurations, apache(2.2.4) has NO advantage against tomcat(5.5.15) in processing static content. 2, In processing dynamic content, apache make performance decrease dramatically. It¡¯s the matter of MPM-prefork/worker??? FYI: StartServers 50 MinSpareServers 50 MaxSpareServers 100 ServerLimit 2000 MaxClients 1500 MaxRequestsPerChild 0 -- maxThreads=1500 minSpareThreads=20 maxSpareThreads=50 enableLookups=false redirectPort=8443 acceptCount=300 - 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: Memory Settings in Tomcat 5.5.25
Chuck, I am able to view the memory settings with tomcat5w.exe as you've said. few more questions: 1. How do we view the memory settings if the tomcat server is not installed as a service? 2. How do we view the memory settings if we run the server within eclipse? Thanks, Semaj Caldarale, Charles R wrote: From: semaj.najraham [mailto:[EMAIL PROTECTED] Subject: Memory Settings in Tomcat 5.5.25 I am getting java.lang.OutOfMemoryError: PermGen space error in my application. http://wiki.apache.org/tomcat/FAQ/Memory I need to find what how much memory have been allocation for tomcat 5.5.25 server. Use jconsole to look at the state of the heap in a running Tomcat. I cannot do Properties - Configure in sys tray to configure jvm memory options. Run the bin\tomcat5w.exe program to access the heap settings. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Memory-Settings-in-Tomcat-5.5.25-tp17679745p17684319.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]