Re: Logging per webapp per instance

2011-12-20 Thread Simon
2011/12/21 Konstantin Kolinko : > 2011/12/20 Christopher Schultz : >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Simon, >> >> On 12/19/11 11:54 AM, Simon wrote: >>> log4j.appender.file.File=/var/log/webapp.log >>> >>> Thus, there is 3 identical webapps logging into the same log file >>>

Re: stack traces in the log become one line

2011-12-20 Thread André Warnier
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 12/20/11 4:31 PM, Rainer Jung wrote: If you really want to get the stacks in all cases, you can set the JVM start flag: -XX:-OmitStackTraceInFastThrow I'm astonished! Thanks for the tip, Rainer. Me too. Re

Re: Hosted environment

2011-12-20 Thread Pid *
On 21 Dec 2011, at 06:52, "r.sriram" wrote: > Thanks Mark. > > this is great. I just wanted to make sure, for each of the virtual > hosts, I can create the webapps directory outside of Apache directory > structure can't I? e.g. > > C:\inetpub\vhosts\x.com\httpdocs\webapps > C:\inetpub\vhosts\

Re: Hosted environment

2011-12-20 Thread r.sriram
Thanks Mark. this is great. I just wanted to make sure, for each of the virtual hosts, I can create the webapps directory outside of Apache directory structure can't I? e.g. C:\inetpub\vhosts\x.com\httpdocs\webapps C:\inetpub\vhosts\y.com\httpdocs\webapps C:\inetpub\vhosts\z.com\http

Re: Logging per webapp per instance

2011-12-20 Thread Konstantin Kolinko
2011/12/20 Christopher Schultz : > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Simon, > > On 12/19/11 11:54 AM, Simon wrote: >> log4j.appender.file.File=/var/log/webapp.log >> >> Thus, there is 3 identical webapps logging into the same log file >> simultaneously : > > It's more likely that

Re: stack traces in the log become one line

2011-12-20 Thread Darrell Esau
Awesome! That's what I was looking for. Thanks! On Tue, Dec 20, 2011 at 1:31 PM, Rainer Jung wrote: > On 20.12.2011 18:53, Darrell Esau wrote: > >> Hi all, >> >> I'm using tomcat 6.0.18. I've got an older app which, for logging, mostly >> just prints stack traces to System.out. >> >> When to

Re: stack traces in the log become one line

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 12/20/11 4:31 PM, Rainer Jung wrote: > If you really want to get the stacks in all cases, you can set the > JVM start flag: > > -XX:-OmitStackTraceInFastThrow I'm astonished! Thanks for the tip, Rainer. - -chris -BEGIN PGP SIGNATURE-

Re: Mysterious request edirect with value exchange

2011-12-20 Thread Rainer Jung
On 20.12.2011 15:07, uwe.hellm...@t-systems.com wrote: It is a webformular. The java code should this fragment. final String username = req.getParameter("username"); String uParam = ""; if (StringUtils.isBlank(username) == false) { uParam = "&u=".concat(username); } l

Re: stack traces in the log become one line

2011-12-20 Thread Rainer Jung
On 20.12.2011 18:53, Darrell Esau wrote: Hi all, I'm using tomcat 6.0.18. I've got an older app which, for logging, mostly just prints stack traces to System.out. When tomcat starts, any stack trace printed this way will print out fully and be visible in catalina.out However, after the server

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread Pid
On 20/12/2011 17:33, Gregor S. wrote: > Ok, here's some news: > > When using the APR without SSL by changing the attribute of > APRLiefeCycleListener to > > SSLEngine="off" /> > > it's working. > > My SSL-version is > > OpenSSL> version > OpenSSL 0.9.8c 05 Sep 2006 Should probably update tha

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread Gregor S.
Chris, On Tue, Dec 20, 2011 at 9:25 PM, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > That's an interesting academic question: would "the stock market" > provide enough entropy? when looking at my small portfolio becoming smaller and smaller and determing again

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 12/20/11 3:10 PM, André Warnier wrote: > > Maybe you could just connect it to the stock market ? That's an interesting academic question: would "the stock market" provide enough entropy? On the one hand, everything is essentially random, b

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregor, On 12/20/11 1:53 PM, Gregor S. wrote: > On Tue, Dec 20, 2011 at 7:43 PM, Christopher Schultz > wrote: > >> Do you have an OpenSSL crypto provider that you'd like to use >> *besides* the software-based one? If so, that's where you'd >> spec

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread André Warnier
Gregor S. wrote: Hi Chris, On Tue, Dec 20, 2011 at 7:43 PM, Christopher Schultz wrote: Yeah, it's a question of faster startup or "better" entropy. Everything is PRNGs, anyway. If you want real entropy, you have to listen to cosmic background radiation or something. Now *that* sound interes

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread Gregor S.
Hi Chris, On Tue, Dec 20, 2011 at 7:43 PM, Christopher Schultz wrote: > Yeah, it's a question of faster startup or "better" entropy. > Everything is PRNGs, anyway. If you want real entropy, you have to > listen to cosmic background radiation or something. Now *that* sound interesting: How do I

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregor, On 12/20/11 12:51 PM, Gregor S. wrote: > Ok, it's not the best solution since AFAIK /dev/urandom is not the > most secure implementation, but at least it's working now. Yeah, it's a question of faster startup or "better" entropy. Everything

Re: MBean InitialContext() Tomcat query- pls help

2011-12-20 Thread Pid *
On 20 Dec 2011, at 15:47, S B wrote: > On Tue, Dec 20, 2011 at 7:00 PM, Pid wrote: > >> On 20/12/2011 11:57, S B wrote: >>> MBeanImpl code is packaged as a war and deployed in tomcat along with >> it's >>> mbeans-descriptor.xml >>> I am not using ServletContextListener in my code. (mbean registr

Re: Access dbf files outside context/docbase - fixed

2011-12-20 Thread David kerber
On 12/20/2011 1:09 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, On 12/19/11 8:28 PM, David Kerber wrote: Just to close out this thread, it's now fixed. I found a native Java dBase (.dbf) file driver, and it works great in both 32- and 64-bit environments

Re: Logging per webapp per instance

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon, On 12/19/11 11:54 AM, Simon wrote: > log4j.appender.file.File=/var/log/webapp.log > > Thus, there is 3 identical webapps logging into the same log file > simultaneously : It's more likely that the last one wins: the first 2 logs was probably

Re: Access dbf files outside context/docbase - fixed

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, On 12/19/11 8:28 PM, David Kerber wrote: > Just to close out this thread, it's now fixed. I found a native > Java dBase (.dbf) file driver, and it works great in both 32- and > 64-bit environments, without having to mess with ODBC or the screw

Re: [OT] truststore and keystore SSL

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lau, On 12/20/11 5:24 AM, Lau Eng Huat wrote: > Its a self signed certificate. I posted here is because there seems > to be no reply from the httpclient-us...@hc.apache.org. Will there > be a lot of changes when we changed to commercial certificates ?

Re: [OT] stack traces in the log become one line

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Darrell, Marking OT since Tomcat doesn't handle any of this logging -- it's all about System.err. On 12/20/11 12:53 PM, Darrell Esau wrote: > I'm using tomcat 6.0.18. You should seriously consider upgrading. > I've got an older app which, for loggi

Re: AW: Mysterious request edirect with value exchange

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Uwe, On 12/20/11 9:07 AM, uwe.hellm...@t-systems.com wrote: > It is a webformular. > > The java code should this fragment. > > final String username = req.getParameter("username"); String uParam > = ""; if (StringUtils.isBlank(username) == false) {

stack traces in the log become one line

2011-12-20 Thread Darrell Esau
Hi all, I'm using tomcat 6.0.18. I've got an older app which, for logging, mostly just prints stack traces to System.out. When tomcat starts, any stack trace printed this way will print out fully and be visible in catalina.out However, after the server has been running some time, when those sam

Re: AW: Mysterious request edirect with value exchange

2011-12-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Uwe, On 12/20/11 8:51 AM, uwe.hellm...@t-systems.com wrote: > Thanks for the answer. We have a test environment but there it > isn't reproducible. That's unfortunate. > Just on the production system. But everything is configured > identical. We use

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread Gregor S.
This time, it's great some of the guys are on Google+. Thanks to +Jean-Frederic Clere, I changed the listener-definition to and it's working now. Ok, it's not the best solution since AFAIK /dev/urandom is not the most secure implementation, but at least it's working now. When reading the docs

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread André Warnier
André Warnier wrote: Gregor S. wrote: Ok, here's some news: When using the APR without SSL by changing the attribute of APRLiefeCycleListener to it's working. My SSL-version is OpenSSL> version OpenSSL 0.9.8c 05 Sep 2006 According to the docs (http://tomcat.apache.org/tomcat-6.0-doc/apr.h

Re: Hosted environment

2011-12-20 Thread Mark Eggers
- Original Message - > From: r.sriram > To: Tomcat Users List > Cc: > Sent: Tuesday, December 20, 2011 1:21 AM > Subject: Re: Hosted environment > >T hanks Andre. > a few quick questions. > > Questions with respect to your response: > Your response: > >   appBase="/path1/webapps/"

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread André Warnier
Gregor S. wrote: Ok, here's some news: When using the APR without SSL by changing the attribute of APRLiefeCycleListener to it's working. My SSL-version is OpenSSL> version OpenSSL 0.9.8c 05 Sep 2006 According to the docs (http://tomcat.apache.org/tomcat-6.0-doc/apr.html) this should be fi

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread Gregor S.
Ok, here's some news: When using the APR without SSL by changing the attribute of APRLiefeCycleListener to it's working. My SSL-version is OpenSSL> version OpenSSL 0.9.8c 05 Sep 2006 According to the docs (http://tomcat.apache.org/tomcat-6.0-doc/apr.html) this should be fine. Anybody got an

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread Gregor S.
Hi André, that's a good idea trying the APR w/o SSL, I'll give it a try pretty soon. Still, we do need SSL (personal data, we're obliged by law), but that might give me a clue at what to look at. Updating Java and the OS unfortunately (big, big sighh) is not an option, at least for the next

Re: Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread André Warnier
Gregor S. wrote: Hi guys, I'm a bit desperated: I'm trying to re-organize our "pet" Tomcat within the following environment: Using CATALINA_BASE: /home/tomcat/local/apache-tomcat-6.0.33 Using CATALINA_HOME: /home/tomcat/local/apache-tomcat-6.0.33 Using CATALINA_TMPDIR: /home/tomcat/local/a

AW: How much connections are handled per thread?

2011-12-20 Thread Uwe . Hellmann
Yes you are completely right, but that is not my decision it is the customers. I tried everything the last half year to convince him to switch to current tomcat or at least to tomcat 6. It was a waste of energy. But on the other hand I have to prove that it is not tomcats failure which causes thi

Re: How much connections are handled per thread?

2011-12-20 Thread Tobias Crefeld
Am Tue, 20 Dec 2011 15:52:57 +0100 schrieb uwe.hellm...@t-systems.com: > It is Tomcat 5.5.26 > [..] > > If this is the case I get some munition to go the the developers. In my experience this route is an useless approach as long as you run a 4 years old Tomcat and without being able to identify

Re: MBean InitialContext() Tomcat query- pls help

2011-12-20 Thread S B
On Tue, Dec 20, 2011 at 7:00 PM, Pid wrote: > On 20/12/2011 11:57, S B wrote: > > MBeanImpl code is packaged as a war and deployed in tomcat along with > it's > > mbeans-descriptor.xml > > I am not using ServletContextListener in my code. (mbean registration is > > done inside constructor). > > R

Can't get APR running w/ Tomcat 6.0.33 (Debian)

2011-12-20 Thread Gregor S.
Hi guys, I'm a bit desperated: I'm trying to re-organize our "pet" Tomcat within the following environment: Using CATALINA_BASE: /home/tomcat/local/apache-tomcat-6.0.33 Using CATALINA_HOME: /home/tomcat/local/apache-tomcat-6.0.33 Using CATALINA_TMPDIR: /home/tomcat/local/apache-tomcat-6.0.33

AW: How much connections are handled per thread?

2011-12-20 Thread Uwe . Hellmann
It is Tomcat 5.5.26 summarize all information which I have gathered so far from your answers it looks like a problem which seem to occur trhough a not-thread safe implementation of a class or the whole servlet? If this is the case I get some munition to go the the developers. Thanks for all you

Re: How much connections are handled per thread?

2011-12-20 Thread André Warnier
uwe.hellm...@t-systems.com wrote: Hello together, just a short question. Does a single Tomcat thread handle more than one connection at a time? (kind of multiplexing) Essentially, no. One tomcat thread could be handling several successive *requests* on the same connection, one after the oth

Re: How much connections are handled per thread?

2011-12-20 Thread Pid
On 20/12/2011 13:36, uwe.hellm...@t-systems.com wrote: > Hello together, > > just a short question. > Does a single Tomcat thread handle more than one connection at a time? (kind > of multiplexing) No. > Is it possible that if there are more connections at a time per thread that > there is a b

Re: Mysterious request edirect with value exchange

2011-12-20 Thread Chema
OK Just for discard what is answering Chuck in another thread: a request-specific value kept in a servlet instance field 2011/12/20 : > It is a webformular. > > The java code should this fragment. > > final String username = req.getParameter("username"); >    String uParam = ""; >    if (String

RE: How much connections are handled per thread?

2011-12-20 Thread Caldarale, Charles R
> From: uwe.hellm...@t-systems.com [mailto:uwe.hellm...@t-systems.com] > Subject: How much connections are handled per thread? > Does a single Tomcat thread handle more than one connection > at a time? No (discounting the asynch mechanisms). > Is it possible that if there are more connections

AW: Mysterious request edirect with value exchange

2011-12-20 Thread Uwe . Hellmann
It is a webformular. The java code should this fragment. final String username = req.getParameter("username"); String uParam = ""; if (StringUtils.isBlank(username) == false) { uParam = "&u=".concat(username); } logonFilter.setLoginFailedUrl("/action?login_error=1".concat(uP

Re: Mysterious request edirect with value exchange

2011-12-20 Thread Chema
>> This result is as expected, but from time to time we saw the >> following URL string returned >> http://mytestsystem/login.action?login_error=1&u=OtherUser although >> we sent the form with Tester as value away. But now in the input >> field it is also OtherUser set. One question How the return

AW: Mysterious request edirect with value exchange

2011-12-20 Thread Uwe . Hellmann
Thanks for the answer. We have a test environment but there it isn't reproducible. Just on the production system. But everything is configured identical. We use Apache with mod_proxy (via AJP). Only the connector? It is pretty standard.

How much connections are handled per thread?

2011-12-20 Thread Uwe . Hellmann
Hello together, just a short question. Does a single Tomcat thread handle more than one connection at a time? (kind of multiplexing) Is it possible that if there are more connections at a time per thread that there is a bug that a GET variable is exchanged between these connections? An example:

Re: MBean InitialContext() Tomcat query- pls help

2011-12-20 Thread Pid
On 20/12/2011 11:57, S B wrote: > MBeanImpl code is packaged as a war and deployed in tomcat along with it's > mbeans-descriptor.xml > I am not using ServletContextListener in my code. (mbean registration is > done inside constructor). Right, but what is calling the constructor? > (I am using gma

Re: MBean InitialContext() Tomcat query- pls help

2011-12-20 Thread S B
MBeanImpl code is packaged as a war and deployed in tomcat along with it's mbeans-descriptor.xml I am not using ServletContextListener in my code. (mbean registration is done inside constructor). (I am using gmail and hitting reply button on your messages. Please let me know if my messages are not

Re: Hosted environment

2011-12-20 Thread Pid
On 20/12/2011 09:21, r.sriram wrote: > Thanks Andre. > a few quick questions. > > Questions with respect to your response: > Your response: > > >... > > > >... > > > Questions: > > * which is the file where I should add these lines tomcat/conf/server.xml > * Is hos

Re: MBean InitialContext() Tomcat query- pls help

2011-12-20 Thread Pid
On 20/12/2011 11:46, S B wrote: > Code Sample that fails with exception(I am invoking reload() from jconsole > ): > > class MBeanImpl implements MBeanInterface{ > > public MBeanImpl{ > // code to register this bean. > } > > > @Override > public void reload()

Re: MBean InitialContext() Tomcat query- pls help

2011-12-20 Thread Pid
On 20/12/2011 11:29, S B wrote: > Hi, > I am using : > > Server version: Apache Tomcat/6.0.32 > OS Name:Mac OS X > OS Version: 10.6.8 > Architecture: x86_64 > JVM Version:1.6.0_29-b11-402-10M3527 > > Thanks, > Ravi Please post replies below the question, so the conversation ord

Re: MBean InitialContext() Tomcat query- pls help

2011-12-20 Thread S B
Code Sample that fails with exception(I am invoking reload() from jconsole ): class MBeanImpl implements MBeanInterface{ public MBeanImpl{ // code to register this bean. } @Override public void reload() { DBManager.loadFromDB(); } } class DBMa

Re: MBean InitialContext() Tomcat query- pls help

2011-12-20 Thread S B
Hi, I am using : Server version: Apache Tomcat/6.0.32 OS Name:Mac OS X OS Version: 10.6.8 Architecture: x86_64 JVM Version:1.6.0_29-b11-402-10M3527 Thanks, Ravi On Tue, Dec 20, 2011 at 4:52 PM, Pid * wrote: > On 20 Dec 2011, at 11:02, S B wrote: > > > Hi, > > > > I created a

Re: MBean InitialContext() Tomcat query- pls help

2011-12-20 Thread Pid *
On 20 Dec 2011, at 11:02, S B wrote: > Hi, > > I created and deployed an MBean in my tomcat. It uses datasource to connect > to DB. Which version of Java? Tomcat? > My questions is: > > When I create InitialContext() inside MBean's constructor and pass the > envContext to DBManager class to lo

MBean InitialContext() Tomcat query- pls help

2011-12-20 Thread S B
Hi, I created and deployed an MBean in my tomcat. It uses datasource to connect to DB. My questions is: When I create InitialContext() inside MBean's constructor and pass the envContext to DBManager class to lookup datasource it works fine. However when I create InitialContext() in DBManager cl

Re: [OT] truststore and keystore SSL

2011-12-20 Thread Lau Eng Huat
Hi Guys, Its a self signed certificate. I posted here is because there seems to be no reply from the httpclient-us...@hc.apache.org. Will there be a lot of changes when we changed to commercial certificates ? On Tue, Dec 20, 2011 at 7:14 AM, Tim Watts wrote: > On Mon, 2011-12-19 at 18:06 -0500

Re: Logging per webapp per instance

2011-12-20 Thread Simon
Hi, I will use the variable substitution solution by changing the log4j.properties file : log4j.logFileSuffix=... log4j.appender.file.File=/var/log/webapp-${logSuffix}.log The value will be overriden by each instances with -Dlog4j.logFileSuffix=whatever Thank you for your help ! Regards, Simon

Re: Hosted environment

2011-12-20 Thread r.sriram
Thanks Andre. a few quick questions. Questions with respect to your response: Your response: ... ... Questions: * which is the file where I should add these lines * Is host1:www. If not what is it? * does path1, path2 etc. start at CATALINA_HOME? * Is there any other