Re: Tomcat 5.5 logging-config elegant? Not so much, I think.
I didn't get it : Are you trying to get tomcat internal log to be logged somewhere or are we talking about your application's logs? Evgeny On Tue, Oct 20, 2009 at 12:42 AM, larrydlefever larrydlefe...@gmail.comwrote: I just killed most of the afternoon trying (and failing) to get Tomcat 5.5 logging configured for just pretty basic sensible (to me, at least) output. I'm running Ubuntu. I installed Tomcat 5.5 via aptitude (the Ubuntu package-fetcher/installer). Symptoms: - a lingering System.out.println() (I know shouldn't use such -- but just knew I'd have trouble setting up logging -- and I was right): it's apparently getting swallowed, though I don't see that swallowOutput option being set where I believe it's supposed to be set (per some forum-posts and such) - a Log statement set up using Commons Logging doesn't appear, though it's essentially immediately 'upstream' of what does appear (more about which in a moment) -- it's in the same method and there's no control-logic preventing it from executing - there's an ex.printStackTrace() whose output IS appearing in the catalina.out file -- or the one like it with the timestamp in it (not sure why there are two such) So, regarding application-specific logging, I'm apparently getting only what's automatically going to stderr. Solution-Efforts: - tried most obvious thing first: put the log4j jar into the webapp's WEB-INF/lib and log4j.properties into its WEB-INF/classes directories, tweaked my code to use Log4J explicitly as logger, changed one System.out.println() line to use that logger; result: no change - read about (rather hackish!) things to do 'upstream' (or: up the classloader-hierarchy) in the common/lib and common/classes directories; basically doing much as above but at that 'commons' directory-level; result: no change; maybe had yet to change the startup.sh script to set a -D option to point to my own log4j.properties file; might yet do so, though reluctant, since that's so damn hackish - read about and tried (even more hackish!) tricking the bootstrap code into thinking it's using commons-logging-api.jar when it's actually using the full fledged commons-logging.jar (along with associated change to my code to use commons-logging's classes rather than specifically those of Log4J): result: no change - incidently, each of these tests seemed to have the desired effect locally on my Windows laptop while running in Jetty rather than Tomcat I plan to continue with all this tomorrow, with a 'fresh head', but anything anybody might be able to tell me that might give me the needed aha moment with this would be much appreciated. Thanks. -- View this message in context: http://www.nabble.com/Tomcat-5.5-logging-config-elegant---Not-so-much%2C-I-think.-tp25966929p25966929.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
FW: MISC; Tomcat-5.5.12 Cluster giving Severe Error in ReplicationListener
Dear all, I am using Tomcat-5.5.12 installed on Separate machines and configured as Clustered Session Replication. After stopping one of the Nodes, my Session Replication is not working very fine between nodes and I am getting the below error: INFO: Pausing Coyote HTTP/1.1 on http-8080 Oct 19, 2009 6:01:24 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Oct 19, 2009 6:01:24 PM org.apache.catalina.cluster.deploy.FarmWarDeployer stop INFO: Cluster FarmWarDeployer stopped. Oct 19, 2009 6:01:24 PM org.apache.catalina.cluster.tcp.ReplicationTransmitter stop INFO: Stopped ClusterSender at cluster Catalina:type=Cluster,host=localhost with name Catalina:type=ClusterSender,host=localhost Oct 19, 2009 6:01:24 PM org.apache.catalina.cluster.tcp.ReplicationListener listen SEVERE: Unable to process request in ReplicationListener java.nio.channels.ClosedSelectorException at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:66) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80) at org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationLi stener.java:130) at org.apache.catalina.cluster.tcp.ClusterReceiverBase.run(ClusterReceiverB ase.java:394) at java.lang.Thread.run(Thread.java:595) Did someone faced such Error SEVERE: Unable to process request in ReplicationListener? And do I need to configure something in my Cluster Tag in server.xml to avoid such Error? Please help. Imad Hachem | Asst.Product Development Manager e-Banking Department Path Solutions Tel: +961 1 697444 ext. 222 Fax: +961 1 696744 www.path-solutions.com http://www.path-solutions.com Disclaimer [The information contained in this e-mail message and any attached files are confidential information and intended solely for the use of the individual or entity to whom they are addressed. This transmission may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you have received this e-mail in error, please notify the sender immediately and delete all copies. If you are not the intended recipient, any disclosure, copying, distribution, or use of the information contained herein is STRICTLY PROHIBITED. Path Solutions accepts no responsibility for any errors, omissions, computer viruses and other defects.]
Windows 2008 Server (x64) IIS7 to Tomcat 6.0 32-bit with Java 32-bit isapi_redirect 1.2.28 connector problem
Hello, I have a problem. I allowed 32-bit applications to run in application pool configuration in IIS7. I tried 64-bit versions of isapi_redirect.dll both for x64 and ia64.They gave error (error loading library). When I tried 32-bit version of isapi_redirect.dll with registry entries beyond wow6432node (where tomcat entries are also located), it gives 0x80070001 error (The page cannot be displayed because an internal server error has occurred). It gives 0x80070002 error (Calling GetFilterVersion on ISAPI filter disk\path\isapi_redirect.dll failed) with registry entries beyond SOFTWARE registry entry. Regards, Artem Terekhov
R: clent authentication using a smard card
-Messaggio originale- Da: Jason Pyeron [mailto:jpye...@pdinc.us] Inviato: lunedì 19 ottobre 2009 20.21 A: 'Tomcat Users List' Oggetto: RE: clent authentication using a smard card cut Do you have access to IE on windows for this? If you do, it will be much quicker, and easier. I am just trying to get a baseline established, so I can plow throught with my ten steps. Ok. I made the same thing with IE and in the debug it says null cert chain during the client authentication handshake. Now I am confused... M - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: clent authentication using a smard card
-Original Message- From: Marcello Marangio [mailto:m.maran...@innova.puglia.it] Sent: Tuesday, October 20, 2009 5:10 To: 'Tomcat Users List' Subject: R: clent authentication using a smard card -Messaggio originale- Da: Jason Pyeron [mailto:jpye...@pdinc.us] Inviato: lunedì 19 ottobre 2009 20.21 A: 'Tomcat Users List' Oggetto: RE: clent authentication using a smard card cut Do you have access to IE on windows for this? If you do, it will be much quicker, and easier. I am just trying to get a baseline established, so I can plow throught with my ten steps. Ok. I made the same thing with IE and in the debug it says null cert chain during the client authentication handshake. Now I am confused... Lets step back and look. Can you provide the smart card and server certificate chain (no keys please)? M - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
R: clent authentication using a smard card
-Messaggio originale- Da: Jason Pyeron [mailto:jpye...@pdinc.us] Inviato: martedì 20 ottobre 2009 12.13 A: 'Tomcat Users List' Oggetto: RE: clent authentication using a smard card -Original Message- From: Marcello Marangio [mailto:m.maran...@innova.puglia.it] Sent: Tuesday, October 20, 2009 5:10 To: 'Tomcat Users List' Subject: R: clent authentication using a smard card -Messaggio originale- Da: Jason Pyeron [mailto:jpye...@pdinc.us] Inviato: lunedì 19 ottobre 2009 20.21 A: 'Tomcat Users List' Oggetto: RE: clent authentication using a smard card cut Do you have access to IE on windows for this? If you do, it will be much quicker, and easier. I am just trying to get a baseline established, so I can plow throught with my ten steps. Ok. I made the same thing with IE and in the debug it says null cert chain during the client authentication handshake. Now I am confused... Lets step back and look. Can you provide the smart card and server certificate chain (no keys please)? Hang on a second... The server certificate is an self signed certificate I made with keytool. The smart card certificate, instead, is a real one, I use to legally sign electronic documents; the issuer is an Italian CA. Do you expect the issuer of the smart card certificate to be the same as the server one? How can I print out the certificate chain? Thanks again M M - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Unable to get the free endpoint for worker AG2 from 10 slots in IIS7 with JBOSS430
Hi all I have configured the JBOSS 430 with IIS7 for a single node as per the guide available in the location http://www.scribd.com/doc/20684887/IIS7-with-JBOSS-430. I have used isapi_redirect1.2.28.dll in IIS configuration. After sometime accessing the application, I can see the following in the Isapi log file.. Can some one help me out on this? uriworkermap.properties /awebapp=loadbalancerAG /awebapp/=loadbalancerAG /awebapp/*=loadbalancerAG Workers.properties: # Define list of workers that will be used # for mapping requests # Note worker list does not include the nodes worker.list=loadbalancerAG,status # Define Node2 # modify the host as your host IP or DNS name. worker.AG2.port=8009 worker.AG2.host=rentsrv15s2.agi.com worker.AG2.type=ajp13 worker.AG2.lbfactor=1 worker.AG2.connection_pool_size=10 # Load-balancing worker worker.loadbalancerAG.type=lb worker.loadbalancerAG.balance_workers=AG2 worker.loadbalancerAG.sticky_session=1 # Status worker for managing load balancer worker.status.type=status Error in isapi_redirect.log file: [Tue Oct 20 03:13:02.908 2009] [3420:4024] [info] jk_ajp_common.c (1496): (AG2) all endpoints are disconnected, detected by connect check (3), cping (0), send (0) [Tue Oct 20 03:13:25.846 2009] [3420:4024] [info] jk_ajp_common.c (1496): (AG2) all endpoints are disconnected, detected by connect check (1), cping (0), send (0) [Tue Oct 20 03:14:40.238 2009] [3420:3976] [info] jk_ajp_common.c (1496): (AG2) all endpoints are disconnected, detected by connect check (1), cping (0), send (0) [Tue Oct 20 03:15:02.988 2009] [3420:988] [info] jk_ajp_common.c (1496): (AG2) all endpoints are disconnected, detected by connect check (1), cping (0), send (0) [Tue Oct 20 03:17:42.131 2009] [3420:3976] [info] jk_ajp_common.c (1496): (AG2) all endpoints are disconnected, detected by connect check (5), cping (0), send (0) [Tue Oct 20 03:18:25.522 2009] [3420:988] [warn] jk_ajp_common.c (3001): Unable to get the free endpoint for worker AG2 from 10 slots [Tue Oct 20 03:18:25.522 2009] [3420:988] [info] jk_lb_worker.c (1185): could not get free endpoint for worker AG2 (0 retries) Thanks Ram -- View this message in context: http://www.nabble.com/Unable-to-get-the-free-endpoint-for-worker-AG2-from-10-slots-in-IIS7-with-JBOSS430-tp25973154p25973154.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: clent authentication using a smard card
-Original Message- From: Marcello Marangio [mailto:m.maran...@innova.puglia.it] Da: Jason Pyeron [mailto:jpye...@pdinc.us] From: Marcello Marangio [mailto:m.maran...@innova.puglia.it] Da: Jason Pyeron [mailto:jpye...@pdinc.us] Ok. I made the same thing with IE and in the debug it says null cert chain during the client authentication handshake. Now I am confused... Lets step back and look. Can you provide the smart card and server certificate chain (no keys please)? Hang on a second... The server certificate is an self signed certificate I made with keytool. The smart card certificate, instead, is a real one, I use to legally sign electronic documents; the issuer is an Italian CA. Do you expect the issuer of the smart card certificate to be the same as the server one? Not always. Lets take for example: https://mail.pdinc.us -PD Inc Public CA-PD Inc Root CA and MySmartCard - DOD EMAIL CA-15 - DoD Root CA-2 The smime cert used on this email I can use my smart card to auth againstthe server. But the server must know about DoD Root CA-2. How can I print out the certificate chain? Thanks again M -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. mail.pdinc.us.cer Description: application/x509-ca-cert PDIncPublicCA.cer Description: application/x509-ca-cert PDIncRoot.cer Description: application/x509-ca-cert smartcard.cer Description: application/x509-ca-cert dodemailca-15.cer Description: application/x509-ca-cert DoDRootCA-2.cer Description: application/x509-ca-cert smime.p7s Description: S/MIME cryptographic signature
R: clent authentication using a smard card
-Messaggio originale- Da: Jason Pyeron [mailto:jpye...@pdinc.us] Inviato: martedì 20 ottobre 2009 13.03 A: 'Tomcat Users List' Oggetto: RE: clent authentication using a smard card -Original Message- From: Marcello Marangio [mailto:m.maran...@innova.puglia.it] Da: Jason Pyeron [mailto:jpye...@pdinc.us] From: Marcello Marangio [mailto:m.maran...@innova.puglia.it] Da: Jason Pyeron [mailto:jpye...@pdinc.us] Ok. I made the same thing with IE and in the debug it says null cert chain during the client authentication handshake. Now I am confused... Lets step back and look. Can you provide the smart card and server certificate chain (no keys please)? Hang on a second... The server certificate is an self signed certificate I made with keytool. The smart card certificate, instead, is a real one, I use to legally sign electronic documents; the issuer is an Italian CA. Do you expect the issuer of the smart card certificate to be the same as the server one? Not always. Lets take for example: https://mail.pdinc.us -PD Inc Public CA-PD Inc Root CA and MySmartCard - DOD EMAIL CA-15 - DoD Root CA-2 The smime cert used on this email I can use my smart card to auth againstthe server. But the server must know about DoD Root CA-2. Ok. In my case: https://localhost - self signed certificate and Mysmartcard - my certificate - infocamere root CA And in my trusted certificates keystore there is infocamere root CA. Please find in attachment a signed text file you can read my cert info from. Thanks Marcello myfile.txt.p7m Description: S/MIME encrypted message - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
AbandonedObjectPool is used error
Hi Any one help me out this problem . I am using jstl tags to access database. I am getting the following error AbandonedObjectPool is used (org.apache.commons.dbcp.abandonedobjectp...@16eb6bc) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 300 -- View this message in context: http://www.nabble.com/AbandonedObjectPool-is-used-error-tp25973799p25973799.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: clent authentication using a smard card
-Original Message- From: Marcello Marangio [mailto:m.maran...@innova.puglia.it] -Messaggio originale- Da: Jason Pyeron [mailto:jpye...@pdinc.us] -Original Message- From: Marcello Marangio [mailto:m.maran...@innova.puglia.it] Da: Jason Pyeron [mailto:jpye...@pdinc.us] From: Marcello Marangio [mailto:m.maran...@innova.puglia.it] Da: Jason Pyeron [mailto:jpye...@pdinc.us] Ok. I made the same thing with IE and in the debug it says null cert chain during the client authentication handshake. Now I am confused... Lets step back and look. Can you provide the smart card and server certificate chain (no keys please)? Hang on a second... The server certificate is an self signed certificate I made with keytool. The smart card certificate, instead, is a real one, I use to legally sign electronic documents; the issuer is an Italian CA. Do you expect the issuer of the smart card certificate to be the same as the server one? Not always. Lets take for example: https://mail.pdinc.us -PD Inc Public CA-PD Inc Root CA and MySmartCard - DOD EMAIL CA-15 - DoD Root CA-2 The smime cert used on this email I can use my smart card to auth againstthe server. But the server must know about DoD Root CA-2. Ok. In my case: https://localhost - self signed certificate and Mysmartcard - my certificate - infocamere root CA And in my trusted certificates keystore there is infocamere root CA. As a point of note, we always avoid using self signed certs for any purpose other than a CA. Lets take 1st few steps on making this more proper. 1. Create a self signed CA cert. 2. Create your web server cert and sign it with the CA. 3. install it (and the chain) in the web server. 4. install the CA into your browser 4a. for IE, it would be the Trusted Root Certification Authorities, 4b. you can do this by browsing to the web server, 4c. ignoring the errors, 4d. viewing the certs (click on the padlock) 4e. look at the chain, (there is a heiarchy right?) 4f. Select and open the root ot the heiarchy 4g. Install cert 4g1. select where to place 4g2. select Trusted Root Certification Authorities (if for all users select all users physical store for TRCA) 5. exit browser (all of the windows, verify iexplore.exe is not running), and revisit server, confirming no security prompts. Let me know if/where you get stuck. Please find in attachment a signed text file you can read my cert info from. Thanks Marcello -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat wait to start
2009/10/20 NabiL elaomari.na...@gmail.com: I use Tomcat 6.x running on server A (Linux redhat 5). i deployed a AMQ war file. This application is waiting to acquire a lock because i run successfully the same application on another server B (Linux + Tomcat 6). We will need more information in order to solve this. What lock is what part of your system trying to acquire, from where? This sounds like an application problem rather than a Tomcat one? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat + APR: 'Invalid Server SSL Protocol' (was 'Tomcat + APR .. Socket bind failed')
From: Ken Johanson [mailto:tomcat-u...@kensystem.com] Subject: Re: Tomcat + APR: 'Invalid Server SSL Protocol' (was 'Tomcat + APR .. Socket bind failed') the solution to this was to add the element: Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on/ Perhaps the statement should be do not remove the element, since it's present in the standard Tomcat download. If you are using a 3rd-party repackaged version of Tomcat that took out that Listener element, you could file a bug report with them. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: doubts about tomcat form based authentication
I'm interested in what others have to say about this too...for instance there is no provision for disabling an account either...if the account exists you can login with it. I'm not sure I understand the second part of your question about authorization...do yo mean authorization or authentication?...if you really mean authentication, it sounds to me like you don't have something set up correctly...you should be getting a 403 access denied in both firefox and ie if login fails. Authorization has nothing to do with form based authentication and would be handled by the container based on the roles you create. Curtis On Tue, Oct 20, 2009 at 1:50 AM, Nirvann jatin.kulka...@yahoo.com wrote: I am trying to explore the form based authentication provided by container. I have some doubts regarding same. The first thing is what mechanism can be used to handle authorization errors. For authentication we have control of jsp pages (Login and Login error pages). But there is nothing to let users know that they are failing role based authorization. Secondly, a subquestion of first, how does the container signal an authorization error. I tried with IE and Mozilla. In IE I get a 404 resource not found. In mozilla it just displays a blank page. regards, nirvan. -- View this message in context: http://www.nabble.com/doubts-about-tomcat-form-based-authentication-tp25970503p25970503.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Curtis Garman Web Programmer Heartland Community College - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Questions on Single Sign On?
Andre, I am using a realm for this. I decided that the best route to go on this is if a user is actively logged in and tries to log in again (while already authenticated) to invalidate the 'other' session and continue on, that way of the browser dies, they can still get in. I have however not clue one on how to do this. What is put in the session upon authentication that I could have my code look for to invalidate the other live session? - Josh On Mon, Oct 12, 2009 at 10:01 AM, André Warnier a...@ice-sa.com wrote: Josh Gooding wrote: To my knowledge the Single Sign on in Tomcat is a way for all of your back end applications in your VH to recognize that you have logged in to one place, and all of the apps belonging to that VH will be logged into. Well, kind of.. What I am trying to do is restrict the login from users to one single session. (i.e. if you are logged in once, you cannot log in again unless your session expires or you log out.) Is this possible with what is included with Tomcat or is this going to take some custom code? Either way us fine, i'm just trying to use the server to handle as much of the work load as possible and lessen the actual coding load. It really depends on what kind of login (or rather, user authentication) you have set up. If you are using Tomcat's integrated (or container-based) authentication mechanism, then as far as I know the authenticated user-id is something that will be stored in the session data. As long as the session is valid, the user will not be asked to re-authenticate. As soon as the session is invalidated and they try to access a webapp that is submitted to AAA, they will be asked to login again. This is true for all webapps that are in the same realm. It is fairly well explained here : http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Single%20Sign%20On The keys here are which kind of AAA you are using, the Realm of your webapps, the session and its associated cookie. Note that this kind of SSO is Tomcat-specific, and valid only for a single Tomcat. What many of my customers understand by SSO is a bit different : it means that they wish to login once in the morning when they turn on their workstation, and never again during the day. They then want this single login to be valid, automatically, for all servers and applications they access during the day, whether they are running under Tomcat or not (but also the ones running under Tomcat). That's a different story. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Implementing custom authentication on Tomcat 6.x
I have an issue with finding a proper custom authentication mechanism with Tomcat (6.x). Currently I have a Tomcat 6.0.20 setup with the standard org.apache.catalina.realm.JAASRealm. The http-header is populated on an outside authentication server so the user is considered already authenticated when he reaches Tomcat. I have my own callback handler class which takes the name of the user and a list of roles of the user from the incoming http-header and populates the subject structure with a UserPrincipal and some RolePrincipal:s, this works fine. My goal is to use declarative authorization JAAS in Tomcat. But I am looking for how to get the Tomcat to understand that the authentication mechanism is not to open a userid/pwd-box (using login-config as BASIC etc.) but instead to simply accept what is coming in the header as populated in the subject structure. My LoginModule I can itself have to accept the subject structure, but something is missing as I don't know how to work around the login-config as BASIC etc. etc. I may not be on the correct track, but my research goes to NonLoginAuthenticator, which extends the same class AuthenticatorBase as BasicAuthenticator, DigestAuthenticator, and FormAuthenticator. But I cannot find the 'hook' how to use NonLoginAuthenticator instead, if I am on the correct track... Johan
InterruptedIOException when loading pre-compiled JSP
I'm using Tomcat 6.0.20 on Solaris 10 and JDK 1.6.0_16 I have a webapp that seemingly randomly fails to work due do a NoClassDefFoundError. The .tag files and JSPs are being pre-compiled and the webapp's web.xml is modified to reference the pre-compiled classes. My application code fails with the error: Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/cg/refreshCookie_tag at jsp.WEB_002dINF.jsp.favoritesBrowse_jsp._jspx_meth_cg_005frefreshCookie_005f0(favoritesBrowse_jsp.java:551) at jsp.WEB_002dINF.jsp.favoritesBrowse_jsp._jspx_meth_c_005fif_005f0(favoritesBrowse_jsp.java:523) at jsp.WEB_002dINF.jsp.favoritesBrowse_jsp._jspService(favoritesBrowse_jsp.java:177) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:227) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:257) at org.springframework.web.servlet.ViewRendererServlet.renderView(ViewRendererServlet.java:111) at org.springframework.web.servlet.ViewRendererServlet.processRequest(ViewRendererServlet.java:84) at org.springframework.web.servlet.ViewRendererServlet.doGet(ViewRendererServlet.java:65) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) What I see in catalina.out the first time the webapp fails is the following InterruptedIOException. It appears that the classloader reading from the file is interrupted somehow which causes the class load to fail and once it has failed once it is never retried. My only resolution is to restart the server. I haven't been able to pin down any particular cause for this problem yet. Has anyone here seen anything similar? java.io.InterruptedIOException at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(FileInputStream.java:199) at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2093) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1786) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at jsp.WEB_002dINF.jsp.favoritesBrowse_jsp._jspx_meth_cg_005frefreshCookie_005f0(favoritesBrowse_jsp.java:551) at jsp.WEB_002dINF.jsp.favoritesBrowse_jsp._jspx_meth_c_005fif_005f0(favoritesBrowse_jsp.java:523) at jsp.WEB_002dINF.jsp.favoritesBrowse_jsp._jspService(favoritesBrowse_jsp.java:177) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488) at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:227) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:257) at org.springframework.web.servlet.ViewRendererServlet.renderView(ViewRendererServlet.java:111) at org.springframework.web.servlet.ViewRendererServlet.processRequest(ViewRendererServlet.java:84) at org.springframework.web.servlet.ViewRendererServlet.doGet(ViewRendererServlet.java:65) smime.p7s Description: S/MIME Cryptographic Signature
Multiple Instance of Tomcat 5 on Centos 5
I have Centos 5 on which I yum installed Tomcat5. Does anyone have tips for setting up multiple instances of TC in this configuration? I have seen some how-tos with other flavors of Linux. Its it going to be a matter of copying some files around and customizing the /etc/init.d/tomcat5 script? Thanks in advance -- View this message in context: http://www.nabble.com/Multiple-Instance-of-Tomcat-5-on-Centos-5-tp25975547p25975547.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: doubts about tomcat form based authentication
Curtis Garman wrote: I'm interested in what others have to say about this too...for instance there is no provision for disabling an account either...if the account exists you can login with it. I'm not sure I understand the second part of your question about authorization...do yo mean authorization or authentication?...if you really mean authentication, it sounds to me like you don't have something set up correctly...you should be getting a 403 access denied in both firefox and ie if login fails. Authorization has nothing to do with form based authentication and would be handled by the container based on the roles you create. Curtis I mean't authorization. Consider a scenario as follows. There are two users, admin and user. Consider two pages adminPage.jsp and userPage.jsp. Admin has rights to both the pages but user can access only userPage.jsp. Lets assume that the user logs in as user (not admin) and accesses userPage.jsp. It is fine upto this point because user has access to userPage.jsp. But what happens if the user tries to access adminPage.jsp for which he is not authorized. As you have indicated it should fail through 403 access denied. But, I am getting HTTP 404 - File not found in IE and blank page in Mozilla. -- View this message in context: http://www.nabble.com/doubts-about-tomcat-form-based-authentication-tp25970503p25975955.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple Instance of Tomcat 5 on Centos 5
homerlex wrote: I have Centos 5 on which I yum installed Tomcat5. Does anyone have tips for setting up multiple instances of TC in this configuration? I have seen some how-tos with other flavors of Linux. Its it going to be a matter of copying some files around and customizing the /etc/init.d/tomcat5 script? Basically yes, plus changing the ports used by each instance in its own private conf/server.xml file. But that is easier said than done if you are using a pre-packaged version which sets up symlinks all over the place.. The first question that should probably be asked is whether you really need several Tomcat instances, as opposed to one instance with several Host's. That is a lot easier to achieve, and it may be enough for what you have in mind. Each such Host has a distinct DNS name, and a distinct ../webapps directory, so you can segregate things quite flexibly without going through the hassle of changing startup scripts and links. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 5 SSL keytool error: java.lang.Exception: Public key in reply and keystore don't match
I have a tomcat 5 web server setup on CentOS, I am currently working on installing a SSL cert but don't seem to be having any luck. I get the following error: keytool error: java.lang.Exception: Public key in reply and keystore don't match I have reissued the cert through Network Solutions and followed the following instructions to generate and install the cert. I have run out of my patience with them. Is there anything else that I may be missing? Thanks http://www.networksolutions.com/support/csr-for-java-based-webservers-su ch-as-tomcat-using-keytool/ http://www.networksolutions.com/support/installation-for-java-based-webs ervers-such-as-tomcat-using-keytool/ Miguel This email and any files transmitted with it are the confidential property of Focus Holdings, LLC and its subsidiaries, and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat wait to start
Any help !! NabiL wrote: Hi, I use Tomcat 6.x running on server A (Linux redhat 5). i deployed a AMQ war file. This application is waiting to acquire a lock because i run successfully the same application on another server B (Linux + Tomcat 6). Now if i try to restart tomcat A, it can't start because attempts to acquire lock, with this situation all application deployed on this tomcat server is impacted. How can i avoid this situation and tomcat A continue to start ? Thanks in advance. -- View this message in context: http://www.nabble.com/Tomcat-wait-to-start-tp25973792p25976315.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: doubts about tomcat form based authentication
Nirvann: I mean't authorization. Consider a scenario as follows. There are two users, admin and user. Consider two pages adminPage.jsp and userPage.jsp. Admin has rights to both the pages but user can access only userPage.jsp. Lets assume that the user logs in as user (not admin) and accesses userPage.jsp. It is fine upto this point because user has access to userPage.jsp. But what happens if the user tries to access adminPage.jsp for which he is not authorized. As you have indicated it should fail through 403 access denied. But, I am getting HTTP 404 - File not found in IE and blank page in Mozilla. In a situation like the one you describe my Tomcat responds with 403 response code and the standard access denied page (I did not change it in web.xml). So, I second Curtis' guess that you did something wrong. BTW: What IE shows you is of very little use, unless you turn off friendly error messages. -- Regards mks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
apache/tomcat/modjk URL path question
I know that there is probably an easy solution to this, but all the posts I have found relating to this don't seem to match my scenario, and most of them I frankly don't get. My issue is this: I have a server running apache and tomcat. The server is behind a load balancer and firewall that manages mapping url paths to specific servers. So we have a URL: http://example.com and based on the path it will do this: http://example.com - serverA (/app/htdocs) http://example.com/path - serverB (/app/htdocs/path) I have an app in tomcat that I have mounted via JK. If I go to http://myipaddress:8080/MyApp (by using the ip address I can bypass the load balancer) than my app loads. If I do http://myipaddress/MyApp my app loads (again bypassing the LB, but using the modjk). But if I do http://example.com/MyApp than obviously this won't work since the LB will point to serverA. What seems to be at issue is that our configuration requires that our http root be htdocs and that there be a sub called 'path' so that although there is a root '/' all of our content is essentially served from '/path/' since the '/ ' URL will always go to serverA. So I have adjusted my modjk mount to handle requests that look like: http://example.com/path/MyApp, but when tomcat tries to handle this, obviously it can't find anything at /path/MyApp. It expects /MyApp. I tried setting a context with path=/path/MyApp docBase=MyApp, but that didn't work. I still get a 404. So, how can I specify that tomcat should expect '/path' in the URL for all potential apps? Thanks in advance. -- View this message in context: http://www.nabble.com/apache-tomcat-modjk-URL-path-question-tp25976682p25976682.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: doubts about tomcat form based authentication
I would also google making internet explorer display your error page ...this is something I learned in the apache cookbook...IE will display it's own error message if your error page isn't at least 512 bytes...anyway you might want to research this a little Did you define a custom 403 page? Are you sure you aren't getting the 404 looking for your 403 page? I'm not sure what else to tell you because I've never had this problem. It might help if you post some of your configuration/code Curtis 2009/10/20 Markus Schönhaber tomcat-us...@list-post.mks-mail.de: Nirvann: I mean't authorization. Consider a scenario as follows. There are two users, admin and user. Consider two pages adminPage.jsp and userPage.jsp. Admin has rights to both the pages but user can access only userPage.jsp. Lets assume that the user logs in as user (not admin) and accesses userPage.jsp. It is fine upto this point because user has access to userPage.jsp. But what happens if the user tries to access adminPage.jsp for which he is not authorized. As you have indicated it should fail through 403 access denied. But, I am getting HTTP 404 - File not found in IE and blank page in Mozilla. In a situation like the one you describe my Tomcat responds with 403 response code and the standard access denied page (I did not change it in web.xml). So, I second Curtis' guess that you did something wrong. BTW: What IE shows you is of very little use, unless you turn off friendly error messages. -- Regards mks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Curtis Garman Web Programmer Heartland Community College - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat not displaying images
Hi, I am using apache Tomcat with mod_jk. When i point my browser to www.mycompany.com/myapp, myapp works fine and displays index.jsp. However, none of the images in my jsp show up. In fact, all JSPs HTMLs in myapp load fine, but none of the images (gif/jpg) or the scripts (.js files) load. I even tried directly accessing the images by www.mycompany.com/myapp/images/image_name.gif. I know this link is correct because the images folder is within myapps. There is URL forwarding or anything like that. Everything works fine when i push the same build on my IIS+Resin server. Am i missing a setting in Apache or Tomcat? Why are non-jsp file being filtered? Thanks! -- View this message in context: http://www.nabble.com/Tomcat-not-displaying-images-tp25976740p25976740.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Multiple Instance of Tomcat 5 on Centos 5
Thanks for the reply. The reason we wanted multiple instances was that hot deploy fails from time to time so we need to restart TC. We want to be able to modify 1 app without affecting the other. Anyway, we've decide to just go with a separate VM for now :-) Thanks again. awarnier wrote: homerlex wrote: I have Centos 5 on which I yum installed Tomcat5. Does anyone have tips for setting up multiple instances of TC in this configuration? I have seen some how-tos with other flavors of Linux. Its it going to be a matter of copying some files around and customizing the /etc/init.d/tomcat5 script? Basically yes, plus changing the ports used by each instance in its own private conf/server.xml file. But that is easier said than done if you are using a pre-packaged version which sets up symlinks all over the place.. The first question that should probably be asked is whether you really need several Tomcat instances, as opposed to one instance with several Host's. That is a lot easier to achieve, and it may be enough for what you have in mind. Each such Host has a distinct DNS name, and a distinct ../webapps directory, so you can segregate things quite flexibly without going through the hassle of changing startup scripts and links. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Multiple-Instance-of-Tomcat-5-on-Centos-5-tp25975547p25976821.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat not displaying images
On Tue, Oct 20, 2009 at 8:02 AM, ankush2kn ankush...@yahoo.com wrote: I am using apache Tomcat with mod_jk. When i point my browser to www.mycompany.com/myapp, myapp works fine and displays index.jsp. However, none of the images in my jsp show up. In fact, all JSPs HTMLs in myapp load fine, but none of the images (gif/jpg) or the scripts (.js files) load. I even tried directly accessing the images by www.mycompany.com/myapp/images/image_name.gif. And when you try that, the 404 is generated by [ ] httpd [ ] Tomcat ? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat wait to start
Hi again, I use ActiveMQ5.3 with shared database Mysql. 2 instances shared the same DB. Peter Crowther wrote: 2009/10/20 NabiL elaomari.na...@gmail.com: I use Tomcat 6.x running on server A (Linux redhat 5). i deployed a AMQ war file. This application is waiting to acquire a lock because i run successfully the same application on another server B (Linux + Tomcat 6). We will need more information in order to solve this. What lock is what part of your system trying to acquire, from where? This sounds like an application problem rather than a Tomcat one? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat-wait-to-start-tp25973792p25976887.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 5 SSL keytool error: java.lang.Exception: Public key in reply and keystore don't match
I have a tomcat 5 web server setup on CentOS, I am currently working on installing a SSL cert but don't seem to be having any luck. I get the following error: keytool error: java.lang.Exception: Public key in reply and keystore don't match I have reissued the cert through Network Solutions and followed the following instructions to generate and install the cert. I have run out of my patience with them. Is there anything else that I may be missing? Thanks http://www.networksolutions.com/support/csr-for-java-based-webservers-su ch-as-tomcat-using-keytool/ http://www.networksolutions.com/support/installation-for-java-based-webs ervers-such-as-tomcat-using-keytool/ Miguel This email and any files transmitted with it are the confidential property of Focus Holdings, LLC and its subsidiaries, and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat not displaying images
Looks like the 404 is generated by Httpd. I think so because when i type in a bad JSP url, i get my applications 'page-not-found' error page. But for gif/jpg, i get -- Not Found The requested URL /nuride/images/amazon.jpg was not found on this server. Hassan Schroeder-2 wrote: On Tue, Oct 20, 2009 at 8:02 AM, ankush2kn ankush...@yahoo.com wrote: And when you try that, the 404 is generated by [ ] httpd [ ] Tomcat ? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan -- View this message in context: http://www.nabble.com/Tomcat-not-displaying-images-tp25976740p25977000.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Questions on Single Sign On?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Josh, On 10/20/2009 9:19 AM, Josh Gooding wrote: I am using a realm for this. I decided that the best route to go on this is if a user is actively logged in and tries to log in again (while already authenticated) to invalidate the 'other' session and continue on, that way of the browser dies, they can still get in. I have however not clue one on how to do this. What is put in the session upon authentication that I could have my code look for to invalidate the other live session? There is nothing put into the session to help you with this: your web application will have to provide all of the marking and plumbing required to fulfill this requirement. A suggestion: 1. Modify your realm to place a token into the session to identify the user. Also, register the session with a session registry you maintain that tracks user - session. 2. Implement an HttpSessionListener, where the sessionDestroyed method removes the session from your registry. 3. When a user tries to login, your realm can look up in this registry for any existing sessions and call invalidate() on them. You can do this in a slightly less invasive way if you decide that the request's Principal is sufficient for identification. You can write a Filter that stores the requests's principal in the session (if they both exist) and then write an HttpSessionListener that does the mapping. Any time a session is created with an already-known principal, you kill the previous one. Hmm there may be some timing problems with this (because the session is created before you are able to stuff he requests' Principal into it...). You may have to play around with this a bit. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrd1C4ACgkQ9CaO5/Lv0PA75QCfYSmWaZs9RlcZ/Cdzs41Bex1J ryIAn3hOmk8a6Ul4meqOuKMpGPzcQDvq =QNQO -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Questions on Single Sign On?
Josh Gooding wrote: Andre, I am using a realm for this. I decided that the best route to go on this is if a user is actively logged in and tries to log in again (while already authenticated) to invalidate the 'other' session and continue on, that way of the browser dies, they can still get in. I have however not clue one on how to do this. What is put in the session upon authentication that I could have my code look for to invalidate the other live session? Josh, I think that I fail to see what you are trying to achieve. Assuming you are using container managed security as described here : http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#Quick%20Start then what normally happens is this : - a user, with his browser, accesses a URL on your server - Tomcat maps this requested URL to a webapp - in doing so, Tomcat sees that this webapp is submitted to authentication/authorization - Tomcat then wonders whether this user is already authenticated. For that, it checks if this request is associated with a session (which can be indicated by a JSESSIONID cookie, or a request attribute coming with the request). (*) - If yes, then Tomcat will retrieve the user-id associated with this session, and then check if this user-id has the appropriate role for accessing this webapp. If not, the request is rejected, else it proceeds. - (**) If no, then Tomcat will trigger a user authentication. Depending on how this is set up, it will either send back a html login page to the browser, or a 401 status code to trigger the browser's builtin login dialog. - The browser will then send back the user's credentials. Tomcat will check them (using the configured method for that), and if they are ok, will set the user-id, and record it in the session data. Then we go back to (*) above. If the credentials are not OK, then it probably loops at the (**) stage. Now, how would a user in this case try to login a second time, when they are already authenticated ? And, does it matter ? (are you trying to limit the number of times the same physical user is allowed to run the /application/ simultaneously ?) Ok, let's say that the user leaves his first session open on workstation A, and starts another browser session on station B (or, his browser crashes and he restarts the browser, thus losing the previous session-id information). He thus accesses the original URL again, and Tomcat attributes a new session to this other browser. (Or else, you are doing something like pre-emptive authentication : you start each session by a login page, explicitly. But then, you are no longer really in the logic of Tomcat's container managed security.) Tomcat itself will not provide a way to avoid that (the two or more individual sessions at the Tomcat level), because for Tomcat, these are really two independent sessions, and the second one has no relation to the first, and that second session does not indeed contain any Tomcat-level link to the first session. If you want to provide such a link, then the only way I see would be at the application level, for example with a servlet filter wrapping your webapps, which would store somewhere the fact that this /user-id/ is already in use (and its associated Tomcat session-id). Then it would be the responsibility of this servlet filter also, to destroy the previous Tomcat session linked to that same user-id, when this same user-id shows up with a different session-id. But I cannot tell you if this is possible using the standard Tomcat API. You would have to be able to pass another Tomcat jsessionid (than your own) to the session.invalidate() method, and I'm not sure that this is possible. (I think that it would open the door to all kinds of misbehaviours if it was.) To summarise, from what I think I understand which you want, it does not marry very well with Tomcat's container managed security, and you should think more about a servlet filter based security mechanism, where you can do pretty much as you please. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat not displaying images
On Tue, Oct 20, 2009 at 8:14 AM, ankush2kn ankush...@yahoo.com wrote: Looks like the 404 is generated by Httpd. Then it sounds like your configuration isn't forwarding requests for images to Tomcat. I haven't used mod_jk in forever, but maybe if you post the relevant part of your config file here someone will spot something :-) -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat wait to start
2009/10/20 NabiL elaomari.na...@gmail.com: I use ActiveMQ5.3 with shared database Mysql. 2 instances shared the same DB. OK. Do you have a stack trace, or otherwise know which part of whose code is waiting to acquire the lock? There could be at least four places: 1) Tomcat; 2) MySQL; 3) ActiveMQ; 4) Your code. What I'm asking is how you know that this is a Tomcat issue, rather than any of the others. Or how you'd find out! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat not displaying images
ankush2kn wrote: Hi, I am using apache Tomcat with mod_jk. When i point my browser to www.mycompany.com/myapp, myapp works fine and displays index.jsp. However, none of the images in my jsp show up. In fact, all JSPs HTMLs in myapp load fine, but none of the images (gif/jpg) or the scripts (.js files) load. I even tried directly accessing the images by www.mycompany.com/myapp/images/image_name.gif. I know this link is correct because the images folder is within myapps. There is URL forwarding or anything like that. Everything works fine when i push the same build on my IIS+Resin server. Am i missing a setting in Apache or Tomcat? Why are non-jsp file being filtered? Can you show us which JkMount (or other Apache-to-Tomcat mapping instructions) are in your Apache httpd configuration file(s) ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Questions on Single Sign On?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 10/20/2009 11:22 AM, André Warnier wrote: Now, how would a user in this case try to login a second time, when they are already authenticated ? I think he's talking about a second login using the same credentials from another terminal. And, does it matter? Probably some security-based requirement. If you want to provide such a [feature], then the only way I see would be at the application level Yup. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrd2CEACgkQ9CaO5/Lv0PDMUACgkbDx4DMSPg17QLRVCikVggwI rh4AoKXLp9L4KCNvkOsf8OsbK+23EWhq =MXRl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Best Tomcat O.S. and Server Configuration
Hi all, I've just bought a dedicated server, and I'm looking 4 the best configuration. I need to run Java (Struts2-hibernate+mysql) applications through Tomcat. Motherboard supports till 8GB RAM CPU Intel 2,6GHz Pentium Dual Core 4GB RAM DDR2 667 MHz 2HD SATA 500GB 7200rpm in RAID 1 software I'm thinking to create 4 virtual servers: 1) Developing Environment. It contains repository (svn) and Trac application (a project management web app.) 2) Test Environment. Identical to Production. 3) Production Environment. Must run Struts2+Hibernate apps. 4) Parking Environment. Dedicated to simple static sites and parked domains. 5) Mysql Environment. To be used and not duplicated from the other virtualizations. I'd create also a virtual shared storage. I'm going to use XenServer to virtualize, I'm almost sure about it. Yet, I still don't know which O.S. is better to use on the virtualizations.. over of all, on test and production environments. Please, tell me some advice about it.. or about the right strategy in virtualizing the system. Thanx.. ciao ciao -- View this message in context: http://www.nabble.com/Best-Tomcat-O.S.-and-Server-Configuration-tp25977685p25977685.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: doubts about tomcat form based authentication
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nirvann, On 10/20/2009 2:50 AM, Nirvann wrote: The first thing is what mechanism can be used to handle authorization errors. For authentication we have control of jsp pages (Login and Login error pages). But there is nothing to let users know that they are failing role based authorization. Tomcat should be issuing a 403 error, which you ought to be able to capture using web.xml's error-page configuration. Secondly, a subquestion of first, how does the container signal an authorization error. See above. I tried with IE and Mozilla. In IE I get a 404 resource not found. In mozilla it just displays a blank page. If this is the case, then you probably have some kind of broken configuration. 404 is not appropriate for forbidden, but if you are trying to forward to a page that doesn't exist, the 404 might be masking the 403 error. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrd3VwACgkQ9CaO5/Lv0PAqTACeJ5MKYK7PsUGlsQ9gQCl7j6Zc uNwAoIIw/WB+QO5L1XuFs3YIZB9OOZ5R =lDTg -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat not displaying images
-- Here's the configuration in my httpd.conf # Mod_jk settings # Load mod_jk module LoadModulejk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile /etc/tomcat6/workers.properties # Where to put jk shared memory JkShmFile /var/log/tomcat6/mod_jk.shm # Where to put jk logs JkLogFile /var/log/tomcat6/mod_jk.log # Set the jk log level [debug/error/info] JkLogLeveldebug # Select the log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat %w %V %T # mounts JkMount /myapp ajp13 JkMount /myapp/* ajp13 -- and here's the config in my workers.propoerties worker.list=ajp13 ## Set properties for worker1 (ajp13) worker.ajp13.type=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 worker.ajp13.lbfactor=1 worker.ajp13.connection_pool_timeout=600 worker.ajp13.socket_keepalive=1 worker.ajp13.socket_timeout=60 awarnier wrote: Can you show us which JkMount (or other Apache-to-Tomcat mapping instructions) are in your Apache httpd configuration file(s) ? -- View this message in context: http://www.nabble.com/Tomcat-not-displaying-images-tp25976740p25977934.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Best Tomcat O.S. and Server Configuration
so which linux distro should you use? that question has no right or wrong answer ;) i don't know much about virtualization, but if I had 4 (or 5) servers to do those things, here's what i would use: 1) CENTOS: SVN MySQL 2) Slackware: Tomcat Trac (if if runs inside of Tomcat) 3) Slackware: Tomcat 4) Slackware: Tomcat generally: Centos is full-featured but also somewhat heavyweight and bolted down out of the box Slackware is very flexible but we've found it's lack of package management difficult and as such use it only for httpd/tomcat I've never touch SuSE or Ubuntu so can't comment on those. Gentoo is super high performance but could lead to your head exploding during setup. On Tue, Oct 20, 2009 at 11:52 AM, beppe_c giuseppe.ca...@calbisolutions.com wrote: Hi all, I've just bought a dedicated server, and I'm looking 4 the best configuration. I need to run Java (Struts2-hibernate+mysql) applications through Tomcat. Motherboard supports till 8GB RAM CPU Intel 2,6GHz Pentium Dual Core 4GB RAM DDR2 667 MHz 2HD SATA 500GB 7200rpm in RAID 1 software I'm thinking to create 4 virtual servers: 1) Developing Environment. It contains repository (svn) and Trac application (a project management web app.) 2) Test Environment. Identical to Production. 3) Production Environment. Must run Struts2+Hibernate apps. 4) Parking Environment. Dedicated to simple static sites and parked domains. 5) Mysql Environment. To be used and not duplicated from the other virtualizations. I'd create also a virtual shared storage. I'm going to use XenServer to virtualize, I'm almost sure about it. Yet, I still don't know which O.S. is better to use on the virtualizations.. over of all, on test and production environments. Please, tell me some advice about it.. or about the right strategy in virtualizing the system. Thanx.. ciao ciao -- View this message in context: http://www.nabble.com/Best-Tomcat-O.S.-and-Server-Configuration-tp25977685p25977685.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Best Tomcat O.S. and Server Configuration
2009/10/20 beppe_c giuseppe.ca...@calbisolutions.com: I've just bought a dedicated server, and I'm looking 4 the best configuration. I need to run Java (Struts2-hibernate+mysql) applications through Tomcat. Motherboard supports till 8GB RAM CPU Intel 2,6GHz Pentium Dual Core 4GB RAM DDR2 667 MHz That's not large for 5 virtual servers. 2HD SATA 500GB 7200rpm in RAID 1 software I'm thinking to create 4 virtual servers: 1) Developing Environment. It contains repository (svn) and Trac application (a project management web app.) 2) Test Environment. Identical to Production. 3) Production Environment. Must run Struts2+Hibernate apps. 4) Parking Environment. Dedicated to simple static sites and parked domains. 5) Mysql Environment. To be used and not duplicated from the other virtualizations. I'd create also a virtual shared storage. I'm going to use XenServer to virtualize, I'm almost sure about it. Yet, I still don't know which O.S. is better to use on the virtualizations.. over of all, on test and production environments. Please, tell me some advice about it.. or about the right strategy in virtualizing the system. I'll use my usual quote: It depends on what you're trying to do. How heavy is the traffic to your machine? Why do you want the boundaries you have drawn - what is the benefit to you of each of those boundaries? Unless you have very strong reasons to keep them separate, I would suggest combining the production and parking environments into one virtual server. The overhead of an entire OS and Web server for parking and static sites will be high compared to the overhead of just running them on the production server. If you only have one MySQL instance, then your test environment is *not* identical to your production environment as you must use different instances or databases for the test and production systems. It's very easy to forget to change the configuration as you move between the two. I would install MySQL on test and on production. If you feel you can't afford the RAM to do this... you probably need to add more RAM. You might want a third instance on developing as well, and just get rid of the separate MySQL environment. So I'd go for at most three VMs: test, production and possibly developing if you don't want to merge your svn repository and trac onto your production server. OS-wise, I would pick the one that you're familiar with. The cost of learning a new OS is far higher than the cost of the RAM to run your preferred OS on the virtual machines - though if you're most familiar with Windows, I'd beware of paying for 5 x Windows licenses! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5 SSL keytool error: java.lang.Exception: Public key in reply and keystore don't match
Miguel, I just installed a cert using our own CA, had a bit of trouble myself, but it worked in the end. I found comodo's and Herong Yang's instructions useful. See http://www.herongyang.com/crypto/OpenSSL_Signing_keytool_CSR.html and https://support.comodo.com/index.php?_m=knowledgebase_a=viewarticlekbarticleid=1204 One thing to note is that when you import cert, use the same certificate alias as the key's (for example, -genkey -alias tomcat followed by -import -trustcacerts -aliast tomcat) On Tuesday 20 October 2009 10:36, Miguel Ortiz wrote: I have a tomcat 5 web server setup on CentOS, I am currently working on installing a SSL cert but don't seem to be having any luck. I get the following error: keytool error: java.lang.Exception: Public key in reply and keystore don't match I have reissued the cert through Network Solutions and followed the following instructions to generate and install the cert. I have run out of my patience with them. Is there anything else that I may be missing? Thanks http://www.networksolutions.com/support/csr-for-java-based-webservers-su ch-as-tomcat-using-keytool/ http://www.networksolutions.com/support/installation-for-java-based-webs ervers-such-as-tomcat-using-keytool/ Miguel -- Nicholas Sushkin, Senior Software Engineer http://www.aggex.com http://www.wealthinformationexchange.com smime.p7s Description: S/MIME cryptographic signature
How do I debug dispatching errors?
Hello, I have a rather small application using servlets. I am encountering a problem where the dispatching is not working properly. There is a 'web.xml' file that looks like the first listing below. I have a debug statement set on the first line in the constructor of com.mycorp.referral.servlets.CreateRelationshipServlet. However, when I call the servlet with this URL: http://localhost:8081/MyApp/CreateRelationshp ... the createRelationship is not called - rather, ProcessAction is called again. I have set the debug levels in server.xml and web.xml to 'DEBUG'... but I do not get any errors in those logs. How can I debug the dispatcher and determine why it's not dispatching properly? Thanks very much!! ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameLoginServlet/servlet-name servlet-classcom.mycorp.referral.servlets.LoginServlet/servlet-class !-- init-param param-namepropertyFileNameLocation/param-name param-valueC:/EclipseLib/FarmersQueue.properties/param-value /init-param -- /servlet servlet servlet-nameCreateRelationshipServlet/servlet-name servlet-classcom.mycorp.referral.servlets.CreateRelationshipServlet/servlet-class /servlet servlet servlet-nameProcessActionServlet/servlet-name servlet-classcom.mycorp.referral.servlets.ProcessActionServlet/servlet-class /servlet servlet servlet-nameUpdateRelationshipServlet/servlet-name servlet-classcom.mycorp.referral.servlets.UpdateRelationshipServlet/servlet-class /servlet servlet-mapping servlet-nameLoginServlet/servlet-name url-pattern/Login/url-pattern /servlet-mapping servlet-mapping servlet-nameCreateRelationshipServlet/servlet-name url-pattern/CreateRelationship/url-pattern /servlet-mapping servlet-mapping servlet-nameProcessActionServlet/servlet-name url-pattern/ProcessAction/url-pattern /servlet-mapping servlet-mapping servlet-nameUpdateRelationshipServlet/servlet-name url-pattern/UpdateRelationship/url-pattern /servlet-mapping welcome-file-list welcome-fileLogin.jsp/welcome-file /welcome-file-list /web-app - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Questions on Single Sign On?
a usecase would be Jetspeed JSR-168 portal manager which handles org.apache.jetspeed.ehcache.group.ttl time factor for each new user session as described at http://portals.apache.org/jetspeed-2/deployguide/jetspeed-properties.html other examples? Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Tue, 20 Oct 2009 11:32:49 -0400 From: ch...@christopherschultz.net To: users@tomcat.apache.org Subject: Re: Questions on Single Sign On? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 10/20/2009 11:22 AM, André Warnier wrote: Now, how would a user in this case try to login a second time, when they are already authenticated ? I think he's talking about a second login using the same credentials from another terminal. And, does it matter? Probably some security-based requirement. If you want to provide such a [feature], then the only way I see would be at the application level Yup. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrd2CEACgkQ9CaO5/Lv0PDMUACgkbDx4DMSPg17QLRVCikVggwI rh4AoKXLp9L4KCNvkOsf8OsbK+23EWhq =MXRl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Hotmail: Free, trusted and rich email service. http://clk.atdmt.com/GBL/go/171222984/direct/01/
Re: Best Tomcat O.S. and Server Configuration
giuseppe.ca...@calbisolutions.com Peter Crowther wrote: I'll use my usual quote: It depends on what you're trying to do. How heavy is the traffic to your machine? Why do you want the boundaries you have drawn - what is the benefit to you of each of those boundaries? Unless you have very strong reasons to keep them separate, I would suggest combining the production and parking environments into one virtual server. The overhead of an entire OS and Web server for parking and static sites will be high compared to the overhead of just running them on the production server. If you only have one MySQL instance, then your test environment is *not* identical to your production environment as you must use different instances or databases for the test and production systems. It's very easy to forget to change the configuration as you move between the two. I would install MySQL on test and on production. If you feel you can't afford the RAM to do this... you probably need to add more RAM. You might want a third instance on developing as well, and just get rid of the separate MySQL environment. So I'd go for at most three VMs: test, production and possibly developing if you don't want to merge your svn repository and trac onto your production server. OS-wise, I would pick the one that you're familiar with. The cost of learning a new OS is far higher than the cost of the RAM to run your preferred OS on the virtual machines - though if you're most familiar with Windows, I'd beware of paying for 5 x Windows licenses! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Thanx Jonatan and Peter.. I think I'll do in the way Peter has suggested. About O.S. I'm oriented on ubuntu server. I was evaluating CentOs but I've read about some problems in the organization and evolution of that open source project.. -- View this message in context: http://www.nabble.com/Best-Tomcat-O.S.-and-Server-Configuration-tp25977685p25978887.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: doubts about tomcat form based authentication
On Tue, Oct 20, 2009 at 10:55 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nirvann, On 10/20/2009 2:50 AM, Nirvann wrote: The first thing is what mechanism can be used to handle authorization errors. For authentication we have control of jsp pages (Login and Login error pages). But there is nothing to let users know that they are failing role based authorization. Tomcat should be issuing a 403 error, which you ought to be able to capture using web.xml's error-page configuration. Secondly, a subquestion of first, how does the container signal an authorization error. See above. I tried with IE and Mozilla. In IE I get a 404 resource not found. In mozilla it just displays a blank page. If this is the case, then you probably have some kind of broken configuration. 404 is not appropriate for forbidden, but if you are trying to forward to a page that doesn't exist, the 404 might be masking the 403 error. Exactly...this is quite possible - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrd3VwACgkQ9CaO5/Lv0PAqTACeJ5MKYK7PsUGlsQ9gQCl7j6Zc uNwAoIIw/WB+QO5L1XuFs3YIZB9OOZ5R =lDTg -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Curtis Garman Web Programmer Heartland Community College - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat wait to start
Hi Peter, There is no bug tomcat side. ActiveMQ is configured with Master/Slave. Tomca's logs indicates that ActiveMQ attempts to acquire the lock, this is why tomcat can't start after ActiveMQ start. Peter Crowther wrote: 2009/10/20 NabiL elaomari.na...@gmail.com: I use ActiveMQ5.3 with shared database Mysql. 2 instances shared the same DB. OK. Do you have a stack trace, or otherwise know which part of whose code is waiting to acquire the lock? There could be at least four places: 1) Tomcat; 2) MySQL; 3) ActiveMQ; 4) Your code. What I'm asking is how you know that this is a Tomcat issue, rather than any of the others. Or how you'd find out! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Tomcat-wait-to-start-tp25973792p25979102.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat wait to start
2009/10/20 NabiL elaomari.na...@gmail.com: There is no bug tomcat side. ActiveMQ is configured with Master/Slave. Tomca's logs indicates that ActiveMQ attempts to acquire the lock, this is why tomcat can't start after ActiveMQ start. Then I would ask on an ActiveMQ list - I doubt anyone here will be able to help you. My own MQ knowledge is 15 years out of date :-(. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Another issue, jTDS with Tomcat 5.5.9
On 16/10/2009 22:04, ULS Tech Support wrote: Hi there, Please start a completely new email for each thread. Replacing the subject line doesn't count, it's called thread hijacking. p Tomcat 5.5.9, using jTDS, with SQL Server 2005 i am getting this issue. 2009/10/16 10:47:15 - sql exception:java.sql.SQLException: No current row in the ResultSet. This issue doesn't happen with TWFreeTDS (in fact, when i switch to twfreetds it works fine).. but from my research so far, i may have been wrong in the way i implemented it. Here is the code. public Vector queryPaged4(String strTableExt) throws SQLException { dbRecords.removeAllElements(); boolean rc = true; ResultSet rs_info = null; boolean bTest = false; DBItems temp = null; //New ** /* This will call a stored procedure, pass in the page # and number to display on each page and will return the results directly. */ CallableStatement call = dbConn.prepareCall({call sp_PagedItems4 (?,?,?,?,?)}); call.setString(1, strTableExt); call.setString(2, filter); call.setString(3, order); call.setInt(4, pageNumber); call.setInt(5, recsPerPage); if (!call.execute())//Query { //No ResultSets Returned; } else { try { rs_info = call.getResultSet(); //Save the total number of records (value) in queryPagedRecords queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); if (queryPagedRecords 0) { //Test for another resultset. boolean bTest = false; bTest = call.getMoreResults(); //Next resultset established, let's get the data! dbResultSet = call.getResultSet(); while (dbResultSet.next()) { //System.out.println(2: + dbResultSet.getInt(ID)); rc = true; //Set the items object based on the resultset. temp = this.setItemsObject(true, dbResultSet); dbRecords.addElement(temp); } } } catch (SQLException e) { System.out.println(SQLException: + e); System.out.println(SQLException Message: + e.getMessage()); } finally { rs_info = null; temp = null; dbResultSet = null; } System.out.println(end); } return dbRecords; } Basically i'm getting the resultsets, but i'm not able to pull the data from the resultsets as i get the error when i try and getInt. Does anyone have any clue on why this is happening, or how i can make this work? I did try and modify the code to the following to see if it helped, but again, i'm still stumped on HOW to retrieve the data from the resultsets. try { System.out.println(start...); int updateCount = 0; updateCount = call.getUpdateCount(); System.out.println(update count = + updateCount); boolean moreResults = true; while (updateCount = 0 || moreResults) { if (!moreResults) { // just eat it updateCount = call.getUpdateCount(); System.out.println(\nupdateCount= + updateCount); } else { // get the data if (rs_info == null) { rs_info = call.getResultSet(); } else { dbResultSet = call.getResultSet(); } //Save the total number of records (value) in queryPagedRecords System.out.println(Got Data, how to process??); } // if ! moreResults else moreResults = call.getMoreResults(); System.out.println(More Results??); } // while //rs_info.setFetchSize(); System.out.println(Lets get data from rs_info); queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); But it stops at the queryPagedRecords = rs_info.getInt(TotalRec); Thanks in advance to anyone who can help. ...Robin - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat wait to start
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 NabiL, On 10/20/2009 7:57 AM, NabiL wrote: I use Tomcat 6.x running on server A (Linux redhat 5). i deployed a AMQ war file. This application is waiting to acquire a lock because i run successfully the same application on another server B (Linux + Tomcat 6). Now if i try to restart tomcat A, it can't start because attempts to acquire lock, with this situation all application deployed on this tomcat server is impacted. How can i avoid this situation and tomcat A continue to start ? One solution is to use lazy or delayed initialization of this resource. That allows your webapp to start up completely even when the required resource isn't available. Whenever you need that resource, you go ahead and connect to it. If it's not available, you throw an error and try again next time. This greatly reduces problems with bi-directional dependencies between web applications (or any other components for that matter). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrd+r4ACgkQ9CaO5/Lv0PDH0ACeKAiyLtGgpRjoH4f5vCTL19TQ 4swAniC9KhTfq6jgSJauq/X0x4pm7arC =9fh7 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Another issue, jTDS with Tomcat 5.5.9
Tell me how i hijacked my own thread? This is my own thread.. and i actually modified the last one i sent out, cleared everything and typed out brand new. Thanks for the help. -- From: Pid p...@pidster.com Sent: Tuesday, October 20, 2009 6:11 AM To: users@tomcat.apache.org Subject: Re: Another issue, jTDS with Tomcat 5.5.9 On 16/10/2009 22:04, ULS Tech Support wrote: Hi there, Please start a completely new email for each thread. Replacing the subject line doesn't count, it's called thread hijacking. p Tomcat 5.5.9, using jTDS, with SQL Server 2005 i am getting this issue. 2009/10/16 10:47:15 - sql exception:java.sql.SQLException: No current row in the ResultSet. This issue doesn't happen with TWFreeTDS (in fact, when i switch to twfreetds it works fine).. but from my research so far, i may have been wrong in the way i implemented it. Here is the code. public Vector queryPaged4(String strTableExt) throws SQLException { dbRecords.removeAllElements(); boolean rc = true; ResultSet rs_info = null; boolean bTest = false; DBItems temp = null; //New ** /* This will call a stored procedure, pass in the page # and number to display on each page and will return the results directly. */ CallableStatement call = dbConn.prepareCall({call sp_PagedItems4 (?,?,?,?,?)}); call.setString(1, strTableExt); call.setString(2, filter); call.setString(3, order); call.setInt(4, pageNumber); call.setInt(5, recsPerPage); if (!call.execute())//Query { //No ResultSets Returned; } else { try { rs_info = call.getResultSet(); //Save the total number of records (value) in queryPagedRecords queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); if (queryPagedRecords 0) { //Test for another resultset. boolean bTest = false; bTest = call.getMoreResults(); //Next resultset established, let's get the data! dbResultSet = call.getResultSet(); while (dbResultSet.next()) { //System.out.println(2: + dbResultSet.getInt(ID)); rc = true; //Set the items object based on the resultset. temp = this.setItemsObject(true, dbResultSet); dbRecords.addElement(temp); } } } catch (SQLException e) { System.out.println(SQLException: + e); System.out.println(SQLException Message: + e.getMessage()); } finally { rs_info = null; temp = null; dbResultSet = null; } System.out.println(end); } return dbRecords; } Basically i'm getting the resultsets, but i'm not able to pull the data from the resultsets as i get the error when i try and getInt. Does anyone have any clue on why this is happening, or how i can make this work? I did try and modify the code to the following to see if it helped, but again, i'm still stumped on HOW to retrieve the data from the resultsets. try { System.out.println(start...); int updateCount = 0; updateCount = call.getUpdateCount(); System.out.println(update count = + updateCount); boolean moreResults = true; while (updateCount = 0 || moreResults) { if (!moreResults) { // just eat it updateCount = call.getUpdateCount(); System.out.println(\nupdateCount= + updateCount); } else { // get the data if (rs_info == null) { rs_info = call.getResultSet(); } else { dbResultSet = call.getResultSet(); } //Save the total number of records (value) in queryPagedRecords System.out.println(Got Data, how to process??); } // if ! moreResults else moreResults = call.getMoreResults(); System.out.println(More Results??); } // while //rs_info.setFetchSize(); System.out.println(Lets get data from rs_info); queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); But it stops at the queryPagedRecords = rs_info.getInt(TotalRec); Thanks in advance to anyone who can help. ...Robin - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat not displaying images
Adding another tiny detail - Requests for /myapp/xyz.htm is handled by tomcat (shows tomcat error) requests for /myapp/pqr.html is handled by apache (shows apache error) I checked my mime.types file (apache) and web.xml (tomcat) too. It does contain all mime types. -- View this message in context: http://www.nabble.com/Tomcat-not-displaying-images-tp25976740p25979873.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 5.59 with jTDS, and SQL Server 2005
Hi there, Let's try this again... I am using Tomcat 5.5.9, using jTDS, with SQL Server 2005 i am getting this issue. 2009/10/16 10:47:15 - sql exception:java.sql.SQLException: No current row in the ResultSet. This issue doesn't happen with TWFreeTDS (in fact, when i switch to twfreetds it works fine).. but from my research so far, i may have been wrong in the way i implemented it. Here is the code. public Vector queryPaged4(String strTableExt) throws SQLException { dbRecords.removeAllElements(); boolean rc = true; ResultSet rs_info = null; boolean bTest = false; DBItems temp = null; //New ** /* This will call a stored procedure, pass in the page # and number to display on each page and will return the results directly. */ CallableStatement call = dbConn.prepareCall({call sp_PagedItems4 (?,?,?,?,?)}); call.setString(1, strTableExt); call.setString(2, filter); call.setString(3, order); call.setInt(4, pageNumber); call.setInt(5, recsPerPage); if (!call.execute())//Query { //No ResultSets Returned; } else { try { rs_info = call.getResultSet(); //Save the total number of records (value) in queryPagedRecords queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); if (queryPagedRecords 0) { //Test for another resultset. boolean bTest = false; bTest = call.getMoreResults(); //Next resultset established, let's get the data! dbResultSet = call.getResultSet(); while (dbResultSet.next()) { //System.out.println(2: + dbResultSet.getInt(ID)); rc = true; //Set the items object based on the resultset. temp = this.setItemsObject(true, dbResultSet); dbRecords.addElement(temp); } } } catch (SQLException e) { System.out.println(SQLException: + e); System.out.println(SQLException Message: + e.getMessage()); } finally { rs_info = null; temp = null; dbResultSet = null; } System.out.println(end); } return dbRecords; } Basically i'm getting the resultsets, but i'm not able to pull the data from the resultsets as i get the error when i try and getInt. Does anyone have any clue on why this is happening, or how i can make this work? I did try and modify the code to the following to see if it helped, but again, i'm still stumped on HOW to retrieve the data from the resultsets. try { System.out.println(start...); int updateCount = 0; updateCount = call.getUpdateCount(); System.out.println(update count = + updateCount); boolean moreResults = true; while (updateCount = 0 || moreResults) { if (!moreResults) { // just eat it updateCount = call.getUpdateCount(); System.out.println(\nupdateCount= + updateCount); } else { // get the data if (rs_info == null) { rs_info = call.getResultSet(); } else { dbResultSet = call.getResultSet(); } //Save the total number of records (value) in queryPagedRecords System.out.println(Got Data, how to process??); } // if ! moreResults else moreResults = call.getMoreResults(); System.out.println(More Results??); } // while //rs_info.setFetchSize(); System.out.println(Lets get data from rs_info); queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); But it stops at the queryPagedRecords = rs_info.getInt(TotalRec); Thanks in advance to anyone who can help. ...Robin
Re: Tomcat not displaying images
Found the problem - I had copied the build process from another project. Unknowingly that process was adding an unmount for all gifs/jpgs etc in another config file included in the end. I took it out now and it works. Sorry guys for wasting your time, and thanks for trying to help. -- View this message in context: http://www.nabble.com/Tomcat-not-displaying-images-tp25976740p25980228.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.59 with jTDS, and SQL Server 2005
ULS Tech Support wrote: Hi there, Let's try this again... I am using Tomcat 5.5.9, using jTDS, with SQL Server 2005 i am getting this issue. 2009/10/16 10:47:15 - sql exception:java.sql.SQLException: No current row in the ResultSet. This issue doesn't happen with TWFreeTDS (in fact, when i switch to twfreetds it works fine).. but from my research so far, i may have been wrong in the way i implemented it. Here is the code. ... while (dbResultSet.next()) { Have you verified that you're getting here? The .next() should essentially guarantee that you are on a valid row. //System.out.println(2: + dbResultSet.getInt(ID)); rc = true; //Set the items object based on the resultset. temp = this.setItemsObject(true, dbResultSet); dbRecords.addElement(temp); } } } catch (SQLException e) { System.out.println(SQLException: + e); System.out.println(SQLException Message: + e.getMessage()); } finally { rs_info = null; temp = null; dbResultSet = null; } System.out.println(end); } return dbRecords; } Basically i'm getting the resultsets, but i'm not able to pull the data from the resultsets as i get the error when i try and getInt. Does anyone have any clue on why this is happening, or how i can make this work? I did try and modify the code to the following to see if it helped, but again, i'm still stumped on HOW to retrieve the data from the resultsets. The first thing I'd suggest would be to eliminate the handling of multiple resultsets until you can verify that you can read a single one. Your code above is pretty much what I do, but I don't use SQL SErver. D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Testing Web Services Without a Client ?
Hi I´m doing some hello world stuff with java web services. I´m wondering if it´s is possible to test a Web Service in Tomcat6 without a client. Like in glassfish, where you can go localhost:8080/webservice/service?tester (or something). Thanks Carsten -- View this message in context: http://www.nabble.com/Testing-Web-Services-Without-a-Client---tp25980342p25980342.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.59 with jTDS, and SQL Server 2005
Hi David, -- From: David kerber dcker...@verizon.net Sent: Tuesday, October 20, 2009 12:34 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 ULS Tech Support wrote: Hi there, Let's try this again... I am using Tomcat 5.5.9, using jTDS, with SQL Server 2005 i am getting this issue. 2009/10/16 10:47:15 - sql exception:java.sql.SQLException: No current row in the ResultSet. This issue doesn't happen with TWFreeTDS (in fact, when i switch to twfreetds it works fine).. but from my research so far, i may have been wrong in the way i implemented it. Here is the code. ... while (dbResultSet.next()) { Have you verified that you're getting here? The .next() should essentially guarantee that you are on a valid row. I'm not actually getting to this point... it stops back when i try and get the data from the first resultset. try { rs_info = call.getResultSet(); //Save the total number of records (value) in queryPagedRecords queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); It stops at the first line, queryPagedRecords = rs_info.getInt(TotalRec); //System.out.println(2: + dbResultSet.getInt(ID)); rc = true; //Set the items object based on the resultset. temp = this.setItemsObject(true, dbResultSet); dbRecords.addElement(temp); } } } catch (SQLException e) { System.out.println(SQLException: + e); System.out.println(SQLException Message: + e.getMessage()); } finally { rs_info = null; temp = null; dbResultSet = null; } System.out.println(end); } return dbRecords; } Basically i'm getting the resultsets, but i'm not able to pull the data from the resultsets as i get the error when i try and getInt. Does anyone have any clue on why this is happening, or how i can make this work? I did try and modify the code to the following to see if it helped, but again, i'm still stumped on HOW to retrieve the data from the resultsets. The first thing I'd suggest would be to eliminate the handling of multiple resultsets until you can verify that you can read a single one. Your code above is pretty much what I do, but I don't use SQL SErver. The majority of the other webpages are set up as a single resultset, which do work :) It is only when i have multiple results sets. Thanks for answering, i appreciate this. D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.59 with jTDS, and SQL Server 2005
ULS Tech Support wrote: Hi David, -- From: David kerber dcker...@verizon.net Sent: Tuesday, October 20, 2009 12:34 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 ... The majority of the other webpages are set up as a single resultset, which do work :) It is only when i have multiple results sets. Thanks for answering, i appreciate this. Sorry I couldn't help more; I've never used multiple resultsets, so I'm tapped out as far as helping you goes. D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How do I debug dispatching errors?
On 20/10/2009 17:50, Josh wrote: Hello, I have a rather small application using servlets. I am encountering a problem where the dispatching is not working properly. There is a 'web.xml' file that looks like the first listing below. Like or is? I have a debug statement set on the first line in the constructor of com.mycorp.referral.servlets.CreateRelationshipServlet. However, when I call the servlet with this URL: http://localhost:8081/MyApp/CreateRelationshp ... the createRelationship is not called - rather, ProcessAction is called again. I have set the debug levels in server.xml and web.xml to 'DEBUG'... but I do not get any errors in those logs. How can I debug the dispatcher and determine why it's not dispatching properly? Which dispatcher? (Which Tomcat version?, OS?, yada yada) p ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameLoginServlet/servlet-name servlet-classcom.mycorp.referral.servlets.LoginServlet/servlet-class !-- init-param param-namepropertyFileNameLocation/param-name param-valueC:/EclipseLib/FarmersQueue.properties/param-value /init-param -- /servlet servlet servlet-nameCreateRelationshipServlet/servlet-name servlet-classcom.mycorp.referral.servlets.CreateRelationshipServlet/servlet-class /servlet servlet servlet-nameProcessActionServlet/servlet-name servlet-classcom.mycorp.referral.servlets.ProcessActionServlet/servlet-class /servlet servlet servlet-nameUpdateRelationshipServlet/servlet-name servlet-classcom.mycorp.referral.servlets.UpdateRelationshipServlet/servlet-class /servlet servlet-mapping servlet-nameLoginServlet/servlet-name url-pattern/Login/url-pattern /servlet-mapping servlet-mapping servlet-nameCreateRelationshipServlet/servlet-name url-pattern/CreateRelationship/url-pattern /servlet-mapping servlet-mapping servlet-nameProcessActionServlet/servlet-name url-pattern/ProcessAction/url-pattern /servlet-mapping servlet-mapping servlet-nameUpdateRelationshipServlet/servlet-name url-pattern/UpdateRelationship/url-pattern /servlet-mapping welcome-file-list welcome-fileLogin.jsp/welcome-file /welcome-file-list /web-app - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.59 with jTDS, and SQL Server 2005
No problem, thanks again David.. ...Robin -- From: David kerber dcker...@verizon.net Sent: Tuesday, October 20, 2009 12:54 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 ULS Tech Support wrote: Hi David, -- From: David kerber dcker...@verizon.net Sent: Tuesday, October 20, 2009 12:34 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 ... The majority of the other webpages are set up as a single resultset, which do work :) It is only when i have multiple results sets. Thanks for answering, i appreciate this. Sorry I couldn't help more; I've never used multiple resultsets, so I'm tapped out as far as helping you goes. D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Hijacking
On 20/10/2009 19:02, ULS Tech Support wrote: Tell me how i hijacked my own thread? As I described. See? This is my own thread.. and i actually modified the last one i sent out, cleared everything and typed out brand new. Umm, yes, that would be what we call hijacking. You hijacked a thread, then did it again to 'your' new thread. Unless I'm much mistaken you responded to the inestimable Bill Davidson's first DBCP woes (running out of cursors) email. Just because you changed the subject and/or body, doesn't mean you started a new thread. Look at the mail headers, or use a mail reader that supports threaded views to see it. p Thanks for the help. -- From: Pid p...@pidster.com Sent: Tuesday, October 20, 2009 6:11 AM To: users@tomcat.apache.org Subject: Re: Another issue, jTDS with Tomcat 5.5.9 On 16/10/2009 22:04, ULS Tech Support wrote: Hi there, Please start a completely new email for each thread. Replacing the subject line doesn't count, it's called thread hijacking. p Tomcat 5.5.9, using jTDS, with SQL Server 2005 i am getting this issue. 2009/10/16 10:47:15 - sql exception:java.sql.SQLException: No current row in the ResultSet. This issue doesn't happen with TWFreeTDS (in fact, when i switch to twfreetds it works fine).. but from my research so far, i may have been wrong in the way i implemented it. Here is the code. public Vector queryPaged4(String strTableExt) throws SQLException { dbRecords.removeAllElements(); boolean rc = true; ResultSet rs_info = null; boolean bTest = false; DBItems temp = null; //New ** /* This will call a stored procedure, pass in the page # and number to display on each page and will return the results directly. */ CallableStatement call = dbConn.prepareCall({call sp_PagedItems4 (?,?,?,?,?)}); call.setString(1, strTableExt); call.setString(2, filter); call.setString(3, order); call.setInt(4, pageNumber); call.setInt(5, recsPerPage); if (!call.execute())//Query { //No ResultSets Returned; } else { try { rs_info = call.getResultSet(); //Save the total number of records (value) in queryPagedRecords queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); if (queryPagedRecords 0) { //Test for another resultset. boolean bTest = false; bTest = call.getMoreResults(); //Next resultset established, let's get the data! dbResultSet = call.getResultSet(); while (dbResultSet.next()) { //System.out.println(2: + dbResultSet.getInt(ID)); rc = true; //Set the items object based on the resultset. temp = this.setItemsObject(true, dbResultSet); dbRecords.addElement(temp); } } } catch (SQLException e) { System.out.println(SQLException: + e); System.out.println(SQLException Message: + e.getMessage()); } finally { rs_info = null; temp = null; dbResultSet = null; } System.out.println(end); } return dbRecords; } Basically i'm getting the resultsets, but i'm not able to pull the data from the resultsets as i get the error when i try and getInt. Does anyone have any clue on why this is happening, or how i can make this work? I did try and modify the code to the following to see if it helped, but again, i'm still stumped on HOW to retrieve the data from the resultsets. try { System.out.println(start...); int updateCount = 0; updateCount = call.getUpdateCount(); System.out.println(update count = + updateCount); boolean moreResults = true; while (updateCount = 0 || moreResults) { if (!moreResults) { // just eat it updateCount = call.getUpdateCount(); System.out.println(\nupdateCount= + updateCount); } else { // get the data if (rs_info == null) { rs_info = call.getResultSet(); } else { dbResultSet = call.getResultSet(); } //Save the total number of records (value) in queryPagedRecords System.out.println(Got Data, how to process??); } // if ! moreResults else moreResults = call.getMoreResults(); System.out.println(More Results??); } // while //rs_info.setFetchSize(); System.out.println(Lets get data from rs_info); queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); But it stops at the queryPagedRecords = rs_info.getInt(TotalRec); Thanks in advance to anyone who can help. ...Robin - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hijacking
Fair enough... I didn't think it was a big deal to do that... clicking new instead of reply... But really, i am still asking a valid question and require help... Didn't realize that this thread hijacking was going to cause someone to tell me what i did wrong, when i still had a valid question. But i'll remember that next time for you... Sound good? -- From: Pid p...@pidster.com Sent: Tuesday, October 20, 2009 1:05 PM To: users@tomcat.apache.org Subject: Hijacking On 20/10/2009 19:02, ULS Tech Support wrote: Tell me how i hijacked my own thread? As I described. See? This is my own thread.. and i actually modified the last one i sent out, cleared everything and typed out brand new. Umm, yes, that would be what we call hijacking. You hijacked a thread, then did it again to 'your' new thread. Unless I'm much mistaken you responded to the inestimable Bill Davidson's first DBCP woes (running out of cursors) email. Just because you changed the subject and/or body, doesn't mean you started a new thread. Look at the mail headers, or use a mail reader that supports threaded views to see it. p Thanks for the help. -- From: Pid p...@pidster.com Sent: Tuesday, October 20, 2009 6:11 AM To: users@tomcat.apache.org Subject: Re: Another issue, jTDS with Tomcat 5.5.9 On 16/10/2009 22:04, ULS Tech Support wrote: Hi there, Please start a completely new email for each thread. Replacing the subject line doesn't count, it's called thread hijacking. p Tomcat 5.5.9, using jTDS, with SQL Server 2005 i am getting this issue. 2009/10/16 10:47:15 - sql exception:java.sql.SQLException: No current row in the ResultSet. This issue doesn't happen with TWFreeTDS (in fact, when i switch to twfreetds it works fine).. but from my research so far, i may have been wrong in the way i implemented it. Here is the code. public Vector queryPaged4(String strTableExt) throws SQLException { dbRecords.removeAllElements(); boolean rc = true; ResultSet rs_info = null; boolean bTest = false; DBItems temp = null; //New ** /* This will call a stored procedure, pass in the page # and number to display on each page and will return the results directly. */ CallableStatement call = dbConn.prepareCall({call sp_PagedItems4 (?,?,?,?,?)}); call.setString(1, strTableExt); call.setString(2, filter); call.setString(3, order); call.setInt(4, pageNumber); call.setInt(5, recsPerPage); if (!call.execute())//Query { //No ResultSets Returned; } else { try { rs_info = call.getResultSet(); //Save the total number of records (value) in queryPagedRecords queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); if (queryPagedRecords 0) { //Test for another resultset. boolean bTest = false; bTest = call.getMoreResults(); //Next resultset established, let's get the data! dbResultSet = call.getResultSet(); while (dbResultSet.next()) { //System.out.println(2: + dbResultSet.getInt(ID)); rc = true; //Set the items object based on the resultset. temp = this.setItemsObject(true, dbResultSet); dbRecords.addElement(temp); } } } catch (SQLException e) { System.out.println(SQLException: + e); System.out.println(SQLException Message: + e.getMessage()); } finally { rs_info = null; temp = null; dbResultSet = null; } System.out.println(end); } return dbRecords; } Basically i'm getting the resultsets, but i'm not able to pull the data from the resultsets as i get the error when i try and getInt. Does anyone have any clue on why this is happening, or how i can make this work? I did try and modify the code to the following to see if it helped, but again, i'm still stumped on HOW to retrieve the data from the resultsets. try { System.out.println(start...); int updateCount = 0; updateCount = call.getUpdateCount(); System.out.println(update count = + updateCount); boolean moreResults = true; while (updateCount = 0 || moreResults) { if (!moreResults) { // just eat it updateCount = call.getUpdateCount(); System.out.println(\nupdateCount= + updateCount); } else { // get the data if (rs_info == null) { rs_info = call.getResultSet(); } else { dbResultSet = call.getResultSet(); } //Save the total number of records (value) in queryPagedRecords System.out.println(Got Data, how to process??); } // if ! moreResults else moreResults = call.getMoreResults(); System.out.println(More Results??); } // while //rs_info.setFetchSize(); System.out.println(Lets get data from rs_info); queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); But it stops at the queryPagedRecords = rs_info.getInt(TotalRec); Thanks in advance to anyone who can help. ...Robin -
Re: Hijacking
Sorry, i'll remember this not just for you, but for everyone to specifically use new for new threads. -- From: ULS Tech Support tech_supp...@uls.com Sent: Tuesday, October 20, 2009 1:13 PM To: Tomcat Users List users@tomcat.apache.org; p...@pidster.com Subject: Re: Hijacking Fair enough... I didn't think it was a big deal to do that... clicking new instead of reply... But really, i am still asking a valid question and require help... Didn't realize that this thread hijacking was going to cause someone to tell me what i did wrong, when i still had a valid question. But i'll remember that next time for you... Sound good? -- From: Pid p...@pidster.com Sent: Tuesday, October 20, 2009 1:05 PM To: users@tomcat.apache.org Subject: Hijacking On 20/10/2009 19:02, ULS Tech Support wrote: Tell me how i hijacked my own thread? As I described. See? This is my own thread.. and i actually modified the last one i sent out, cleared everything and typed out brand new. Umm, yes, that would be what we call hijacking. You hijacked a thread, then did it again to 'your' new thread. Unless I'm much mistaken you responded to the inestimable Bill Davidson's first DBCP woes (running out of cursors) email. Just because you changed the subject and/or body, doesn't mean you started a new thread. Look at the mail headers, or use a mail reader that supports threaded views to see it. p Thanks for the help. -- From: Pid p...@pidster.com Sent: Tuesday, October 20, 2009 6:11 AM To: users@tomcat.apache.org Subject: Re: Another issue, jTDS with Tomcat 5.5.9 On 16/10/2009 22:04, ULS Tech Support wrote: Hi there, Please start a completely new email for each thread. Replacing the subject line doesn't count, it's called thread hijacking. p Tomcat 5.5.9, using jTDS, with SQL Server 2005 i am getting this issue. 2009/10/16 10:47:15 - sql exception:java.sql.SQLException: No current row in the ResultSet. This issue doesn't happen with TWFreeTDS (in fact, when i switch to twfreetds it works fine).. but from my research so far, i may have been wrong in the way i implemented it. Here is the code. public Vector queryPaged4(String strTableExt) throws SQLException { dbRecords.removeAllElements(); boolean rc = true; ResultSet rs_info = null; boolean bTest = false; DBItems temp = null; //New ** /* This will call a stored procedure, pass in the page # and number to display on each page and will return the results directly. */ CallableStatement call = dbConn.prepareCall({call sp_PagedItems4 (?,?,?,?,?)}); call.setString(1, strTableExt); call.setString(2, filter); call.setString(3, order); call.setInt(4, pageNumber); call.setInt(5, recsPerPage); if (!call.execute())//Query { //No ResultSets Returned; } else { try { rs_info = call.getResultSet(); //Save the total number of records (value) in queryPagedRecords queryPagedRecords = rs_info.getInt(TotalRec); queryPagedMore = rs_info.getInt(MoreRecords); nLowestID = rs_info.getInt(FirstRec); nHighestID = rs_info.getInt(LastRec); if (queryPagedRecords 0) { //Test for another resultset. boolean bTest = false; bTest = call.getMoreResults(); //Next resultset established, let's get the data! dbResultSet = call.getResultSet(); while (dbResultSet.next()) { //System.out.println(2: + dbResultSet.getInt(ID)); rc = true; //Set the items object based on the resultset. temp = this.setItemsObject(true, dbResultSet); dbRecords.addElement(temp); } } } catch (SQLException e) { System.out.println(SQLException: + e); System.out.println(SQLException Message: + e.getMessage()); } finally { rs_info = null; temp = null; dbResultSet = null; } System.out.println(end); } return dbRecords; } Basically i'm getting the resultsets, but i'm not able to pull the data from the resultsets as i get the error when i try and getInt. Does anyone have any clue on why this is happening, or how i can make this work? I did try and modify the code to the following to see if it helped, but again, i'm still stumped on HOW to retrieve the data from the resultsets. try { System.out.println(start...); int updateCount = 0; updateCount = call.getUpdateCount(); System.out.println(update count = + updateCount); boolean moreResults = true; while (updateCount = 0 || moreResults) { if (!moreResults) { // just eat it updateCount = call.getUpdateCount(); System.out.println(\nupdateCount= + updateCount); } else { // get the data if (rs_info == null) { rs_info = call.getResultSet(); } else { dbResultSet = call.getResultSet(); } //Save the total number of records (value) in queryPagedRecords System.out.println(Got Data, how to process??); } // if ! moreResults else moreResults = call.getMoreResults(); System.out.println(More Results??); } // while //rs_info.setFetchSize(); System.out.println(Lets get data from rs_info); queryPagedRecords =
Re: Tomcat 5.59 with jTDS, and SQL Server 2005
On 20/10/2009 19:59, ULS Tech Support wrote: No problem, thanks again David.. ...Robin -- From: David kerber dcker...@verizon.net Sent: Tuesday, October 20, 2009 12:54 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 ULS Tech Support wrote: Hi David, -- From: David kerber dcker...@verizon.net Sent: Tuesday, October 20, 2009 12:34 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 ... The majority of the other webpages are set up as a single resultset, which do work :) It is only when i have multiple results sets. Thanks for answering, i appreciate this. Sorry I couldn't help more; I've never used multiple resultsets, so I'm tapped out as far as helping you goes. I have exactly zero experience with SQL Server Tomcat, but... 1. Is there a particular barrier to using the official MS driver? (I am wincing as I ask). 2. What is the full stack trace you referred to earlier, does it have a separate root cause? 3. Is TWFreeTDS a drop-in replacement? 4. Are there any known bugs in jTDS for the combination of circumstances you're testing against? 5. Does the procedure definitely return data in each of the result sets? p D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.59 with jTDS, and SQL Server 2005
-- From: Pid p...@pidster.com Sent: Tuesday, October 20, 2009 1:19 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 1. Is there a particular barrier to using the official MS driver? (I am wincing as I ask). http://jtds.sourceforge.net/index.html As quoted: Why use jTDS? jTDS is free software. jTDS is released under the terms of the GNU LGPL, giving you not only the posibility to debug and tweak it to your own liking but also to use it in and distribute it with your free or commercial applications. The other free choices, the JDBC-ODBC bridge and Microsoft's own JDBC driver are not actually free. If you encounter an issue with any of them you won't be able to fix it yourself and response times from both Microsoft and Sun are anything but short. Also, both of them lack functionality (the Microsoft driver implements JDBC 2.0, while the bridge is just a JDBC 1.0 implementation) and have serious stability problems: the bridge crashes the JVM if the ODBC driver has any problem and Microsoft just has no intention of really supporting Java/JDBC. 2. What is the full stack trace you referred to earlier, does it have a separate root cause? There was a stack trace, but that was because i hadn't captured the error correctly. This is all i get now.. SQLException: java.sql.SQLException: No current row in the ResultSet. SQLException Message: No current row in the ResultSet. 3. Is TWFreeTDS a drop-in replacement? I`ve been using TWFreeTDS because it did support the multiple resultsets. 4. Are there any known bugs in jTDS for the combination of circumstances you're testing against? None that i`m aware of. 5. Does the procedure definitely return data in each of the result sets? When i used the twfreetds... and yes it does return data.. i re-ran the sql procedure to make sure... I used twfreetds originally instead of jtds, the entire thing worked fine... But i wanted to implement the pooling with jtds (and probably can with twfreetds, but wanted an alternative). p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5.59 with jTDS, and SQL Server 2005
Found the thread from Mark... thank you for pointing me in that direction... -- From: Pid p...@pidster.com Sent: Tuesday, October 20, 2009 1:19 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 On 20/10/2009 19:59, ULS Tech Support wrote: No problem, thanks again David.. ...Robin -- From: David kerber dcker...@verizon.net Sent: Tuesday, October 20, 2009 12:54 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 ULS Tech Support wrote: Hi David, -- From: David kerber dcker...@verizon.net Sent: Tuesday, October 20, 2009 12:34 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 ... The majority of the other webpages are set up as a single resultset, which do work :) It is only when i have multiple results sets. Thanks for answering, i appreciate this. Sorry I couldn't help more; I've never used multiple resultsets, so I'm tapped out as far as helping you goes. I have exactly zero experience with SQL Server Tomcat, but... 1. Is there a particular barrier to using the official MS driver? (I am wincing as I ask). 2. What is the full stack trace you referred to earlier, does it have a separate root cause? 3. Is TWFreeTDS a drop-in replacement? 4. Are there any known bugs in jTDS for the combination of circumstances you're testing against? 5. Does the procedure definitely return data in each of the result sets? p D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Does Tomcat http support subdomains?
Hi All, Does anyone know if Tomcat supports subdomains for its or the APR http function? The Apache Web server does. I am starting to see more and more use of subdomains for performance improvements by allowing more browser connections from the same browser. Here is an example link of what I am talking about. http://www.askapache.com/htaccess/apache-speed-subdomains.html Thanks, Tony - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Does Tomcat http support subdomains?
From: Tony Anecito [mailto:adanec...@yahoo.com] Subject: Does Tomcat http support subdomains? Does anyone know if Tomcat supports subdomains for its or the APR http function? I'm confused; what's there to support? The primary thing you need is DNS resolution of the different names, insuring that the resolved IP addresses all target your server. Everything else is browser, not server, related. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 5.59 with jTDS, and SQL Server 2005
-Original Message- From: ULS Tech Support [mailto:tech_supp...@uls.com] Sent: Tuesday, October 20, 2009 1:35 PM To: Tomcat Users List Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 -- From: Pid p...@pidster.com Sent: Tuesday, October 20, 2009 1:19 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.59 with jTDS, and SQL Server 2005 1. Is there a particular barrier to using the official MS driver? (I am wincing as I ask). http://jtds.sourceforge.net/index.html As quoted: Why use jTDS? jTDS is free software. jTDS is released under the terms of the GNU LGPL, Free is over-rated, when you're connecting it to a proprietary db. If you want free, use PostgreSQL. giving you not only the posibility to debug and tweak it to your own liking but also to use it in and distribute it with your free or commercial applications. The other free choices, the JDBC-ODBC bridge and Microsoft's own JDBC driver are not actually free. If you encounter an issue with any of them you won't be able to fix it yourself and response times from both Microsoft and Sun are anything but short. Also, both of them lack functionality (the Microsoft driver implements JDBC 2.0, while the bridge is just a JDBC 1.0 That may have been true at one time, but the current drivers are JDBC3 and JDBC4 compliant. I have never had a problem with Microsoft's JDBC drivers. They work fine. The people that have really bad drivers are Oracle. Their drivers are horrible. implementation) and have serious stability problems: the bridge crashes the JVM if the ODBC driver has any problem and Microsoft just has no intention of really supporting Java/JDBC. That's just not true now. MS has full support for JDBC that works well. It sounds to me like this site is filled with hyperbola and outdated information. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Does Tomcat http support subdomains?
Hi Chuck, I am still a newbe at this concept but here is a link that mentions Apache Web Server setup in addition to DNS you mentioned. They do add Virtual Hosts setup to support and I am not sure for Tomcat what would be needed to do this. http://content.websitegear.com/article/subdomain_setup.htm Regards, -Tony --- On Tue, 10/20/09, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: Does Tomcat http support subdomains? To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, October 20, 2009, 1:46 PM From: Tony Anecito [mailto:adanec...@yahoo.com] Subject: Does Tomcat http support subdomains? Does anyone know if Tomcat supports subdomains for its or the APR http function? I'm confused; what's there to support? The primary thing you need is DNS resolution of the different names, insuring that the resolved IP addresses all target your server. Everything else is browser, not server, related. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Does Tomcat http support subdomains?
From: Tony Anecito [mailto:adanec...@yahoo.com] Subject: RE: Does Tomcat http support subdomains? I am not sure for Tomcat what would be needed to do this. Usually nothing, if you have only a single Host element. If you are using multiple Host elements in Tomcat (i.e., virtual hosts), you will need to add Alias elements to each for the additional subdomains. http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Host%20Name%20Aliases - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Does Tomcat http support subdomains?
If you by subdomains you mean foo.yoursite.com, bar.yoursite.com and so on, then of course Tomcat supports that. In the server.xml file, add: Host name=foo.yoursite.com Context path= docBase=/your/path/here/foo_site / /Host On Tue, Oct 20, 2009 at 4:03 PM, Tony Anecito adanec...@yahoo.com wrote: Hi Chuck, I am still a newbe at this concept but here is a link that mentions Apache Web Server setup in addition to DNS you mentioned. They do add Virtual Hosts setup to support and I am not sure for Tomcat what would be needed to do this. http://content.websitegear.com/article/subdomain_setup.htm Regards, -Tony --- On Tue, 10/20/09, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: Does Tomcat http support subdomains? To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, October 20, 2009, 1:46 PM From: Tony Anecito [mailto:adanec...@yahoo.com] Subject: Does Tomcat http support subdomains? Does anyone know if Tomcat supports subdomains for its or the APR http function? I'm confused; what's there to support? The primary thing you need is DNS resolution of the different names, insuring that the resolved IP addresses all target your server. Everything else is browser, not server, related. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problems with Manager
Good afternoon, I'm trying to develop a work linked to a project at UFPE, for this I need to do the deploy some files in Tomcat. I'm using Tomcat 6.0.20, installed by binary, Ubuntu 9.04, the package docs, examples and manager are installed using the apt-get, but I can't access the manager, I has set up the file tomcat-users.xml as follows: role rolename= manager/ user username= tomcat password= catalina roles=manager/ But I can't access the manager with these settings, I like to know what I can do to make this setting so that I can access the manager normally. Thanks! Valter Jorge _ Você sabia que pode acessar o Messenger direto do seu Hotmail? Descubra como! http://www.microsoft.com/brasil/windows/windowslive/products/tutoriais.aspx
RE: Does Tomcat http support subdomains?
From: Jonathan Mast [mailto:jhmast.develo...@gmail.com] Subject: Re: Does Tomcat http support subdomains? In the server.xml file, add: Host name=foo.yoursite.com Context path= docBase=/your/path/here/foo_site / /Host Please don't recommend placing Context elements in server.xml; it's an outdated practice that should be discouraged, not encouraged. Besides additional Host elements are counter to the desired result: reading the original link demonstrates that the idea is to have multiple DNS names targeting the host. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problems with Manager
From: Valter Jorge [mailto:valter_...@hotmail.com] Subject: Problems with Manager role rolename= manager/ user username= tomcat password= catalina roles=manager/ Post your *entire* tomcat-users.xml. The usual mistake is to fail to remove the comment delimiters around the role and user section. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Does Tomcat http support subdomains?
Many Thanks!! -Tony --- On Tue, 10/20/09, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: Does Tomcat http support subdomains? To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, October 20, 2009, 2:11 PM From: Tony Anecito [mailto:adanec...@yahoo.com] Subject: RE: Does Tomcat http support subdomains? I am not sure for Tomcat what would be needed to do this. Usually nothing, if you have only a single Host element. If you are using multiple Host elements in Tomcat (i.e., virtual hosts), you will need to add Alias elements to each for the additional subdomains. http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Host%20Name%20Aliases - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Does Tomcat http support subdomains?
Perfect thanks for the example. -Tony --- On Tue, 10/20/09, Jonathan Mast jhmast.develo...@gmail.com wrote: From: Jonathan Mast jhmast.develo...@gmail.com Subject: Re: Does Tomcat http support subdomains? To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, October 20, 2009, 2:13 PM If you by subdomains you mean foo.yoursite.com, bar.yoursite.com and so on, then of course Tomcat supports that. In the server.xml file, add: Host name=foo.yoursite.com Context path= docBase=/your/path/here/foo_site / /Host On Tue, Oct 20, 2009 at 4:03 PM, Tony Anecito adanec...@yahoo.com wrote: Hi Chuck, I am still a newbe at this concept but here is a link that mentions Apache Web Server setup in addition to DNS you mentioned. They do add Virtual Hosts setup to support and I am not sure for Tomcat what would be needed to do this. http://content.websitegear.com/article/subdomain_setup.htm Regards, -Tony --- On Tue, 10/20/09, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: Does Tomcat http support subdomains? To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, October 20, 2009, 1:46 PM From: Tony Anecito [mailto:adanec...@yahoo.com] Subject: Does Tomcat http support subdomains? Does anyone know if Tomcat supports subdomains for its or the APR http function? I'm confused; what's there to support? The primary thing you need is DNS resolution of the different names, insuring that the resolved IP addresses all target your server. Everything else is browser, not server, related. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problems with Manager
Here is the tomcat-user.xml Sorry if it have errors, because I'm a newby The code is commented to avoid server failures thanks ?xml version=1.0 encoding=utf-8 ? - !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- - tomcat-users - role rolename=tomcat/ role rolename=role1/ role rolename=manager/ role rolename=admin/ user username=tomcat password=catalina roles=manager/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ -- /tomcat-users From: chuck.caldar...@unisys.com To: users@tomcat.apache.org Date: Tue, 20 Oct 2009 15:20:40 -0500 Subject: RE: Problems with Manager From: Valter Jorge [mailto:valter_...@hotmail.com] Subject: Problems with Manager role rolename= manager/ user username= tomcat password= catalina roles=manager/ Post your *entire* tomcat-users.xml. The usual mistake is to fail to remove the comment delimiters around the role and user section. - Chuck _ Você sabia que com o Hotmail você tem espaço ilimitado para guardar seus e-mails? Começe a usar já! http://www.microsoft.com/brasil/windows/windowslive/products/hotmail.aspx
Valves being converted to Filters?
Hi, I was looking at Bug 47330 (https://issues.apache.org/bugzilla/show_bug.cgi?id=47330) which is a filter / valve implementation of a Httpd's mod_remoteip module. What concerned me is a comment by the submitter at the very bottom of the report: ... As Tomcat valves are currently being converted into Servlet Filter (1), here is a Servlet Filter implementation... Is this true? Is Tomcat moving away from valves and towards filters in the next version(s)? Is there a specific reason for this? Although I love filters, I find that valves have a very specific need within the container as well; it allows you to configure the container independently of the application. If everything is moving to filters, that would require me to modify the app everytime I want the container to behave slightly differently. Am I misunderstanding the comment, or is the submitter mis-informed? Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problems with Manager
From: Valter Jorge [mailto:valter_...@hotmail.com] Subject: RE: Problems with Manager - !-- Licensed to the Apache Software Foundation (ASF) under one or more Why is there a leading dash on the above line? - tomcat-users Same question. - role rolename=tomcat/ Same question. -- This is an ending comment marker, apparently without a beginning one. Strongly suggest you use an XML-aware editor, which will help show you any problems in the XML. You can also use any of the numerous XML syntax checkers, and look in the Tomcat logs to see if it reported problems when parsing this. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
question about using tomcat on a remote machine
Hi, i have a dedicated server running ubuntu 8.04. On it i have apache2, the firewall (ufw) and tomcat. I installed tomcat by hand (from the website, as opposed to via apt). My problem is that i cannot connect to it via a browser. I do http://X.X.X.X:8080 but it gives me 'X.X.X.X is not responsing'. However, i can connect to apache through the browser. I turned off the firewall, but that did not help. I can connect locally using telnet localhost 8080. netstat -nan finds: tcp6 0 0 :::8080 :::*LISTEN I googled this, but i couldn't find anything that helped me any further. If i missed something i should read, please point me to it. Else, has anyone an idea what else i could do? thanks matt
Re: Valves being converted to Filters?
Hello Henri, I was referring to public information such as : - Google Summer Of Code 2009, project Convert current Tomcat valves to Servlet Filters : http://wiki.apache.org/tomcat/SummerOfCode2009 and the various associated emails on Tomcat dev mailing list. - Mark Thomas post on Tomcat users mailing list : ...47330 is on the todo list but my current plan is to implement it as a Filter rather than a valve. (1) However, my understanding is not that pluggable 'interceptors' will be removed from the container, just that the Valve API will be replaced with a Filter API. I feel interfaces (HttpServletRequest HttpServletResponse) will be much more easy to manipulate than the current implementations (Request, Response). Hopr this clarifies my message, Cyrille -- Cyrille Le Clerc clecl...@xebia.fr cyri...@cyrilleleclerc.com http://blog.xebia.fr (1) http://www.nabble.com/Re%3A-Cannot-set-remote-address-in-valve-%28Tomcat-5.5%29-p25632043.html On Tue, Oct 20, 2009 at 10:38 PM, Eric B. ebe...@hotmail.com wrote: Hi, I was looking at Bug 47330 (https://issues.apache.org/bugzilla/show_bug.cgi?id=47330) which is a filter / valve implementation of a Httpd's mod_remoteip module. What concerned me is a comment by the submitter at the very bottom of the report: ... As Tomcat valves are currently being converted into Servlet Filter (1), here is a Servlet Filter implementation... Is this true? Is Tomcat moving away from valves and towards filters in the next version(s)? Is there a specific reason for this? Although I love filters, I find that valves have a very specific need within the container as well; it allows you to configure the container independently of the application. If everything is moving to filters, that would require me to modify the app everytime I want the container to behave slightly differently. Am I misunderstanding the comment, or is the submitter mis-informed? Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: doubts about tomcat form based authentication
Sorry guys to have bothered you with my silly mistake. Actually, I had configured 403 error page in web.xml file but the page was not at proper location. Hence I was getting 404 file not found. Now I can access the role error page for authorization error. Thanks a lot for all your insights. regards, nirvan. -- View this message in context: http://www.nabble.com/doubts-about-tomcat-form-based-authentication-tp25970503p25984106.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.20 support for serving via http java pack 200 jars. How?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tony, On 10/19/2009 4:41 PM, Tony Anecito wrote: Inside the gz file is a java jar file that was compressed using pack 200 compression using an ant task. So all you should need to do is define a MIME type for .pack.gz. I suppose using AddEncoding pack200-gzip .pack.gz is good enough (note that this is different from what you had). You should be able to serve this directly from Apache httpd: Tomcat is not required. I was able to get jnlpdownloadservlet installed (comes with jdk) and working on Tomcat 6.0.20. Also, just in case I added an line to my jnlp file to support download of the gz files even though that tag is only supported via jre 6u10 and above. This new feature for jre 6u10 and above supposidly does not require the servlet running in Tomcat. Tomcat should never be required. Gee the things I let you Tomcat folks talk me into :-) This was an additional task in order to move from the Apache Web Server to Tomcat to serve java web start apps. I don't understand why Tomcat makes any difference, here. httpd ought to be able to serve a static file with a Content-Encoding header without any problems. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrc1XIACgkQ9CaO5/Lv0PBnJgCcDGgn5aPEGLuUrQMBKei1K5Ek XkoAoL3QJtZuMfbn7rj+czKWNnbxefT8 =TBKE -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 5 SSL keytool error: java.lang.Exception: Public key in reply and keystore don't match
Nicholas, You bring up a good point about the alias. It's what I feel most people mess up on when installing SSL Certificates to a keystore. If no alias is specified upon creation of the keystore, the alias is mykey. You can import ANY certificate you want into the keystore. You don't need it's private key. So keytool will act as if nothing is wrong. It's very sneaky in this regard. One can easily see the contents of the keystore: `keytool -keystore KEYSTORE_FILE -v -list -storepass PASSWORD SOMEFILE.TXT ` and one can see the alias here if they so forget what they gave it. Miguel, In regards to your issue, make sure the CSR and Certificate's modulus match. Easiest way is via OpenSSL. Since, you're on CentOS, you probably already have this. `openssl x509 -noout -modulus -in YOUR_CERT.crt | openssl md5` and `openssl req -noout -modulus -in YOUR.CSR | openssl md5 ` Compare these two hashes. And if they're different... `openssl x509 -noout -serial -in YOUR_CERT.crt`, and verify the serial number with Network Solutions, your CA as they might have sent you the wrong certificate. Worst comes to worst, you might have to get a re-issue and make your keystore and csr have unique matching file names. On 10/20/2009 12:19 PM, Nicholas Sushkin wrote: Miguel, I just installed a cert using our own CA, had a bit of trouble myself, but it worked in the end. I found comodo's and Herong Yang's instructions useful. See http://www.herongyang.com/crypto/OpenSSL_Signing_keytool_CSR.html and https://support.comodo.com/index.php?_m=knowledgebase_a=viewarticlekbarticleid=1204 One thing to note is that when you import cert, use the same certificate alias as the key's (for example, -genkey -alias tomcat followed by -import -trustcacerts -aliast tomcat) On Tuesday 20 October 2009 10:36, Miguel Ortiz wrote: I have a tomcat 5 web server setup on CentOS, I am currently working on installing a SSL cert but don't seem to be having any luck. I get the following error: keytool error: java.lang.Exception: Public key in reply and keystore don't match I have reissued the cert through Network Solutions and followed the following instructions to generate and install the cert. I have run out of my patience with them. Is there anything else that I may be missing? Thanks http://www.networksolutions.com/support/csr-for-java-based-webservers-su ch-as-tomcat-using-keytool/ http://www.networksolutions.com/support/installation-for-java-based-webs ervers-such-as-tomcat-using-keytool/ Miguel - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Valves being converted to Filters?
From: Eric B. ebe...@hotmail.com To: users@tomcat.apache.org Sent: 20/10/09, 15:38:59 Subject: Valves being converted to Filters? Is this true? Is Tomcat moving away from valves and towards filters in the next version(s)? Sort off. Ideally everywhere but I suspect some valves will remain. Is there a specific reason for this? Portability, reduce internal code duplication (filters valves have a lot in common) Although I love filters, I find that valves have a very specific need within the container as well; it allows you to configure the container independently of the application. If everything is moving to filters, that would require me to modify the app everytime I want the container to behave slightly differently. Even without valves, there are lots of other ways to customize the container. You can also specify Filters at the global host level (may also add engine to that list). Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: question about using tomcat on a remote machine
From: Matt Funk [mailto:maf...@nmsu.edu] Subject: question about using tomcat on a remote machine netstat -nan finds: tcp6 0 0 :::8080 :::* LISTEN That looks like it's listening *only* with IPv6. Since you used an IPv4 address on your browser, Tomcat never gets the request. The localhost used on your telnet attempt may well have resolved to an IPv6 address. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: doubts about tomcat form based authentication
The way I solved the issue was removing he user from the tomcat role table. Tomcat itself will then not allow you to login. I am using a Realm authentication as well. In the user table I specified what role the user had (either plain user, manager, admin, or a trainer), then based off of that, the tomcat role table was populated at create new user time. It will throw your 403 error (which mine does) - Josh On Tue, Oct 20, 2009 at 7:18 PM, Nirvann jatin.kulka...@yahoo.com wrote: Sorry guys to have bothered you with my silly mistake. Actually, I had configured 403 error page in web.xml file but the page was not at proper location. Hence I was getting 404 file not found. Now I can access the role error page for authorization error. Thanks a lot for all your insights. regards, nirvan. -- View this message in context: http://www.nabble.com/doubts-about-tomcat-form-based-authentication-tp25970503p25984106.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Valves being converted to Filters?
Mark Thomas ma...@apache.org wrote in message news:200910202047470...@265006334... Although I love filters, I find that valves have a very specific need within the container as well; it allows you to configure the container independently of the application. If everything is moving to filters, that would require me to modify the app everytime I want the container to behave slightly differently. Even without valves, there are lots of other ways to customize the container. You can also specify Filters at the global host level (may also add engine to that list). Really? Does that exist already? So far, the only place I know about where I can configure filters are in the web.xml file(s) - both in the application's web.xml and in the server's global web.xml. Is there another place / manner in which to configure a filter on a per-host basis? Or is this something that is only going to be available in a future release? Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Valves being converted to Filters?
So is there still going to be an API to plug into the tomcat internals and do things that the servlet API does not support? E -Original Message- From: Cyrille Le Clerc [mailto:clecl...@xebia.fr] Sent: Tuesday, October 20, 2009 4:06 PM To: Tomcat Users List Subject: Re: Valves being converted to Filters? Hello Henri, I was referring to public information such as : - Google Summer Of Code 2009, project Convert current Tomcat valves to Servlet Filters : http://wiki.apache.org/tomcat/SummerOfCode2009 and the various associated emails on Tomcat dev mailing list. - Mark Thomas post on Tomcat users mailing list : ...47330 is on the todo list but my current plan is to implement it as a Filter rather than a valve. (1) However, my understanding is not that pluggable 'interceptors' will be removed from the container, just that the Valve API will be replaced with a Filter API. I feel interfaces (HttpServletRequest HttpServletResponse) will be much more easy to manipulate than the current implementations (Request, Response). Hopr this clarifies my message, Cyrille - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Cannot set remote address in valve (Tomcat 5.5)
A question: How do you know that a proxy is trusted? Is it by providing a list of trusted IPs in the configuration of the filter? Our load balancer is always adding the client IP as the first in the list, and it does not add its own IP to the list. The header has one IP +99% of the times, the other times there is an additional IP of a proxy that is not our load balancer (reverse proxy). So in that case, we can check that the request comes from a trusted IP list (known load balancers), and only then try to change the IP. If the client IP does not come from the load balancer, it is basically a pass through. For our system the first IP is what the load balancer sees, and the only way to spoof it is to access the server not through the load balancer. If you send a request with a spoofed header to the laod balancer, it will still add the IP of the spoofer in the beginning of the list. This may not be the general case for proxies, it is only for this case. E -Original Message- From: Cyrille Le Clerc [mailto:clecl...@xebia.fr] Sent: Thursday, October 08, 2009 1:04 AM To: Tomcat Users List Subject: Re: Cannot set remote address in valve (Tomcat 5.5) Hello Elli, I am afraid there may be a flaw in the algorythm looking for the first IP of the coma delimited x-forwarded-for header without ensuring that this first IP has been set by a trusted proxy and not by the requester ( getFirstIP(xforwardedForHeaderValue) ). Such spoofing can easily be achieved with tools like Firefox add-ons Modify Headers (1) and X-Forwarded-For Spoofer (2) . The forthcoming version of Apache Httpd will offer a secure mechanism to handle X-Forwarded-For with a module called mod_remoteip (3). It relies on the concept of trusted proxies which IP address can be 'swallowed'. The first IP of the list that is not a trusted proxy is seen as the real remote ip. mod_remoteip would not have been tricked by such x-forwarded-for header spoofing. Here are two java ports of mod_remoteip to handle X-Forwarded-For at the Tomcat level with a valve and at the WAR level with a servlet filter : RemoteIpValve (4) and XForwardedFilter (5). In addition to handle X-Forwarded-For, they also integrate X-Forwarded-Proto (ssl). These java ports integrate the same trusted proxies concept to prevent spoofing. Cyrille -- Cyrille Le Clerc clecl...@xebia.fr cyri...@cyrilleleclerc.com http://blog.xebia.fr (1) https://addons.mozilla.org/en-US/firefox/addon/967 (2) https://addons.mozilla.org/en-US/firefox/addon/5948 (3) http://httpd.apache.org/docs/trunk/mod/mod_remoteip.html (4) http://code.google.com/p/xebia-france/wiki/RemoteIpValve (5) http://code.google.com/p/xebia-france/wiki/XForwardedFilter On Mon, Oct 5, 2009 at 11:19 PM, Elli Albek e...@sustainlane.com wrote: Hi, We can add the header to the custom valves, but then in addition we have to change a few log file configurations, create a servlet filter and maybe something else I cant think of now. Basically doing the same thing a few times and keeping track of all the places that depend on the header. Ideally this would all be corrected once in the beginning of the request processing pipeline, so log file configuration, other valves and the war files will remain unchanged. Attached a Valve that does that. This is the minimum code necessary, so it should not have any significant performance impact. Feel free to use as is, not guaranteed to work, no expressed on implied warranties, not FDIC insured and may loose value. To configure Tomcat add to server.xml: Service name=Catalina Connector port=8080 .../ Engine defaultHost=localhost name=Catalina !-- This should precede all other configuration in the engine -- Valve className=org.apache.catalina.connector.RemoteIPValve/ Java class/jar should be placed in /server/lib or /server/classes E package org.apache.catalina.connector; import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.ServletException; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.valves.ValveBase; /** * A valve that extracts the remote IP of the client from an HTTP header field * passed by the proxy, and set it in the request as the original client IP. * This valve should be the first valve in the engine, so log valves (and * others) will see the real client IP without requiring the same code again. * * @author Elli Albek, www.sustainlane.com */ public class RemoteIPValve extends ValveBase { private static final Pattern ipExpr = Pattern.compile(^[\\da-fA-F]+(\\.[\\da-fA-F]+)+); private String forwardedForHeader = X-Forwarded-For; public void invoke(Request request, Response response) throws IOException, ServletException { String header =
RE: Tomcat is not getting shutdown
Hi Mark, Thank you, I got the thread dump, please find it below and suggest what could be the problem. Full thread dump Java HotSpot(TM) Server VM (11.2-b01 mixed mode): DestroyJavaVM prio=3 tid=0x00030c00 nid=0x2 waiting on condition [0x..0xfe4ffb58] java.lang.Thread.State: RUNNABLE http-8080-1 daemon prio=3 tid=0x00f0cc00 nid=0x29 in Object.wait() [0x53bff000..0x53bff870] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:125 6) - locked 0x5e4c58d0 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1281) at java.lang.Thread.run(Thread.java:619) http-4443-10 daemon prio=3 tid=0x009d6000 nid=0x23 in Object.wait() [0x53cff000..0x53cffaf0] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x5e2f9730 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:125 6) - locked 0x5e2f9730 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1281) at java.lang.Thread.run(Thread.java:619) http-4443-9 daemon prio=3 tid=0x001d5c00 nid=0x22 in Object.wait() [0x53dff000..0x53dffb70] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:125 6) - locked 0x5e2f9750 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1281) at java.lang.Thread.run(Thread.java:619) http-4443-8 daemon prio=3 tid=0x006af400 nid=0x21 in Object.wait() [0x53eff000..0x53effa70] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x5dd4bd20 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:125 6) - locked 0x5dd4bd20 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1281) at java.lang.Thread.run(Thread.java:619) http-4443-7 daemon prio=3 tid=0x0101a800 nid=0x20 in Object.wait() [0x53fff000..0x53fff8f0] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x5dd4bd40 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:125 6) - locked 0x5dd4bd40 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1281) at java.lang.Thread.run(Thread.java:619) http-4443-6 daemon prio=3 tid=0x00688400 nid=0x1f in Object.wait() [0x540ff000..0x540ffbf0] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x5dff35d0 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:125 6) - locked 0x5dff35d0 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1281) at java.lang.Thread.run(Thread.java:619) http-4443-5 daemon prio=3 tid=0x011bf800 nid=0x1e in Object.wait() [0x541ff000..0x541ff870] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:125 6) - locked 0x5e035780 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1281) at java.lang.Thread.run(Thread.java:619) http-4443-4 daemon prio=3 tid=0x00521c00 nid=0x1d in Object.wait() [0x542ff000..0x542ffb70] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x5e2f9630 (a org.apache.tomcat.util.net.AprEndpoint$Worker) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:125 6) - locked 0x5e2f9630 (a