Re: Tomcat recycling

2011-11-23 Thread André Warnier
Jan Vávra wrote: Hello, thanks for a long response. As I see everybody are againts my proposal. Ok. Yes, some kind of restarting can be done via some scripts. In the best in a cluster environment... Personally I don't trust /etc/init.d/tomcat scripts that comes in wg. SLES linux. Sometimes

Re: Query related to detection of the Source IP Address in Load-balancing mode

2011-11-23 Thread André Warnier
Faseela K wrote: Hi, I have applications running on two tomcat servers which are in load balancing mode. If I try to access the application from the first server,and if the request is forwarded to the second server, the request.getRemoteAddr() on the second server still returns

Re: Java 7

2011-11-23 Thread Ognjen Blagojevic
André, On 22.11.2011 20:31, André Warnier wrote: The reason I'm asking is that for testing some unrelated Java software, I am being asked to install Java 7 on a system on which currently happily runs Tomcat 6.x with Java 6 (Oracle), and I'd like to know if I would be setting myself up for some

RE: tomcat http connector

2011-11-23 Thread Asha K S
Hi, Thank you all for helping me in this regard. Can you please point me to documentation which helps me configure https between Apache and Tomcat. Also in AJPv13 extensions proposal (http://tomcat.apache.org/connectors-doc/ajp/ajpv13ext.html) one add on suggests Basic authorisation system,

RE: Maven Tomcat 7 plugin - changing war name

2011-11-23 Thread Hodchenkov, Paul
Hi, warFile in tomcat7 plugin wokrs for me: plugin groupIdorg.apache.tomcat.maven/groupId artifactIdtomcat7-maven-plugin/artifactId version2.0-SNAPSHOT/version configuration

Directory contents listing of Aliases Directory

2011-11-23 Thread Asha K S
Hi, Currently when I set Aliases attribute for Context ,Tomcat serves resources from Aliases directory but I am unable to get the directory listing for the Aliases Directory.Can you please let me know if anyone has tried this or if there is any other way to do it. I have set my

Re: Directory contents listing of Aliases Directory

2011-11-23 Thread Markus Schönhaber
23.11.2011 12:53, Asha K S: Currently when I set Aliases attribute for Context ,Tomcat serves resources from Aliases directory but I am unable to get the directory listing for the Aliases Directory.Can you please let me know if anyone has tried this or if there is any other way to do it.

Re: tomcat http connector

2011-11-23 Thread André Warnier
It is easier to follow the conversation if questions/responses follow in a logical order. In other words, please do not top-post. Asha K S wrote: Hi, Thank you all for helping me in this regard. Can you please point me to documentation which helps me configure https between Apache and

RE: Directory contents listing of Aliases Directory

2011-11-23 Thread Asha K S
HI Markus, Thanks a lot for the reply. But I already have listings set to true and still facing issues with directory listing of the directory set in Aliases. Thanks, Asha -Original Message- From: Markus Schönhaber [mailto:tomcat-us...@list-post.mks-mail.de] Sent: Wednesday, November

Re: Single war file - multiple hosts - can't get log4j to log to different files

2011-11-23 Thread chris derham
We thought this would allow us to monitor all contexts with a single probe install, but it only seems to show a single localhost context. I assume that the hosts are separated, and that the context=priviliged setting can allow a web app to access other webapps in the same context, but

Re: Securing Tomcat cluster communication

2011-11-23 Thread Filip Hanik - Dev Lists
On 10/6/2011 8:31 AM, Afkham Azeez wrote: I had a look at the Tribes code. Can somebody please explain how Channel.SEND_OPTIONS_SECURE works? not yet implemented :( From the JavaDoc: SEND_OPTIONS_SECURE - Message is sent over an encrypted channel How is this encrypted channel setup? How do

Babysitting ThreadLocals

2011-11-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I've got a servlet that needs to log every request (potentially big requests) to files on the disk. In order to do that in a reasonably-tidy way, we write each file into a directory with the current date in the path, something like this:

Re: How to get the tomcat internal log out?

2011-11-23 Thread Kurt
Hello Konstantin: I tried to invoke Bootstrap,but got an error saying Can't load server.xml from I:\workspace\mye10\TOMCAT_5_5_30\conf\server.xml,server.xml does exist and when I invoke Catalina ,everything is ok, that is ,web app deployed into webapps/Root can run normally. Is there

Re: tomcat http connector

2011-11-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Asha, On 11/23/11 5:53 AM, Asha K S wrote: Thank you all for helping me in this regard. Can you please point me to documentation which helps me configure https between Apache and Tomcat. Read the documentation for Tomcat Connectors on the Tomcat

Re: How to get the tomcat internal log out?

2011-11-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Konstantin, On 11/21/11 7:00 AM, Konstantin Kolinko wrote: 2011/11/21 Kurt fxbird1...@163.com: Hello all: I compile tomcat 5.5.30 and import it to eclipse as a project, to research how the tomcat load class , I need to view the running log

Re: Securing Tomcat cluster communication

2011-11-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Afkham, On 10/6/11 10:17 AM, Afkham Azeez wrote: Is there a way to do authentication in Tribes when new members try to join a cluster so that unauthorized nodes cannot join in? Also, when clustering messages are sent back forth, how do we ensure

Re: Single war file - multiple hosts - can't get log4j to log to different files

2011-11-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, On 11/23/11 8:06 AM, chris derham wrote: We thought this would allow us to monitor all contexts with a single probe install, but it only seems to show a single localhost context. I assume that the hosts are separated, and that the

Re: Tomcat 7 not working with javax.net.ssl.keyStorePassword property

2011-11-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Satish, On 11/23/11 12:30 AM, Satish Mittal wrote: On Wed, Nov 23, 2011 at 2:32 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: This used to work in tomcat 5. Interesting. Where is this documented to work? As per the tomcat

RE: Babysitting ThreadLocals

2011-11-23 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Babysitting ThreadLocals Removing the ThreadLocal after every request of course means that the use of ThreadLocal is entirely useless. Should I stop worrying about the overhead of creating a SimpleDateFormat? Given

Re: Babysitting ThreadLocals

2011-11-23 Thread Chema
A silly question: why do you use a ThreadLocal to store a constant value for entire application? why not a static variable or store into web application context , by example ? Thanks 2011/11/23 Christopher Schultz ch...@christopherschultz.net: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1

Re: Tomcat Manager WebApp authentication

2011-11-23 Thread Mark Montague
On November 21, 2011 14:49 , Mark Montague m...@catseye.org wrote: I need Tomcat 6 to use the authentication performed by the front-end webserver without breaking the roles required by the Tomcat Manager webapp. I'm replying to myself to document what I did in case it helps other people.

Re: Babysitting ThreadLocals

2011-11-23 Thread Daniel Mikusa
On Wed, 2011-11-23 at 07:48 -0800, Christopher Schultz wrote: Should I look for a threadsafe implementation of SimpleDateFormat (maybe in commons-lang or something)? I haven't used this, but it seems to be a drop in replacement for SimpleDateFormat.

Re: Babysitting ThreadLocals

2011-11-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chema, On 11/23/11 11:31 AM, Chema wrote: A silly question: why do you use a ThreadLocal to store a constant value for entire application? why not a static variable or store into web application context , by example ? It's not a silly

Re: Babysitting ThreadLocals

2011-11-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 11/23/11 11:29 AM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Babysitting ThreadLocals Removing the ThreadLocal after every request of course means that the use of ThreadLocal

Re: Babysitting ThreadLocals

2011-11-23 Thread chris derham
A silly question: why do you use a ThreadLocal to store a constant value for entire application? why not a static variable or store into web application context , by example ? The string of the date format is constant. However the SimpleDateFormat class is not threadsafe, so you will hit

Re: Babysitting ThreadLocals

2011-11-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, On 11/23/11 11:46 AM, chris derham wrote: If you do this, and fine that creating these objects is taking more time, then perhaps one method would be to use a weak object reference to the thread local. That way you would get the best of

Re: Babysitting ThreadLocals

2011-11-23 Thread Filippo Machi
Ciao Christopher, i heard Joda has a thread safe date parser/fotmatter..remember to check it doesn't use threadlocals too :) Hth Fil Il giorno 23/nov/2011 17.57, Christopher Schultz ch...@christopherschultz.net ha scritto: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, On 11/23/11

can only see ROOT webapp

2011-11-23 Thread shadowdancer351
I am using Tomcat 4 on Linux. (I have no choice on using a newer version - this is company software) I can see any html page i put in the ROOT directory, but I can't see any of the built-in webapps by typing in the URL http://myhost:8080/manager/index.html (yes that index.html file exists in

Re: can only see ROOT webapp

2011-11-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shadowdancer, On 11/23/11 12:11 PM, shadowdancer351 wrote: I am using Tomcat 4 on Linux. (I have no choice on using a newer version - this is company software) :( You might try to convince someone to start testing on Tomcat 7. You might find that

Patching a jar in a wepabb

2011-11-23 Thread Andrew Kujtan
Hello Tomcat-users, I'm running Tomcat 7.0.20. My webapp uses several 3rd party jars located in WEB-INF/lib and I need to apply a series of patches to one of the jars. The patches are jar files that only have the modified class files in it, so to apply it I need to add them to the classpath

Re: Tomcat 7 not working with javax.net.ssl.keyStorePassword property

2011-11-23 Thread Konstantin Kolinko
2011/11/23 Satish Mittal satish.mit...@gmail.com: This used to work in tomcat 5. However in tomcat 7, the same webapp/keystore throws the following error: You must always mention the full version number. There are ~20 different versions of Tomcat 7.0.x, and even more of 5.0.x/5.5.y

Re: Securing Tomcat cluster communication

2011-11-23 Thread Afkham Azeez
On Wed, Nov 23, 2011 at 8:48 PM, Filip Hanik - Dev Lists devli...@hanik.com wrote: On 10/6/2011 8:31 AM, Afkham Azeez wrote: I had a look at the Tribes code. Can somebody please explain how Channel.SEND_OPTIONS_SECURE works? not yet implemented :( What is the proper way of implementing

Re: Patching a jar in a wepabb

2011-11-23 Thread Yuan
Can u compile all patches into one jar file? On 2011-11-23, at 12:41 PM, Andrew Kujtan akuj...@evertz.com wrote: Hello Tomcat-users, I'm running Tomcat 7.0.20. My webapp uses several 3rd party jars located in WEB-INF/lib and I need to apply a series of patches to one of the jars. The

Adding an additional static resource directory to a webapp via API

2011-11-23 Thread Benson Margulies
I'm launching Tomcat 7 via the API. One of the uses of this is that I can launch from Eclipse and 'live-edit' my static files, without tangling myself up in the Eclipse JEE facilities, which I have never succeeded in using very well. Now, I want to meld some shared content into the webapp. In

RE: Patching a jar in a wepabb

2011-11-23 Thread Andrew Kujtan
That's possible, but I'd like to avoid having to play with the jars, I need to retain the ability to revert any changes made to the base install, I.e. If patch3 breaks it I want to go back to patch2. Being able to just remove the patch jar from the folder is much simpler than having to rebuild an

Re: Babysitting ThreadLocals

2011-11-23 Thread Chema
The string of the date format is constant. However the SimpleDateFormat class is not threadsafe, so you will hit intermittant issues when sharing across threads Do you mean that read operations (getters) in not-threadsafe objects are not an atomic operations and could retrieve dirty values

Re: Babysitting ThreadLocals

2011-11-23 Thread Konstantin Kolinko
2011/11/23 Christopher Schultz ch...@christopherschultz.net: On 11/23/11 11:29 AM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Babysitting ThreadLocals Removing the ThreadLocal after every request of course means that the use of

Re: Patching a jar in a wepabb

2011-11-23 Thread Konstantin Kolinko
2011/11/23 Andrew Kujtan akuj...@evertz.com: As it stands,  I think I'm just going to have to extract the class files from each of the patch jars and insert the structure into my WEB-INF/classes folder, as my understanding is that they are ahead of the lib folder in the classpath. Is this a

RE: Babysitting ThreadLocals

2011-11-23 Thread Caldarale, Charles R
From: Chema [mailto:demablo...@gmail.com] Subject: Re: Babysitting ThreadLocals Do you mean that read operations (getters) in not-threadsafe objects are not an atomic operations and could retrieve dirty values cause sharing across threads? Correct. Not-thread-safe means just what it

Re: Tomcat 7 not working with javax.net.ssl.keyStorePassword property

2011-11-23 Thread Satish Mittal
On Wed, Nov 23, 2011 at 11:14 PM, Konstantin Kolinko knst.koli...@gmail.com wrote: 2011/11/23 Satish Mittal satish.mit...@gmail.com: This used to work in tomcat 5. However in tomcat 7, the same webapp/keystore throws the following error: You must always mention the full version number.

Re: Maven Tomcat 7 plugin - changing war name

2011-11-23 Thread Will Glass-Husain
Ahh, I didn't specify target. Shouldn''t it be assumed? When build the war, it automatically goes there. WILL On Wed, Nov 23, 2011 at 3:33 AM, Hodchenkov, Paul paul.hodchen...@oxagile.com wrote: Hi, warFile in tomcat7 plugin wokrs for me: plugin

Re: Adding an additional static resource directory to a webapp via API

2011-11-23 Thread Pid
On 23/11/2011 18:06, Benson Margulies wrote: I'm launching Tomcat 7 via the API. One of the uses of this is that I can launch from Eclipse and 'live-edit' my static files, without tangling myself up in the Eclipse JEE facilities, which I have never succeeded in using very well. Now, I

Re: Query related to detection of the Source IP Address in Load-balancing mode

2011-11-23 Thread Pid
On 23/11/2011 06:37, Faseela K wrote: Hi, I have applications running on two tomcat servers which are in load balancing mode. OK so far. If I try to access the application from the first server,and if the request is forwarded to the second server, the request.getRemoteAddr() on the

Re: Single war file - multiple hosts - can't get log4j to log to different files

2011-11-23 Thread Pid
On 23/11/2011 13:06, chris derham wrote: I just wanted to see everything in a single place - from what I have read this can't be done Correct. It could be done, but the apps would need to look outside of their local host. p -- [key:62590808] signature.asc Description: OpenPGP digital

Re: Securing Tomcat cluster communication

2011-11-23 Thread Filip Hanik - Dev Lists
Yes, that way you could encrypt your data packets and not worry about the wire protocol. the placement of the interceptor will be important, so that you don't encrypt packets you don't need to (like ping and failure detection) Filip On 11/23/2011 10:53 AM, Afkham Azeez wrote: On Wed, Nov 23,

Re: Single war file - multiple hosts - can't get log4j to log to different files

2011-11-23 Thread Pid
On 22/11/2011 22:35, Christopher Schultz wrote: Chris, On 11/22/11 2:28 PM, chris derham wrote: Java running on windows 2008 r2 against tomcat 7.0.19 java version 1.6.0_24 Thanks! I have a single war file, and would like to host multiple demo sites of our app. So ideally users access

Re: Tomcat 7 not working with javax.net.ssl.keyStorePassword property

2011-11-23 Thread Mark Thomas
On 22/11/2011 20:42, Satish Mittal wrote: Hi All, I have observed a regression between tomcat 5 and tomcat 7. That is https://issues.apache.org/bugzilla/show_bug.cgi?id=38774 that was fixed only in the 5.5.x branch. I'm not a huge fan of using system properties for configuration so I prefer

Re: Adding an additional static resource directory to a webapp via API

2011-11-23 Thread Benson Margulies
Yes. It's a jquery theme at the moment. I just posted a bz with code I wrote involving subclasses of StandardContext and also FileDirContext that pulls this off. https://issues.apache.org/bugzilla/show_bug.cgi?id=52236. What do you think? On Wed, Nov 23, 2011 at 2:29 PM, Pid p...@pidster.com

Re: Securing Tomcat cluster communication

2011-11-23 Thread Afkham Azeez
Thanks Filip. I will try to implement this contribute it back to Tomcat if that would be useful. Azeez On Thu, Nov 24, 2011 at 2:06 AM, Filip Hanik - Dev Lists devli...@hanik.com wrote: Yes, that way you could encrypt your data packets and not worry about the wire protocol. the placement

Re: Babysitting ThreadLocals

2011-11-23 Thread Terence M. Bandoian
On 1:59 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, I've got a servlet that needs to log every request (potentially big requests) to files on the disk. In order to do that in a reasonably-tidy way, we write each file into a directory with the current date

Tomcat user roles

2011-11-23 Thread Bill Wang
Hi Tomcat guru, I have questions for the tomcat user roles setup. On-call team (24*7 support) need permission to restart one tomcat services, if they get call. I think it is maybe possible to let them restart tomcat throught Tomcat Web Application Manager (the admin url

Spring MVC 3 application gives Could not open JPA EntityManager only on server

2011-11-23 Thread MiB
I have a Debian 5 server where I run 2 sites on Apache Tomcat 6.0.33 and have installed MySQL 5.1.58. I use 2 different IPs for virtual hosting. I have developed a simple Spring MVC 3 application with Hibernate 3 for one of these sites and on my OS X developer machine I have testdeployed a

Re: Spring MVC 3 application gives Could not open JPA EntityManager only on server

2011-11-23 Thread Will Glass-Husain
First, make sure your server can talk to the db server. I usually ssh onto the web server, then from there, do telnet dbserver 3306 and make sure there's no connection error. (connection refused, likely due to firewall or other reason for db not being accessible) If that works, connect with

Re: Spring MVC 3 application gives Could not open JPA EntityManager only on server

2011-11-23 Thread MiB
24 nov 2011 kl. 06.25 Will Glass-Husain suggested: telnet dbserver 3306 I did connect via SSH and I did get a telnet: Unable to connect to remote host: Connection refused on both of my IPs. But I can connect with mysql -uXXX p-XXX -h127.0.0.1 dbName so I changed to that in

RE: Query related to detection of the Source IP Address in Load-balancing mode

2011-11-23 Thread Faseela K
Hi, The client is on the same physical server(Server #1) as the Tomcat, but the load balancer decides that the request is to be processed by Server #2. Then,in Server #2,I see _request.getRemoteAddr() returns 127.0.0.1.(though the request came from Server #1).That is the issue. Thanks,

Re: Query related to detection of the Source IP Address in Load-balancing mode

2011-11-23 Thread André Warnier
Faseela K wrote: Hi, The client is on the same physical server(Server #1) as the Tomcat, but the load balancer decides that the request is to be processed by Server #2. Then,in Server #2,I see _request.getRemoteAddr() returns 127.0.0.1.(though the request came from Server #1).That is

Re: Spring MVC 3 application gives Could not open JPA EntityManager only on server

2011-11-23 Thread Will Glass-Husain
I'd guess a firewall is blocking the database requests when you use the full domain name. Now it sounds like you have incorrect query syntax. Good luck! WILL On Wed, Nov 23, 2011 at 10:04 PM, MiB digital.disc...@gmail.com wrote: 24 nov 2011 kl. 06.25 Will Glass-Husain suggested: telnet