Re: Tomcat on FreeBSD

2007-08-22 Thread Ronald Klop

On Wed Aug 22 04:09:29 CEST 2007 Tomcat Users List users@tomcat.apache.org 
wrote:

Ronald Klop wrote:
 What java version are you running?
 
 Ronald.
 
 On Fri Aug 17 16:00:41 CEST 2007 Tomcat Users List 
 users@tomcat.apache.org wrote:

 Hi,

 I have installed Tomcat 5.5.23_1 on FreeBSD 6.2. I have used Servlets 
 a lot in the past but have not used ant. I am now trying to get this 
 development environment to work. Following the basic portinstall of 
 Tomcat on FreeBSD I did the following:


 1. sudo cp /usr/local/tomcat5.5/server/lib/catalina-ant.jar 
 /usr/local/share/java/apache-ant/lib


 2. Made a sample project

 3. set manager url in build.xml
 property name=manager.url value=http://localhost:8180/manager/

 4. Chnage permissions in tomcat

 cd /usr/local/tomcat5.5]
 sudo chown -R www webapps

 Once this was done I was able to compile the project and install it 
 using:


 ant
 ant install

 I did notice that it created a new directory in webapps with the new 
 application. So far so good. If I try to install it again I get an 
 error stating that it is already installed. Again, so far so good.


 The problem that I have is if I make changes to the project and reload 
 the application using


 ant reload

 I get the following output:
 reload:
 [reload] OK - Reloaded application at context path /hello

 This looks ok. However, when I run it, the changes to the project do 
 not show up. If I look into the directory under webapps, the changes 
 have not been moved over. I have to manually copy the contents from my 
 build to webapps under tomcat.


 What I am doing wrong. I am sure that it is someting simple but do not 
 seem to figure it out.


 Thanks,
 Arend

 
Hi,


I am using diablo-jdk-1.5.0.07.01_6

Thanks,
Arend



Ok, that works for me. So should work for you. You talk about copying your 
content from the build to the webapps directory. Why don't you place your build 
directory in the webapp directory, so building will place the files on the 
rights location and than reloading is enough.

Ronald.


Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-22 Thread Peter Stavrinides

In what context?? over the network?, over the web?, on the server?

There is a portion of the shell script used in a Linux implementation 
for Tomcat 5.5 that checks for the running process:


if start-stop-daemon --test --start --pidfile $CATALINA_PID \
   --user $TOMCAT5_USER --startas $JAVA_HOME/bin/java \
   /dev/null; then

   if [ -f $CATALINA_PID ]; then
   echo $DESC is not running, but pid file exists.
   exit 1
   else
   echo $DESC is not running.
   exit 3
   fi
   else
   echo -n $DESC is running with Java pid 
   cat $CATALINA_PID
   exit 0
   fi



Smith Norton wrote:

No

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Very Slow Startup with APR

2007-08-22 Thread Markus Schönhaber
Rainer Jung wrote:

 Markus Schönhaber wrote:
 Just to confirm that I don't get it wrong again: it is to be expected
 that the value of RANDFILE is ignored in my case since im using tcnative
 1.10?
 
 That's my expectation too.

Fine, thanks.

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Delete Tomcat logs

2007-08-22 Thread Andrew Hole
Do you know some Windows script to delete Tomcat logs after 5 days?

Thanks a lot


Re: JDBCRealm + Expired Passwords

2007-08-22 Thread Peter Stavrinides

I also didn't understand exactly what you mean, but 'JDBCRealm'... implies 
using a database, so the simple way is to redirect and use a web form to change 
it, which is easy enough. If you don't want to use a web form then its an 
entirely different story, I assume some sort of extension or customization to 
Tomcat is required.

Peter

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stephen,

Stephen More wrote:
  

Has anyone written or know of a JDBCRealm that supports an expired password ?



Can you phrase that in a different way? I wouldn't want my JDBCRealm to
allow expired passwords to be used.

Do you mean that you want expired-password-users to be forced to change
their password before doing anything else?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGyzw79CaO5/Lv0PARAmHNAKClt64b23+I7sH00qjLDGffNkbY/wCgniR1
99vbSIqBOgDuLkLX7D8V4ys=
=QI3O
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Single Sign On

2007-08-22 Thread Andrew Hole
Exists some way to implement Single Sign On without source code changes?

Could you tell me a little bit about Single Sign On?

Thanks a lot


Re: Single Sign On

2007-08-22 Thread Gregor Schneider
http://tomcat.apache.org/tomcat-5.5-doc/config/host.html#Single%20Sign%20On

Gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Single Sign On

2007-08-22 Thread Pid

Andrew Hole wrote:

Exists some way to implement Single Sign On without source code changes?

Could you tell me a little bit about Single Sign On?

Thanks a lot



In many environments, but particularly in portal environments, it is
desireable to have a user challenged to authenticate themselves only
once over a set of web applications deployed on a particular virtual
host.

http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Single Sign On

http://www.google.co.uk/search?q=tomcat+single sign on


p



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Single Sign On

2007-08-22 Thread Andrew Hole
Single sign on using valve is interesting, but is it possible use him if I
have different application running in different tomcat instances?

I think that only works with different applications under same tomcat
instance.

Thank you

On 8/22/07, Pid [EMAIL PROTECTED] wrote:

 Andrew Hole wrote:
  Exists some way to implement Single Sign On without source code changes?
 
  Could you tell me a little bit about Single Sign On?
 
  Thanks a lot
 

 In many environments, but particularly in portal environments, it is
 desireable to have a user challenged to authenticate themselves only
 once over a set of web applications deployed on a particular virtual
 host.

 http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Single Sign On

 http://www.google.co.uk/search?q=tomcat+single sign on


 p





Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Karel V Sedlacek
Thanks for this info,...

How do I implement this tip?

#18. Use the -server JVM option. This enables the server JVM, which JIT
compiles bytecode much earlier, and with stronger optimizations. Startup
and first calls will be slower due to JIT compilation taking more time,
but subsequent ones will be faster.

Karel

 In putting #1 into the JAVA_OPTS (which it appears that is the
 CATALINA_OPTS
 for our implementation), it doesn't appear to work, as Tomcat doesn't
 restart.  It could be our version -- which is currently 5.0.30.  please
 let
 me know if there are other steps we need to take here as well.

 thanks,
 Kim :-)

 On 8/21/07, Shane Witbeck [EMAIL PROTECTED] wrote:

 I thought my latest blog post would be of interest to the people on this
 list:


 http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Single Sign On

2007-08-22 Thread Edmund Urbani
Andrew Hole wrote:
 Single sign on using valve is interesting, but is it possible use him if I
 have different application running in different tomcat instances?
 
 I think that only works with different applications under same tomcat
 instance.
 
 Thank you
 
You might want to take a look at the JOSSO project: http://www.josso.org/

I have not used JOSSO myself (yet), and I'm not sure whether you will be able to
use it without modifying your webapps (maybe with some custom valves, depending
on how your applications perform authentication), but it should be worth a try.

 Edmund


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Ben Souther
It depends on which operating system you're using and how you've
installed Tomcat.
Can you tell us which it is?



On Wed, 2007-08-22 at 07:19, Karel V Sedlacek wrote:
 Thanks for this info,...
 
 How do I implement this tip?
 
 #18. Use the -server JVM option. This enables the server JVM, which JIT
 compiles bytecode much earlier, and with stronger optimizations. Startup
 and first calls will be slower due to JIT compilation taking more time,
 but subsequent ones will be faster.
 
 Karel
 
  In putting #1 into the JAVA_OPTS (which it appears that is the
  CATALINA_OPTS
  for our implementation), it doesn't appear to work, as Tomcat doesn't
  restart.  It could be our version -- which is currently 5.0.30.  please
  let
  me know if there are other steps we need to take here as well.
 
  thanks,
  Kim :-)
 
  On 8/21/07, Shane Witbeck [EMAIL PROTECTED] wrote:
 
  I thought my latest blog post would be of interest to the people on this
  list:
 
 
  http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBCRealm + Expired Passwords

2007-08-22 Thread Stephen More
In looking at the docs:
http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html
there is no Attribute for userCredExpireCol. How do I configure the
JDBCRealm to look at an expiration column ?


-Steve

On 8/22/07, Peter Stavrinides [EMAIL PROTECTED] wrote:
 I also didn't understand exactly what you mean, but 'JDBCRealm'... implies 
 using a database, so the simple way is to redirect and use a web form to 
 change it, which is easy enough. If you don't want to use a web form then its 
 an entirely different story, I assume some sort of extension or customization 
 to Tomcat is required.

 Peter

 Christopher Schultz wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Stephen,
 
  Stephen More wrote:
 
  Has anyone written or know of a JDBCRealm that supports an expired 
  password ?
 
 
  Can you phrase that in a different way? I wouldn't want my JDBCRealm to
  allow expired passwords to be used.
 
  Do you mean that you want expired-password-users to be forced to change
  their password before doing anything else?
 
  - -chris
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.4.7 (MingW32)
  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
  iD8DBQFGyzw79CaO5/Lv0PARAmHNAKClt64b23+I7sH00qjLDGffNkbY/wCgniR1
  99vbSIqBOgDuLkLX7D8V4ys=
  =QI3O
  -END PGP SIGNATURE-
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Leon Rosenberg
as far as i know this option is outdated, hence the vm automatically
goes into server mode if it detects a server class machine (=2GB RAM,
2 processors (which also includes ht or dualcore)

leon

maybe wrong though

On 8/22/07, Ben Souther [EMAIL PROTECTED] wrote:
 It depends on which operating system you're using and how you've
 installed Tomcat.
 Can you tell us which it is?



 On Wed, 2007-08-22 at 07:19, Karel V Sedlacek wrote:
  Thanks for this info,...
 
  How do I implement this tip?
 
  #18. Use the -server JVM option. This enables the server JVM, which JIT
  compiles bytecode much earlier, and with stronger optimizations. Startup
  and first calls will be slower due to JIT compilation taking more time,
  but subsequent ones will be faster.
 
  Karel
 
   In putting #1 into the JAVA_OPTS (which it appears that is the
   CATALINA_OPTS
   for our implementation), it doesn't appear to work, as Tomcat doesn't
   restart.  It could be our version -- which is currently 5.0.30.  please
   let
   me know if there are other steps we need to take here as well.
  
   thanks,
   Kim :-)
  
   On 8/21/07, Shane Witbeck [EMAIL PROTECTED] wrote:
  
   I thought my latest blog post would be of interest to the people on this
   list:
  
  
   http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
  
   -
   To start a new topic, e-mail: users@tomcat.apache.org
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Delete Tomcat logs

2007-08-22 Thread Ronald Klop

On Wed Aug 22 10:58:13 CEST 2007 Tomcat Users List users@tomcat.apache.org 
wrote:

Do you know some Windows script to delete Tomcat logs after 5 days?

Thanks a lot

Windows has a scheduler. Put 'DEL c:\Tomcat\logs\*.*' in it every 5 days.

Ronald.


RES: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Milanez, Marcus

If you are running tomcat under windows services, you can select which
JVM you want to use through bin/tomcatXw.exe. 

-Mensagem original-
De: Karel V Sedlacek [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 22 de agosto de 2007 08:19
Para: Tomcat Users List
Assunto: Re: 20 Tips for Using Tomcat in Production

Thanks for this info,...

How do I implement this tip?

#18. Use the -server JVM option. This enables the server JVM, which JIT
compiles bytecode much earlier, and with stronger optimizations. Startup
and first calls will be slower due to JIT compilation taking more time,
but subsequent ones will be faster.

Karel

 In putting #1 into the JAVA_OPTS (which it appears that is the 
 CATALINA_OPTS for our implementation), it doesn't appear to work, as 
 Tomcat doesn't restart.  It could be our version -- which is currently

 5.0.30.  please let me know if there are other steps we need to take 
 here as well.

 thanks,
 Kim :-)

 On 8/21/07, Shane Witbeck [EMAIL PROTECTED] wrote:

 I thought my latest blog post would be of interest to the people on 
 this
 list:


 http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-
 production/

 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,

 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Delete Tomcat logs

2007-08-22 Thread David Smith
AFAIK, this won't work on Windows unless you stop tomcat before and 
restart tomcat after.  Windows keeps the log file open and will do 
strange things if you take the file out from underneath it.  I believe 
log4j has options to support what the OP wants through log rotation.


--David

Ronald Klop wrote:

On Wed Aug 22 10:58:13 CEST 2007 Tomcat Users List 
users@tomcat.apache.org wrote:



Do you know some Windows script to delete Tomcat logs after 5 days?

Thanks a lot


Windows has a scheduler. Put 'DEL c:\Tomcat\logs\*.*' in it every 5 days.

Ronald.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBCRealm + Expired Passwords

2007-08-22 Thread Peter Stavrinides

Hi Steven

You are limited as to what logic the realm performs automatically, 
checking for expired passwords requires some manual work on your side. 
You might want to look at implementing a JAASRealm, and your own login 
module:


See the bottom of this page:
http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JDBCRealm
And:
http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/JAASLMDevGuide.html

For authentication you could duplicate the table structure in the 
JDBCRealm example, but add columns or another table to store a timestamp 
for when the user last changed/created their password.


Then In your login module compare that field to the current time. If the 
login is valid but fails because of expiry, then redirect to a change 
password page, otherwise authenticate or deny accordingly.


Kind regards
Peter
Stephen More wrote:

In looking at the docs:
http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html
there is no Attribute for userCredExpireCol. How do I configure the
JDBCRealm to look at an expiration column ?


-Steve

On 8/22/07, Peter Stavrinides [EMAIL PROTECTED] wrote:
  

I also didn't understand exactly what you mean, but 'JDBCRealm'... implies 
using a database, so the simple way is to redirect and use a web form to change 
it, which is easy enough. If you don't want to use a web form then its an 
entirely different story, I assume some sort of extension or customization to 
Tomcat is required.

Peter

Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stephen,

Stephen More wrote:

  

Has anyone written or know of a JDBCRealm that supports an expired password ?



Can you phrase that in a different way? I wouldn't want my JDBCRealm to
allow expired passwords to be used.

Do you mean that you want expired-password-users to be forced to change
their password before doing anything else?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGyzw79CaO5/Lv0PARAmHNAKClt64b23+I7sH00qjLDGffNkbY/wCgniR1
99vbSIqBOgDuLkLX7D8V4ys=
=QI3O
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  




Re: Delete Tomcat logs

2007-08-22 Thread Peter Stavrinides

You might want to truncate, 'not delete', instead.

David Smith wrote:
AFAIK, this won't work on Windows unless you stop tomcat before and 
restart tomcat after.  Windows keeps the log file open and will do 
strange things if you take the file out from underneath it.  I believe 
log4j has options to support what the OP wants through log rotation.


--David

Ronald Klop wrote:

On Wed Aug 22 10:58:13 CEST 2007 Tomcat Users List 
users@tomcat.apache.org wrote:



Do you know some Windows script to delete Tomcat logs after 5 days?

Thanks a lot


Windows has a scheduler. Put 'DEL c:\Tomcat\logs\*.*' in it every 5 
days.


Ronald.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



wierd performance in tomcat/java: help consult

2007-08-22 Thread dr_pompeii

hello

after to test my project in tomcat 5.5.23 and jdk 5 update 12
in network(intranet-only until now with 2 clients) i see that this is fast,
after of a some time i can see a wonderful exception
related with java heap exception thrown by the tomcat

after to search in google, i found the solution for windows
(server works with windows XP SP2) related to give some values
for memory ram values to the tomcat5w.exe

http://computerlabsolutions.com/supp...hp#performance
i only did the second step

according to this
[quote]
Click on the Java tab, and enter 128 in the Initial Memory Pool, and 350 or
400 in the Maximum Memory Pool.Leave the other field blank.
[/quote]
so my values are
128 in the Initial Memory Pool
400mb Maximum Memory Pool

the point is that the server is a intel dual core with 3ghz for each , and
has DDR2 512 MB of ram

ok, its works, the point is that after to restart the server, the system is
fast again,
but then again after of some time the performance go to very slow

if i do ctrl+ alt+ del to see the performance of the pc related with the ram
i taked a picture when start the wierd performance
my ram go to 645MB and swap 46200KB

i thought if i stop to use the system/application(5 minutes), 
i can give the chance to the java or tomcat to get and free
some resources

well not the ram go to 640MB and swap to 45276KB

of course if i shutdown my tomcat
i have now these values
RAM 319MB and swap 44564KB

is normal this?,
i dont think so
some important suggestion/advice by our members??

BTW: i am using pool connections related with the db area 
-- 
View this message in context: 
http://www.nabble.com/wierd-performance-in-tomcat-java%3A-help-consult-tf4311308.html#a12273635
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat on FreeBSD

2007-08-22 Thread Arend P. van der Veen

Ronald Klop wrote:
On Wed Aug 22 04:09:29 CEST 2007 Tomcat Users List 
users@tomcat.apache.org wrote:

Ronald Klop wrote:
 What java version are you running?
  Ronald.
  On Fri Aug 17 16:00:41 CEST 2007 Tomcat Users List  
users@tomcat.apache.org wrote:

 Hi,

 I have installed Tomcat 5.5.23_1 on FreeBSD 6.2. I have used 
Servlets  a lot in the past but have not used ant. I am now trying 
to get this  development environment to work. Following the basic 
portinstall of  Tomcat on FreeBSD I did the following:


 1. sudo cp /usr/local/tomcat5.5/server/lib/catalina-ant.jar  
/usr/local/share/java/apache-ant/lib


 2. Made a sample project

 3. set manager url in build.xml
 property name=manager.url value=http://localhost:8180/manager/

 4. Chnage permissions in tomcat

 cd /usr/local/tomcat5.5]
 sudo chown -R www webapps

 Once this was done I was able to compile the project and install it 
 using:


 ant
 ant install

 I did notice that it created a new directory in webapps with the 
new  application. So far so good. If I try to install it again I get 
an  error stating that it is already installed. Again, so far so good.


 The problem that I have is if I make changes to the project and 
reload  the application using


 ant reload

 I get the following output:
 reload:
 [reload] OK - Reloaded application at context path /hello

 This looks ok. However, when I run it, the changes to the project 
do  not show up. If I look into the directory under webapps, the 
changes  have not been moved over. I have to manually copy the 
contents from my  build to webapps under tomcat.


 What I am doing wrong. I am sure that it is someting simple but do 
not  seem to figure it out.


 Thanks,
 Arend

 Hi,

I am using diablo-jdk-1.5.0.07.01_6

Thanks,
Arend


Ok, that works for me. So should work for you. You talk about copying 
your content from the build to the webapps directory. Why don't you 
place your build directory in the webapp directory, so building will 
place the files on the rights location and than reloading is enough.


Ronald.


Hi,

Thanks for the feedback.  I see your point and now understand how reload 
works.  I think my real problem is with install.  Consider the following 
documentation from web.xml:


The install target tells the specified Tomcat 5 installation to 
dynamically install this web application and make it available for 
execution.  It does *not* cause the existence of this web application to 
be remembered across Tomcat restarts; if you restart the server, you 
will need to re-install all this web application.


From the documentation I thought that install should tell tomcat to 
temporarily load the application stored in build.home.  Instead, what 
happens is ant install copies it to the webapps directory.  This is 
permanent.


To demonstrate this consider the following:

# ls /usr/local/tomcat5.5/webapps/
ROOTjsp-examplestomcat-docs
balancerservlets-examples   webdav

# ant install
Buildfile: build.xml

prepare:

compile:

install:
   [deploy] OK - Deployed application at context path /hello

BUILD SUCCESSFUL
Total time: 2 seconds

# ls /usr/local/tomcat5.5/webapps/
ROOTjsp-exampleswebdav
balancerservlets-examples
hello   tomcat-docs

# ant list
Buildfile: build.xml

list:
 [list] OK - Listed applications for virtual host localhost
 [list] /webdav:running:0:webdav
 [list] /servlets-examples:running:0:servlets-examples
 [list] /jsp-examples:running:0:jsp-examples
 [list] /balancer:running:0:balancer
 [list] 
/host-manager:running:0:/usr/local/tomcat5.5/server/webapps/host-manager

 [list] /tomcat-docs:running:0:tomcat-docs
 [list] /hello:running:0:hello
 [list] /:running:0:ROOT
 [list] /manager:running:0:/usr/local/tomcat5.5/server/webapps/manager

BUILD SUCCESSFUL
Total time: 0 seconds

Notice that hello is now copied into my webapps directory and will be 
there permanently.  Since reload only restarts tomcat and does not 
reinstall my application, I understand why new changes are not be loaded.


I would have expected ant install to somehow create a dynamic link 
with what is in ${basedir}/build.  Then when I recompiled my application 
and reloaded tomcat, the new version of the system would run.


I am not sure if there is a configuration parameter in web.xml that is 
effecting the behavior.  I based mine on the copy at:


http://127.0.0.1:8180/tomcat-docs/appdev/build.xml.txt

I only modified what I thought I need to get it to work.

Does install copy the files to your webapp directory also?  Is this 
working the same way for you?


Thanks,
Arend

web.xml






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wierd performance in tomcat/java: help consult

2007-08-22 Thread David Delbecq
Well, i see two performance bottlenecks in your description

1) You gave a max memory to your tomcat jvm that is above what your
server supports. You shouldn't give jvm more memory thant what is really
available without swapping (that is 512M minus all that is used by other
applications in your case). Swapping is a big performance bottlneck.

2) Whatever the memory you give your tomcat application, it seems it eat
more and more of it. Some part of your web application is not releasing
the memory it uses. See http://tomcat.apache.org/faq/memory.html for
more informations.


En l'instant précis du 22/08/07 14:37, dr_pompeii s'exprimait en ces
termes:
 hello

 after to test my project in tomcat 5.5.23 and jdk 5 update 12
 in network(intranet-only until now with 2 clients) i see that this is fast,
 after of a some time i can see a wonderful exception
 related with java heap exception thrown by the tomcat

 after to search in google, i found the solution for windows
 (server works with windows XP SP2) related to give some values
 for memory ram values to the tomcat5w.exe

 http://computerlabsolutions.com/supp...hp#performance
 i only did the second step

 according to this
 [quote]
 Click on the Java tab, and enter 128 in the Initial Memory Pool, and 350 or
 400 in the Maximum Memory Pool.Leave the other field blank.
 [/quote]
 so my values are
 128 in the Initial Memory Pool
 400mb Maximum Memory Pool

 the point is that the server is a intel dual core with 3ghz for each , and
 has DDR2 512 MB of ram

 ok, its works, the point is that after to restart the server, the system is
 fast again,
 but then again after of some time the performance go to very slow

 if i do ctrl+ alt+ del to see the performance of the pc related with the ram
 i taked a picture when start the wierd performance
 my ram go to 645MB and swap 46200KB

 i thought if i stop to use the system/application(5 minutes), 
 i can give the chance to the java or tomcat to get and free
 some resources

 well not the ram go to 640MB and swap to 45276KB

 of course if i shutdown my tomcat
 i have now these values
 RAM 319MB and swap 44564KB

 is normal this?,
 i dont think so
 some important suggestion/advice by our members??

 BTW: i am using pool connections related with the db area 
   


-- 
http://www.noooxml.org/


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



URL mangling

2007-08-22 Thread Hehl, Thomas
I have two ways of running my webapp. One is your basic webapp where tomcat
answers the responses directly. The second runs security software the
forwards the requests to another tomcat instance. This second version was
mandated by our clients.

 

The second version is brand new to us and I'm now faced with the possibility
of having to update every JSP in our app so that form actions, images,
references to style sheets, etc. all point to a mangled URL that runs
through the security software instead of going at it directly. Relative
paths are of no use in this instance.

 

So now I'm trying to see if there's a way to mangle these urls dynamically
on the security server instead so that I can use the same JSP for
everything. I tried using a filter, but that works ONLY for the actual
request itself. Filters evidently don't see requests for images or
stylesheets, etc.

 

Any ideas? I was wondering if some sort of valve would be useful.

 

Thanks.

 

Thom Hehl
Sr. eJuror Architect

* Office (859) 277-8800 x 144

* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  
ACS, Inc.

Government Solutions

1733 Harrodsburg Road
Lexington, KY 40504-3617

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  or by telephone at 859-277-8800 ext. 144.
Thank you.

 



Re: URL mangling

2007-08-22 Thread Ben Souther
 So now I'm trying to see if there's a way to mangle these urls dynamically
 on the security server instead so that I can use the same JSP for
 everything. I tried using a filter, but that works ONLY for the actual
 request itself. Filters evidently don't see requests for images or
 stylesheets, etc.
 

Filters see whatever their mappings tell them to see.
The url-mapping for filters works the same way as it does for servlets.
What mapping are you using?









-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: URL mangling

2007-08-22 Thread Hehl, Thomas
/*

Shouldn't that get everything? I have a debug at the beginning of doFilter
that prints out the request and I only get the original one, nothing for the
images and stuff.


-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 22, 2007 9:03 AM
To: Tomcat Users List
Subject: Re: URL mangling

 So now I'm trying to see if there's a way to mangle these urls dynamically
 on the security server instead so that I can use the same JSP for
 everything. I tried using a filter, but that works ONLY for the actual
 request itself. Filters evidently don't see requests for images or
 stylesheets, etc.
 

Filters see whatever their mappings tell them to see.
The url-mapping for filters works the same way as it does for servlets.
What mapping are you using?









-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Ronald Klop

See the table in this page. On Windows on i586 java always defaults to client 
runtime. (amd64 or ia-64 are different)
http://java.sun.com/docs/hotspot/gc5.0/ergo5.html

If you can set JAVA_OPTS=-server java starts with it. Print 
System.getProperties() and you can see what runtime is used.

Ronald.

On Wed Aug 22 14:15:27 CEST 2007 Tomcat Users List users@tomcat.apache.org 
wrote:

I am running a 4 core, 8GB, Server 2003 SP1 EE (not R2) machine.
One JRE: 1.5.0_09

Karel

 as far as i know this option is outdated, hence the vm automatically
 goes into server mode if it detects a server class machine (=2GB RAM,
 2 processors (which also includes ht or dualcore)

 leon

 maybe wrong though

 On 8/22/07, Ben Souther [EMAIL PROTECTED] wrote:
 It depends on which operating system you're using and how you've
 installed Tomcat.
 Can you tell us which it is?



 On Wed, 2007-08-22 at 07:19, Karel V Sedlacek wrote:
  Thanks for this info,...
 
  How do I implement this tip?
 
  #18. Use the -server JVM option. This enables the server JVM, which
 JIT
  compiles bytecode much earlier, and with stronger optimizations.
 Startup
  and first calls will be slower due to JIT compilation taking more
 time,
  but subsequent ones will be faster.
 
  Karel
 
   In putting #1 into the JAVA_OPTS (which it appears that is the
   CATALINA_OPTS
   for our implementation), it doesn't appear to work, as Tomcat
 doesn't
   restart. It could be our version -- which is currently 5.0.30.
 please
   let
   me know if there are other steps we need to take here as well.
  
   thanks,
   Kim :-)
  
   On 8/21/07, Shane Witbeck [EMAIL PROTECTED] wrote:
  
   I thought my latest blog post would be of interest to the people on
 this
   list:
  
  
   
http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
  



Running Apache Tomcat and Apache on Win XP

2007-08-22 Thread hano

Hi,

I'm a little confused about Apache Tomcat. When installed (Win XP) do I get
both the Apache HTTP server and the Tomcat?

I needed the Apache HTTP server for some PHP development tests. And did try
to install it on may machine, but it didn't work. Now I realise that I have
Apache Tomcat on the same machine. Perhaps this won't work?

Can I use the Apache Tomcat installation to serve a PHP application, or do I
need to install a separate Apache HTTP server and shold that work when I
have Apache Tomcat installed?

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Running-Apache-Tomcat-and-Apache-on-Win-XP-tf4311573.html#a12274518
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat on FreeBSD

2007-08-22 Thread Ronald Klop

On Wed Aug 22 14:47:04 CEST 2007 Tomcat Users List users@tomcat.apache.org 
wrote:

Ronald Klop wrote:
 On Wed Aug 22 04:09:29 CEST 2007 Tomcat Users List 
 users@tomcat.apache.org wrote:

 Ronald Klop wrote:
  What java version are you running?
   Ronald.
   On Fri Aug 17 16:00:41 CEST 2007 Tomcat Users List  
 users@tomcat.apache.org wrote:

  Hi,
 
  I have installed Tomcat 5.5.23_1 on FreeBSD 6.2. I have used 
 Servlets  a lot in the past but have not used ant. I am now trying 
 to get this  development environment to work. Following the basic 
 portinstall of  Tomcat on FreeBSD I did the following:

 
  1. sudo cp /usr/local/tomcat5.5/server/lib/catalina-ant.jar  
 /usr/local/share/java/apache-ant/lib

 
  2. Made a sample project
 
  3. set manager url in build.xml
  property name=manager.url value=http://localhost:8180/manager/
 
  4. Chnage permissions in tomcat
 
  cd /usr/local/tomcat5.5]
  sudo chown -R www webapps
 
  Once this was done I was able to compile the project and install it 
  using:

 
  ant
  ant install
 
  I did notice that it created a new directory in webapps with the 
 new  application. So far so good. If I try to install it again I get 
 an  error stating that it is already installed. Again, so far so good.

 
  The problem that I have is if I make changes to the project and 
 reload  the application using

 
  ant reload
 
  I get the following output:
  reload:
  [reload] OK - Reloaded application at context path /hello
 
  This looks ok. However, when I run it, the changes to the project 
 do  not show up. If I look into the directory under webapps, the 
 changes  have not been moved over. I have to manually copy the 
 contents from my  build to webapps under tomcat.

 
  What I am doing wrong. I am sure that it is someting simple but do 
 not  seem to figure it out.

 
  Thanks,
  Arend
 
  Hi,

 I am using diablo-jdk-1.5.0.07.01_6

 Thanks,
 Arend


 Ok, that works for me. So should work for you. You talk about copying 
 your content from the build to the webapps directory. Why don't you 
 place your build directory in the webapp directory, so building will 
 place the files on the rights location and than reloading is enough.
 
 Ronald.
 
Hi,


Thanks for the feedback. I see your point and now understand how reload 
works. I think my real problem is with install. Consider the following 
documentation from web.xml:


The install target tells the specified Tomcat 5 installation to 
dynamically install this web application and make it available for 
execution. It does *not* cause the existence of this web application to 
be remembered across Tomcat restarts; if you restart the server, you 
will need to re-install all this web application.


From the documentation I thought that install should tell tomcat to 
temporarily load the application stored in build.home. Instead, what 
happens is ant install copies it to the webapps directory. This is 
permanent.


To demonstrate this consider the following:

# ls /usr/local/tomcat5.5/webapps/
ROOT jsp-examples tomcat-docs
balancer servlets-examples webdav

# ant install
Buildfile: build.xml

prepare:

compile:

install:
[deploy] OK - Deployed application at context path /hello

BUILD SUCCESSFUL
Total time: 2 seconds

# ls /usr/local/tomcat5.5/webapps/
ROOT jsp-examples webdav
balancer servlets-examples
hello tomcat-docs

# ant list
Buildfile: build.xml

list:
[list] OK - Listed applications for virtual host localhost
[list] /webdav:running:0:webdav
[list] /servlets-examples:running:0:servlets-examples
[list] /jsp-examples:running:0:jsp-examples
[list] /balancer:running:0:balancer
[list] 
/host-manager:running:0:/usr/local/tomcat5.5/server/webapps/host-manager

[list] /tomcat-docs:running:0:tomcat-docs
[list] /hello:running:0:hello
[list] /:running:0:ROOT
[list] /manager:running:0:/usr/local/tomcat5.5/server/webapps/manager

BUILD SUCCESSFUL
Total time: 0 seconds

Notice that hello is now copied into my webapps directory and will be 
there permanently. Since reload only restarts tomcat and does not 
reinstall my application, I understand why new changes are not be loaded.


I would have expected ant install to somehow create a dynamic link 
with what is in ${basedir}/build. Then when I recompiled my application 
and reloaded tomcat, the new version of the system would run.


I am not sure if there is a configuration parameter in web.xml that is 
effecting the behavior. I based mine on the copy at:


http://127.0.0.1:8180/tomcat-docs/appdev/build.xml.txt

I only modified what I thought I need to get it to work.

Does install copy the files to your webapp directory also? Is this 
working the same way for you?


Thanks,
Arend

web.xml



Hello,

I don't use ant install but only ant reload. My eclipse uses 
web/WEB-INF/classes as build directory so all classes are on the right place 
always.
I think, you first must do ant deinstall before you can do ant install again, 
but I can be very wrong about this.

Ronald.

Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Karel Sedlacek

OK, let me give this a whirl.

Karel

At 09:20 AM 8/22/2007, you wrote:
See the table in this page. On Windows on i586 java always defaults to 
client runtime. (amd64 or ia-64 are different)

http://java.sun.com/docs/hotspot/gc5.0/ergo5.html

If you can set JAVA_OPTS=-server java starts with it. Print 
System.getProperties() and you can see what runtime is used.


Ronald.

On Wed Aug 22 14:15:27 CEST 2007 Tomcat Users List 
users@tomcat.apache.org wrote:

I am running a 4 core, 8GB, Server 2003 SP1 EE (not R2) machine.
One JRE: 1.5.0_09
Karel
 as far as i know this option is outdated, hence the vm automatically
 goes into server mode if it detects a server class machine (=2GB RAM,
 2 processors (which also includes ht or dualcore)

 leon

 maybe wrong though

 On 8/22/07, Ben Souther [EMAIL PROTECTED] wrote:
 It depends on which operating system you're using and how you've
 installed Tomcat.
 Can you tell us which it is?



 On Wed, 2007-08-22 at 07:19, Karel V Sedlacek wrote:
  Thanks for this info,...
 
  How do I implement this tip?
 
  #18. Use the -server JVM option. This enables the server JVM, which
 JIT
  compiles bytecode much earlier, and with stronger optimizations.
 Startup
  and first calls will be slower due to JIT compilation taking more
 time,
  but subsequent ones will be faster.
 
  Karel
 
   In putting #1 into the JAVA_OPTS (which it appears that is the
   CATALINA_OPTS
   for our implementation), it doesn't appear to work, as Tomcat
 doesn't
   restart. It could be our version -- which is currently 5.0.30.
 please
   let
   me know if there are other steps we need to take here as well.
  
   thanks,
   Kim :-)
  
   On 8/21/07, Shane Witbeck [EMAIL PROTECTED] wrote:
  
   I thought my latest blog post would be of interest to the people on
 this
   list:
  
  
   
http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/

  


Karel Sedlacek  [EMAIL PROTECTED]
CIT Data Administration Phn 607-255-7742
Cornell University  Fax 
607-255-1297
Ithaca, NY 14853 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Running Apache Tomcat and Apache on Win XP

2007-08-22 Thread Filip Hanik - Dev Lists

you do need Apache Httpd to serve PHP, Tomcat doesn't do it.
but there is no problem running both httpd and Tomcat on the same machine

Filip

hano wrote:

Hi,

I'm a little confused about Apache Tomcat. When installed (Win XP) do I get
both the Apache HTTP server and the Tomcat?

I needed the Apache HTTP server for some PHP development tests. And did try
to install it on may machine, but it didn't work. Now I realise that I have
Apache Tomcat on the same machine. Perhaps this won't work?

Can I use the Apache Tomcat installation to serve a PHP application, or do I
need to install a separate Apache HTTP server and shold that work when I
have Apache Tomcat installed?

Thanks!
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Caldarale, Charles R
 From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
 Subject: Re: 20 Tips for Using Tomcat in Production
 
 as far as i know this option is outdated, hence the vm automatically
 goes into server mode if it detects a server class machine (=2GB RAM,
 2 processors (which also includes ht or dualcore)

The automatic mode switch based on platform configuration occurs only
when using the standard java launcher.  If running as a Windows service,
the selection of the server or client .dll must be done explicitly in
the service properties.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] 20 Tips for Using Tomcat in Production

2007-08-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Karel,

Karel V Sedlacek wrote:
 I am running a 4 core, 8GB, Server 2003 SP1 EE (not R2) machine.
 One JRE: 1.5.0_09

Oh, it's a Windows machine. Are those ever called servers? ;)

(Just kidding.)

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzETh9CaO5/Lv0PARAkAXAJ9YXVbnB+Q+epFof/Z1LC1eQ4nyVACfZp8H
oyLDlkQgpgyP/8SwZLdOh5g=
=H1v4
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Karel Sedlacek

Thank you, we are running Windows,... will check the Service properties.

At 09:55 AM 8/22/2007, you wrote:

 From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
 Subject: Re: 20 Tips for Using Tomcat in Production

 as far as i know this option is outdated, hence the vm automatically
 goes into server mode if it detects a server class machine (=2GB RAM,
 2 processors (which also includes ht or dualcore)

The automatic mode switch based on platform configuration occurs only
when using the standard java launcher.  If running as a Windows service,
the selection of the server or client .dll must be done explicitly in
the service properties.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Karel Sedlacek  [EMAIL PROTECTED]
CIT Data Administration Phn 607-255-7742
Cornell University  Fax 
607-255-1297
Ithaca, NY 14853 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RES: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Milanez, Marcus

Another tip that could be considered is the use of Tomcat Native
Libraries (http://tomcat.heanet.ie/native/) , what do you think? 

-Mensagem original-
De: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 22 de agosto de 2007 10:56
Para: Tomcat Users List
Assunto: RE: 20 Tips for Using Tomcat in Production

 From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
 Subject: Re: 20 Tips for Using Tomcat in Production
 
 as far as i know this option is outdated, hence the vm automatically 
 goes into server mode if it detects a server class machine (=2GB RAM,
 2 processors (which also includes ht or dualcore)

The automatic mode switch based on platform configuration occurs only
when using the standard java launcher.  If running as a Windows service,
the selection of the server or client .dll must be done explicitly in
the service properties.

 - Chuck

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Single Sign On

2007-08-22 Thread Mark Montague
On Wed, Aug 22, 2007 07:00, Andrew Hole [EMAIL PROTECTED] 
wrote:

Single sign on using valve is interesting, but is it possible use him if I
have different application running in different tomcat instances?

I think that only works with different applications under same tomcat
instance.
  


For enterprise-wide single-sign-on to all web resources, whether 
applications or static content, and with support for a wide variety of 
web servers (including Tomcat, but also Apache HTTPD, Microsoft IIS, and 
others), take a look at any of the following:


cosign - http://weblogin.org/
Pubcookie - http://www.pubcookie.org/
CAS - http://www.ja-sig.org/products/cas/
WebAuth - http://www.stanford.edu/services/webauth/


   Mark Montague
   ITCS Web/Database Production Team
   The University of Michigan
   [EMAIL PROTECTED]




smime.p7s
Description: S/MIME Cryptographic Signature


RE: [OT] 20 Tips for Using Tomcat in Production

2007-08-22 Thread Hehl, Thomas
Oh, it's a Windows machine. Are those ever called servers? ;)

Well, I'm a Unix guy, so that's not what I call them. :)

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 22, 2007 10:15 AM
To: Tomcat Users List
Subject: Re: [OT] 20 Tips for Using Tomcat in Production

* PGP Signed by an unknown key

Karel,

Karel V Sedlacek wrote:
 I am running a 4 core, 8GB, Server 2003 SP1 EE (not R2) machine.
 One JRE: 1.5.0_09

Oh, it's a Windows machine. Are those ever called servers? ;)

(Just kidding.)

-chris

* Unknown Key
* 0xF2EFD0F0(L)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RES: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Karel Sedlacek

Marcus,

I'm not sure I understand...

Karel

At 10:21 AM 8/22/2007, you wrote:


Another tip that could be considered is the use of Tomcat Native
Libraries (http://tomcat.heanet.ie/native/) , what do you think?

-Mensagem original-
De: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Enviada em: quarta-feira, 22 de agosto de 2007 10:56
Para: Tomcat Users List
Assunto: RE: 20 Tips for Using Tomcat in Production

 From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
 Subject: Re: 20 Tips for Using Tomcat in Production

 as far as i know this option is outdated, hence the vm automatically
 goes into server mode if it detects a server class machine (=2GB RAM,
 2 processors (which also includes ht or dualcore)

The automatic mode switch based on platform configuration occurs only
when using the standard java launcher.  If running as a Windows service,
the selection of the server or client .dll must be done explicitly in
the service properties.

 - Chuck

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Karel Sedlacek  [EMAIL PROTECTED]
CIT Data Administration Phn 607-255-7742
Cornell University  Fax 
607-255-1297
Ithaca, NY 14853 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Very Slow Startup with APR

2007-08-22 Thread Jim Jagielski


On Aug 21, 2007, at 11:26 AM, Markus Schönhaber wrote:


Rainer Jung wrote:


There's an addition in tcnative 1.1.10:

http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/ 
src/ssl.c?view=diffrev=524725r1=524724r2=524725
= 
=

--- tomcat/connectors/trunk/jni/native/src/ssl.c (original)
+++ tomcat/connectors/trunk/jni/native/src/ssl.c Sun Apr  1  
22:22:42 2007

@@ -259,7 +259,7 @@
  file = ssl_global_rand_file;

  if (file == NULL)
-file = RAND_file_name(buffer, sizeof(buffer));
+return -1;
  else if ((n = RAND_egd(file))  0) {
  return n;
  }

Didn't check, but that might be the difference, concerning respecting
RANDFILE?


I'm not familiar enough with the tcnative or OpenSSL code to  
understand

the change above just by looking at this snippet. But from Mladen's
comment it seems to me that this would *introduce* respect for  
RANDFILE.

Am I wrong?



Well, the comment doesn't seem to match what the code is doing :)
I'm guessing that the problem the patch was trying to solve was
due to the /dev/random issue itself, so bypassing that
seemed a valid solution...


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RES: RES: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Milanez, Marcus
Hi Karel,

Take a look at http://tomcat.apache.org/tomcat-5.5-doc/apr.html, which
describes native libraries. We started using it sometime ago and we
noticed better response times in or application. 

-Mensagem original-
De: Karel Sedlacek [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 22 de agosto de 2007 11:32
Para: Tomcat Users List
Assunto: Re: RES: 20 Tips for Using Tomcat in Production

Marcus,

I'm not sure I understand...

Karel

At 10:21 AM 8/22/2007, you wrote:

Another tip that could be considered is the use of Tomcat Native 
Libraries (http://tomcat.heanet.ie/native/) , what do you think?

-Mensagem original-
De: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Enviada em: quarta-feira, 22 de agosto de 2007 10:56
Para: Tomcat Users List
Assunto: RE: 20 Tips for Using Tomcat in Production

  From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
  Subject: Re: 20 Tips for Using Tomcat in Production
 
  as far as i know this option is outdated, hence the vm automatically

  goes into server mode if it detects a server class machine (=2GB 
  RAM,
  2 processors (which also includes ht or dualcore)

The automatic mode switch based on platform configuration occurs only 
when using the standard java launcher.  If running as a Windows 
service, the selection of the server or client .dll must be done 
explicitly in the service properties.

  - Chuck

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Karel Sedlacek  [EMAIL PROTECTED]
CIT Data Administration Phn 607-255-7742
Cornell University  Fax 
607-255-1297
Ithaca, NY 14853 



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JDBCRealm + Expired Passwords

2007-08-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stephen,

Stephen More wrote:
 On 8/21/07, Christopher Schultz [EMAIL PROTECTED] wrote:
 Stephen More wrote:
 Has anyone written or know of a JDBCRealm that supports an expired password 
 ?
 Do you mean that you want expired-password-users to be forced to change
 their password before doing anything else?
 
 Yes, this is exactly what I am looking for: I want
 expired-password-users to be forced to change their password before
 doing anything else.
 
 Does such a Realm/project exist ?

I have done something like this using a (relatively) simply filter. It
does several things:

1. Checks to see if the Session exists and has a Principal.
2. Checks to see if the Session contains my User object.
   If not, it loads the User object and performs the real login
   (as opposed to the basic authentication provided by the container).
3. Checks to see what the user's status is.
   If the user is in the must change password state, I send them
   to the change password screen.

There are also checks to allow certain pages (like help pages) to be
accessed even when the password has not been successfully changed, and,
obviously, checks to make sure that we don't get into an endless loop
attempting to serve the change password page.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzEyY9CaO5/Lv0PARAkyjAJ9HXS2JQQs6a+GCwKe1rkSrTSCIcgCgoGPp
ACehLf2N35uzIEksKkONCVc=
=dKpH
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wierd performance in tomcat/java: help consult

2007-08-22 Thread dr_pompeii

hi David

thanks so much for the information

2)Some part of your web application is not releasing the memory it uses.
i dont think so, i am working with Hibernate and jdbcTemplate(when i work
with jasperreports) and i use c3p0
but to clear some doubt, i see this

Also look at JProbe, or OptimizeIt, or other profiling tools.
the first is for J2EE so, it seems this cant help me
and the second is not free

can you suggest me one of your preference? (free of course)

it can detect in which part in my code the resources is not releasing?
i never used before in my live a profile 

now about point 1
if i dont bad remember when i start tomcat i see in the perfomance control
almost 350 in ram used
so the correct value should be 512-350=162 instead of 400 right?

i hope your help

i am doom in this

thanks so much for advanced





David Delbecq-2 wrote:
 
 Well, i see two performance bottlenecks in your description
 
 1) You gave a max memory to your tomcat jvm that is above what your
 server supports. You shouldn't give jvm more memory thant what is really
 available without swapping (that is 512M minus all that is used by other
 applications in your case). Swapping is a big performance bottlneck.
 
 2) Whatever the memory you give your tomcat application, it seems it eat
 more and more of it. Some part of your web application is not releasing
 the memory it uses. See http://tomcat.apache.org/faq/memory.html for
 more informations.
 
 
 En l'instant précis du 22/08/07 14:37, dr_pompeii s'exprimait en ces
 termes:
 hello

 after to test my project in tomcat 5.5.23 and jdk 5 update 12
 in network(intranet-only until now with 2 clients) i see that this is
 fast,
 after of a some time i can see a wonderful exception
 related with java heap exception thrown by the tomcat

 after to search in google, i found the solution for windows
 (server works with windows XP SP2) related to give some values
 for memory ram values to the tomcat5w.exe

 http://computerlabsolutions.com/supp...hp#performance
 i only did the second step

 according to this
 [quote]
 Click on the Java tab, and enter 128 in the Initial Memory Pool, and 350
 or
 400 in the Maximum Memory Pool.Leave the other field blank.
 [/quote]
 so my values are
 128 in the Initial Memory Pool
 400mb Maximum Memory Pool

 the point is that the server is a intel dual core with 3ghz for each ,
 and
 has DDR2 512 MB of ram

 ok, its works, the point is that after to restart the server, the system
 is
 fast again,
 but then again after of some time the performance go to very slow

 if i do ctrl+ alt+ del to see the performance of the pc related with the
 ram
 i taked a picture when start the wierd performance
 my ram go to 645MB and swap 46200KB

 i thought if i stop to use the system/application(5 minutes), 
 i can give the chance to the java or tomcat to get and free
 some resources

 well not the ram go to 640MB and swap to 45276KB

 of course if i shutdown my tomcat
 i have now these values
 RAM 319MB and swap 44564KB

 is normal this?,
 i dont think so
 some important suggestion/advice by our members??

 BTW: i am using pool connections related with the db area 
   
 
 
 -- 
 http://www.noooxml.org/
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/wierd-performance-in-tomcat-java%3A-help-consult-tf4311308.html#a12276431
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wierd performance in tomcat/java: help consult

2007-08-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ash,

dr_pompeii wrote:
 after to test my project in tomcat 5.5.23 and jdk 5 update 12
 in network(intranet-only until now with 2 clients) i see that this is fast,
 after of a some time i can see a wonderful exception
 related with java heap exception thrown by the tomcat

[snip]

 ok, its works, the point is that after to restart the server, the system is
 fast again,
 but then again after of some time the performance go to very slow

This sounds like a memory leak.

 BTW: i am using pool connections related with the db area 

Are you sure that you always close your connections, statements, and
ResultSets in finally blocks (or are using a library that does this)?

This is sometimes the cause of memory leaks.

One thing you can do (if you're getting an OutOfMemoryException, which
it sounds like you are) is set this in your environment:

JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp

This will (at least, on the Sun JVM) give you a heap dump if you get an
OOME. You should be able to look through that to see what types of
objects are taking up all the space. Once you have that information, you
can either make your own guesses or come back to us for some additional
direction.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzE409CaO5/Lv0PARAuiBAJ0QZz7Z4AhLJl6Hcb7I2s3Vt61VRACgiDYG
5etY/5MvSa1Ww6hN1oSB/R4=
=sS9W
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Leon Rosenberg
On 8/22/07, Milanez, Marcus [EMAIL PROTECTED] wrote:

 Another tip that could be considered is the use of Tomcat Native
 Libraries (http://tomcat.heanet.ie/native/) , what do you think?

PLEASE DONT!

Leon



 -Mensagem original-
 De: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Enviada em: quarta-feira, 22 de agosto de 2007 10:56
 Para: Tomcat Users List
 Assunto: RE: 20 Tips for Using Tomcat in Production

  From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
  Subject: Re: 20 Tips for Using Tomcat in Production
 
  as far as i know this option is outdated, hence the vm automatically
  goes into server mode if it detects a server class machine (=2GB RAM,
  2 processors (which also includes ht or dualcore)

 The automatic mode switch based on platform configuration occurs only
 when using the standard java launcher.  If running as a Windows service,
 the selection of the server or client .dll must be done explicitly in
 the service properties.

  - Chuck

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Very Slow Startup with APR

2007-08-22 Thread Markus Schönhaber
Jim Jagielski wrote:

 Well, the comment doesn't seem to match what the code is doing :)

OK, this statement of yours might relativize the impression of dumbness
I have given here a little bit. Or maybe not ;-)

 I'm guessing that the problem the patch was trying to solve was
 due to the /dev/random issue itself, so bypassing that
 seemed a valid solution...

Yes, that matches what Rainer said wrt to this change.

To summarize the situation as I understand it: if someone experiences
the startup delay caused by /dev/random blocking he has (at least) the
following options to speed things up
1. Recompile APR after configuring it using
--with-devrandom=/dev/urandom (or some other non-blocking random source)
- that's what I did.
2. If tcnative  1.1.10 is used, set the environment variable RANDFILE
to point to some random source which can be accessed without danger of
blocking (for example /dev/urandom) or create a static random file in
the home dir of the user Tomcat is run as.
3. Use tcnative 1.1.10.

Regards
  mks


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wierd performance in tomcat/java: help consult

2007-08-22 Thread dr_pompeii

Hello Christopher 
thanks for the reply

This sounds like a memory leak.
it could be, but

Are you sure that you always close your connections, statements, and
ResultSets in finally blocks (or are using a library that does this)?
This is sometimes the cause of memory leaks.
i work with hibernate and spring, so it is manged by them and i use too
JdbcTemplate, so ResultSets
is not used

One thing you can do (if you're getting an OutOfMemoryException, which
it sounds like you are)
i had other type of exception, already resolved in the link that i wrote

no exceptions i have or recieve . 

This will (at least, on the Sun JVM) give you a heap dump if you get an
OOME. You should be able to look through that to see what types of
objects are taking up all the space. Once you have that information, you
can either make your own guesses or come back to us for some additional
direction. 
before to work in production area, i used the thread dump in windows, and of
course i saw the wonderful
problem of resources not closed, already fixed now

more ideas are appreciate

regards


Christopher Schultz-2 wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Ash,
 
 dr_pompeii wrote:
 after to test my project in tomcat 5.5.23 and jdk 5 update 12
 in network(intranet-only until now with 2 clients) i see that this is
 fast,
 after of a some time i can see a wonderful exception
 related with java heap exception thrown by the tomcat
 
 [snip]
 
 ok, its works, the point is that after to restart the server, the system
 is
 fast again,
 but then again after of some time the performance go to very slow
 
 This sounds like a memory leak.
 
 BTW: i am using pool connections related with the db area 
 
 Are you sure that you always close your connections, statements, and
 ResultSets in finally blocks (or are using a library that does this)?
 
 This is sometimes the cause of memory leaks.
 
 One thing you can do (if you're getting an OutOfMemoryException, which
 it sounds like you are) is set this in your environment:
 
 JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp
 
 This will (at least, on the Sun JVM) give you a heap dump if you get an
 OOME. You should be able to look through that to see what types of
 objects are taking up all the space. Once you have that information, you
 can either make your own guesses or come back to us for some additional
 direction.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iD8DBQFGzE409CaO5/Lv0PARAuiBAJ0QZz7Z4AhLJl6Hcb7I2s3Vt61VRACgiDYG
 5etY/5MvSa1Ww6hN1oSB/R4=
 =sS9W
 -END PGP SIGNATURE-
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/wierd-performance-in-tomcat-java%3A-help-consult-tf4311308.html#a12277145
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Very Slow Startup with APR

2007-08-22 Thread Jim Jagielski


On Aug 22, 2007, at 11:32 AM, Markus Schönhaber wrote:

2. If tcnative  1.1.10 is used, set the environment variable RANDFILE
to point to some random source which can be accessed without danger of
blocking (for example /dev/urandom) or create a static random file in
the home dir of the user Tomcat is run as.
3. Use tcnative 1.1.10.



Yeah, although I'm not sure why the behavior was changed
in the 1.1.10 timeframe, since maintaining the old
behavior seemed like a more general result, unless,
of course, the usage of RANDFILE wasn't known:

   RAND_file_name() generates a default path for the random seed  
file. buf
   points to a buffer of size num in which to store the  
filename. The seed
   file is $RANDFILE if that environment variable is set,  
$HOME/.rnd oth-
   erwise. If $HOME is not set either, or num is too small for  
the path

   name, an error occurs.

Of course, this is all based on looking at just the patch file;
I plan on actually looking over the whole ssl.c file to
see if my understanding matches the actual codebase usage :)


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-22 Thread Goldstein, Barry A

I have a script that checks to make sure that Tomcat is listening on the
appropriate port.

#!/bin/bash
...
main() {
...
chktomcat tomcat1
chktomcat tomcat2
  ...
}
...
chktomcat() {
netstat -a | grep $1  /dev/null 21
RC=$?
if (( RC == 0 ))
then
echo Tomcat instance $1 is up. 
else
echo Tomcat instance $1 is down. 
fi
}
...
main
exit 0

I needed to add tomcat1  tomcat2 to the /etc/services file indicating
the ports that they listen on. This script just shows that tomcat is
listening on the network port. 

Thank you,
Barry Goldstein
[EMAIL PROTECTED]

***
The information contained in this message may be privileged and/or confidential 
and protected from disclosure. If the reader of this message is not the 
intended recipient, or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. Note that any views or opinions presented in this message are 
solely those of the author and do not necessarily represent those of Ameren. 
All emails are subject to monitoring and archival. Finally, the recipient 
should check this message and any attachments for the presence of viruses. 
Ameren accepts no liability for any damage caused by any virus transmitted by 
this email. If you have received this in error, please notify the sender 
immediately by replying to the message and deleting the material from any 
computer. Ameren Corporation
***



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Karel Sedlacek

I think I'll stick to the recommendations that I sort of understand...

Thanks
Karel

At 11:22 AM 8/22/2007, you wrote:

On 8/22/07, Milanez, Marcus [EMAIL PROTECTED] wrote:

 Another tip that could be considered is the use of Tomcat Native
 Libraries (http://tomcat.heanet.ie/native/) , what do you think?

PLEASE DONT!


(I won't)


Leon



 -Mensagem original-
 De: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Enviada em: quarta-feira, 22 de agosto de 2007 10:56
 Para: Tomcat Users List
 Assunto: RE: 20 Tips for Using Tomcat in Production

  From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
  Subject: Re: 20 Tips for Using Tomcat in Production
 
  as far as i know this option is outdated, hence the vm automatically
  goes into server mode if it detects a server class machine (=2GB RAM,
  2 processors (which also includes ht or dualcore)

 The automatic mode switch based on platform configuration occurs only
 when using the standard java launcher.  If running as a Windows service,
 the selection of the server or client .dll must be done explicitly in
 the service properties.

  - Chuck

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Karel Sedlacek  [EMAIL PROTECTED]
CIT Data Administration Phn 607-255-7742
Cornell University  Fax 
607-255-1297
Ithaca, NY 14853 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Ashley Hollands
Hi

I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5
to 6.

I use Log4J for all my web application logging and have discovered
that after the upgrade, any exceptions thrown in the web application
are not logged to my web application log, but to the top-level Tomcat
log.

Does anybody know how I can make sure any java.lang.Exceptions
thrown are logged to the web application log? It used to work fine with
the previous versions of Tomcat (4, 5 and 5.5).

My web application log4j.properties file is as follows if that helps:

log4j.rootCategory=ERROR, logfile

log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.DatePattern='.'-MM-dd
log4j.appender.logfile.File=/logs/tomcat/webapp.log
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

Thanks

Ashley



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5 + Red Hat Linux. Exception trying to load keystore

2007-08-22 Thread bajistaman

I followed the instructions from
http://tomcat.apache.org/tomcat-5.0-doc/ssl-howto.html and I have executed
the following:

keytool -genkey -alias tomcat -keyalg RSA

When I run:

keytool -list

I have the tomcat cert:

tomcat, Aug 22, 2007, keyEntry,
Certificate fingerprint (MD5):
E6:59:10:12:C9:49:AF:72:FA:87:9E:0B:E5:4E:7A:BE

But when I start tomcat I get the following Exception

[ERROR] 22/08/2007 08:29:35,704]
[org.apache.tomcat.util.net.jsse.JSSESocketFactory] Exception trying to load
keystore /usr/share/tomcat5/.keystore
java.security.KeyStoreException: JKS
   at java.security.KeyStore.getInstance(libgcj.so.7rh)
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(tomcat-util-5.5.23.jar.so)
   at
org.apache.coyote.http11.Http11BaseProtocol.start(tomcat-http-5.5.23.jar.so)
   at
org.apache.coyote.http11.Http11Protocol.start(tomcat-http-5.5.23.jar.so)
   at org.apache.catalina.connector.Connector.start(catalina-5.5.23.jar.so)
   at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.so)
   at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.so)
   at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.so)
   at java.lang.reflect.Method.invoke(libgcj.so.7rh)
   at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
   at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)

[ERROR] 22/08/2007 08:29:35,710]
[org.apache.coyote.http11.Http11BaseProtocol] Error starting endpoint
java.io.IOException: Exception trying to load keystore
/usr/share/tomcat5/.keystore: JKS
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.getKeyManagers(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(tomcat-util-5.5.23.jar.so)
   at
org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(tomcat-util-5.5.23.jar.so)
   at
org.apache.coyote.http11.Http11BaseProtocol.start(tomcat-http-5.5.23.jar.so)
   at
org.apache.coyote.http11.Http11Protocol.start(tomcat-http-5.5.23.jar.so)
   at org.apache.catalina.connector.Connector.start(catalina-5.5.23.jar.so)
   at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.so)
   at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.so)
   at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.so)
   at java.lang.reflect.Method.invoke(libgcj.so.7rh)
   at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
   at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)

[ERROR] 22/08/2007 08:29:35,715] [org.apache.catalina.startup.Catalina]
Catalina.start: 
LifecycleException:  service.getName(): Catalina;  Protocol handler start
failed: java.io.IOException: Exception trying to load keystore
/usr/share/tomcat5/.keystore: JKS
   at org.apache.catalina.connector.Connector.start(catalina-5.5.23.jar.so)
   at org.apache.catalina.core.StandardService.start(catalina-5.5.23.jar.so)
   at org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.so)
   at org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.so)
   at java.lang.reflect.Method.invoke(libgcj.so.7rh)
   at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
   at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)

Any ideas what could be the problem?

Thanks,

Johann
-- 
View this message in context: 
http://www.nabble.com/Tomcat-5-%2B-Red-Hat-Linux.-Exception-trying-to-load-keystore-tf4312574.html#a12278075
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 + Red Hat Linux. Exception trying to load keystore

2007-08-22 Thread Caldarale, Charles R
 From: bajistaman [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat 5 + Red Hat Linux. Exception trying to load keystore
 
 But when I start tomcat I get the following Exception
 
 [ERROR] 22/08/2007 08:29:35,704]
 [org.apache.tomcat.util.net.jsse.JSSESocketFactory] Exception 
 trying to load
 keystore /usr/share/tomcat5/.keystore
 java.security.KeyStoreException: JKS
at java.security.KeyStore.getInstance(libgcj.so.7rh)

You need to use a real JVM; the GNU one won't hack it.  Get a proper one
from the java.sun.com download area.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RES: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Milanez, Marcus
What's wrong? Problems with native libraries? 

-Mensagem original-
De: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 22 de agosto de 2007 12:23
Para: Tomcat Users List
Assunto: Re: 20 Tips for Using Tomcat in Production

On 8/22/07, Milanez, Marcus [EMAIL PROTECTED] wrote:

 Another tip that could be considered is the use of Tomcat Native 
 Libraries (http://tomcat.heanet.ie/native/) , what do you think?

PLEASE DONT!

Leon



 -Mensagem original-
 De: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Enviada em: quarta-feira, 22 de agosto de 2007 10:56
 Para: Tomcat Users List
 Assunto: RE: 20 Tips for Using Tomcat in Production

  From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
  Subject: Re: 20 Tips for Using Tomcat in Production
 
  as far as i know this option is outdated, hence the vm automatically

  goes into server mode if it detects a server class machine (=2GB 
  RAM,
  2 processors (which also includes ht or dualcore)

 The automatic mode switch based on platform configuration occurs only 
 when using the standard java launcher.  If running as a Windows 
 service, the selection of the server or client .dll must be done 
 explicitly in the service properties.

  - Chuck

 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Filip Hanik - Dev Lists

if you want a global log4j (instead of tomcat's own framework)
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
then you will need to be tomcat-juli.jar and tomcat-juli-adapters.jar
as described in the docs,

let me know if you need more clarification
Filip

Ashley Hollands wrote:

Hi

I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5
to 6.

I use Log4J for all my web application logging and have discovered
that after the upgrade, any exceptions thrown in the web application
are not logged to my web application log, but to the top-level Tomcat
log.

Does anybody know how I can make sure any java.lang.Exceptions
thrown are logged to the web application log? It used to work fine with
the previous versions of Tomcat (4, 5 and 5.5).

My web application log4j.properties file is as follows if that helps:

log4j.rootCategory=ERROR, logfile

log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.DatePattern='.'-MM-dd
log4j.appender.logfile.File=/logs/tomcat/webapp.log
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

Thanks

Ashley



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Caldarale, Charles R
 From: Milanez, Marcus [mailto:[EMAIL PROTECTED] 
 Subject: RES: 20 Tips for Using Tomcat in Production
 
 What's wrong? Problems with native libraries? 

Makes the environment much more complex and is platform-specific,
eliminating one of Tomcat's highly desirable attributes - platform
independence.  If maximum performance is needed, then it's certainly
appropriate, but many (most?) servers are rarely ever saturated.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Very Slow Startup with APR

2007-08-22 Thread Jim Jagielski


On Aug 21, 2007, at 10:02 AM, Rainer Jung wrote:


Followup to self:

There's an addition in tcnative 1.1.10:



Looks like this went through further refactoring in:

http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/ 
src/ssl.c?r1=524725r2=525163


I just checked HEAD on trunk and it *has* RAND_file_name() in there...

static int ssl_rand_load_file(const char *file)
{
char buffer[APR_PATH_MAX];
int n;

if (file == NULL)
file = ssl_global_rand_file;
if (file  (strcmp(file, builtin) == 0))
return -1;
if (file == NULL)
file = RAND_file_name(buffer, sizeof(buffer));
if (file) {
if (strncmp(file, egd:, 4) == 0) {
if ((n = RAND_egd(file + 4))  0)
return n;
else
return -1;
}
if ((n = RAND_load_file(file, -1))  0)
return n;
}
return -1;
}



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 + Red Hat Linux. Exception trying to load keystore

2007-08-22 Thread bajistaman

Thanks, but we are already using the one that we got from sun's web site, any
other clue?

Johann
-- 
View this message in context: 
http://www.nabble.com/Tomcat-5-%2B-Red-Hat-Linux.-Exception-trying-to-load-keystore-tf4312574.html#a12279431
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jsvc.exec error: Cannot find daemon loader

2007-08-22 Thread Ole Ersoy

Hi,

I'm trying to run tomcat with jsvc.  I did all the things in the manual, and 
now I'm trying to run it with:

./bin/jsvc -cp ./bin/bootstrap.jar \
   -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
   org.apache.catalina.startup.Bootstrap

And I get this in catalina.err:

22/08/2007 12:17:31 6772 jsvc.exec error: Cannot find daemon loader 
org/apache/commons/daemon/support/DaemonLoader
22/08/2007 12:17:31 6771 jsvc.exec error: Service exit with a return value of 1

Any ideas how to fix this?

Thanks,
- Ole



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 + Red Hat Linux. Exception trying to load keystore

2007-08-22 Thread Caldarale, Charles R
 From: bajistaman [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat 5 + Red Hat Linux. Exception trying to 
 load keystore
 
 Thanks, but we are already using the one that we got from 
 sun's web site

You might think you are, but the stack trace shows you definitely are
not:

at java.security.KeyStore.getInstance(libgcj.so.7rh)

You need to sort out your PATH, insuring that it leads to the Sun JRE,
not the GNU one.

Also, it looks like the Tomcat you're using is some 3rd-party repackaged
version, rather than a real one from the tomcat.apache.org download
area; these have been know to cause unresolvable problems on many
platforms.  You probably want to replace that as well.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 + Red Hat Linux. Exception trying to load keystore

2007-08-22 Thread bajistaman

You are right, when I look up the services I can see that Tomcat is running
using the JVM that you have told me:
/usr/lib/jvm/java/bin/java -Djava.awt.headless=true
-Dcatalina.ext.dirs=/usr/...

I changed that from the tomcat5.conf file:

# tomcat5 service configuration file

# you could also override JAVA_HOME here
# Where your java installation lives
###JAVA_HOME=/usr/lib/jvm/java
JAVA_HOME=/usr/java/latest

But probably as I'm executing Tomcat as a service the service def should be
the one that is pointing to the wrong JVM. 

Any idea how the change the service def?

Thanks,

Johann


-- 
View this message in context: 
http://www.nabble.com/Tomcat-5-%2B-Red-Hat-Linux.-Exception-trying-to-load-keystore-tf4312574.html#a12279805
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5 + Red Hat Linux. Exception trying to load keystore

2007-08-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Johann,

bajistaman wrote:
 But probably as I'm executing Tomcat as a service the service def should be
 the one that is pointing to the wrong JVM. 
 
 Any idea how the change the service def?

To somewhat reiterate Chuck's comment: you are working with a
nonstandard packaged installation of Tomcat. Tomcat doesn't come with
any service definitions or anything like that. If you have questions
about how to make changes such as that, consult the documentation for
your package manager, or for this specific package as regards your
package manager.

Not many people on the list use packaged versions of Tomcat: we only use
the real thing and will resist answering questions that are
package-manager specific.

If it turns out that you have to do too much fighting with the package
manager to get your work done, you have two choices:

1. Get the real version of Tomcat from tomcat.apache.org and discard
   the package-managed version. (Recommended if you want to get it
   working as fast as possible).

2. Tell your OS vendor nd/or package manager team that their packaging
   of Tomcat sucks, and they need to make it suck less.
   (Recommended if you want to make the world a better place).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzHpa9CaO5/Lv0PARAuXrAKCsa+MKYernvgdeERw5iXL4vA8HiwCdFYXI
6MNfuiwhNtWvJsmbQ6LMmaw=
=R4dT
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Ashley Hollands
Thanks for the reply Filip

 if you want a global log4j (instead of tomcat's own framework)...

I have configured Tomcat to use Log4J at the top-level using
the documentation you recommend no problem, but it doesn't solve
my problem.

What I want is for the Exception to get logged at the web application
level (I'm not bothered whether it also gets logged at the Tomcat level
or not - Using Tomcat 5.5, it used to get logged at the web application
level and not at the Tomcat level at all).

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 18:03
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

if you want a global log4j (instead of tomcat's own framework)
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
then you will need to be tomcat-juli.jar and tomcat-juli-adapters.jar as
described in the docs,

let me know if you need more clarification Filip

Ashley Hollands wrote:
 Hi

 I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5 to 
 6.

 I use Log4J for all my web application logging and have discovered 
 that after the upgrade, any exceptions thrown in the web application 
 are not logged to my web application log, but to the top-level Tomcat 
 log.

 Does anybody know how I can make sure any java.lang.Exceptions thrown 
 are logged to the web application log? It used to work fine with the 
 previous versions of Tomcat (4, 5 and 5.5).

 My web application log4j.properties file is as follows if that helps:

 log4j.rootCategory=ERROR, logfile

 log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.logfile.DatePattern='.'-MM-dd
 log4j.appender.logfile.File=/logs/tomcat/webapp.log
 log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
 log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

 Thanks

 Ashley



 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



   


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Filip Hanik - Dev Lists

Ashley Hollands wrote:

Thanks for the reply Filip

  

if you want a global log4j (instead of tomcat's own framework)...



I have configured Tomcat to use Log4J at the top-level using
the documentation you recommend no problem, but it doesn't solve
my problem.

What I want is for the Exception to get logged at the web application
level (I'm not bothered whether it also gets logged at the Tomcat level
or not - Using Tomcat 5.5, it used to get logged at the web application
level and not at the Tomcat level at all).
  

you want it to go to webapp.log, as you configured below?
and you did build the additional JARs that Tomcat uses and removed the 
usage of Tomcat's own logging.
from your explanation, it doesn't sound like you took these steps, cause 
if you did, tomcat would log into your log4j, and not its own mechanism


Filip

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 18:03

To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

if you want a global log4j (instead of tomcat's own framework)
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
then you will need to be tomcat-juli.jar and tomcat-juli-adapters.jar as
described in the docs,

let me know if you need more clarification Filip

Ashley Hollands wrote:
  

Hi

I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5 to 
6.


I use Log4J for all my web application logging and have discovered 
that after the upgrade, any exceptions thrown in the web application 
are not logged to my web application log, but to the top-level Tomcat 
log.


Does anybody know how I can make sure any java.lang.Exceptions thrown 
are logged to the web application log? It used to work fine with the 
previous versions of Tomcat (4, 5 and 5.5).


My web application log4j.properties file is as follows if that helps:

log4j.rootCategory=ERROR, logfile

log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.DatePattern='.'-MM-dd
log4j.appender.logfile.File=/logs/tomcat/webapp.log
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

Thanks

Ashley



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
e-mail: [EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]



  




-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5 + Red Hat Linux. Exception trying to load keystore

2007-08-22 Thread bajistaman

Ok, I'll keep away from this forum the packaged tomcat questions. When I get
the real one I'll be back.

Thanks,

Johann
-- 
View this message in context: 
http://www.nabble.com/Tomcat-5-%2B-Red-Hat-Linux.-Exception-trying-to-load-keystore-tf4312574.html#a12280051
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Ashley Hollands
I did build the extra JAR files as described in the documentation.

Whether I am using Log4J at the Tomcat level, or using Tomcat's
default logging, I do get log messages in my web app log. For
example if I add the following to my web app log4j.properties:

log4j.logger.com.mycompany=INFO

it logs these messages to the web app log no problem - both with
Log4J and Tomcat's default logging at the top-level.

My problem is that it isn't logging Exceptions even though as I
understand it, it should be logging anything with priority ERROR
or higher (lower?) that is generated by the web app to the
web app log.

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 19:12
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
 Thanks for the reply Filip

   
 if you want a global log4j (instead of tomcat's own framework)...
 

 I have configured Tomcat to use Log4J at the top-level using the 
 documentation you recommend no problem, but it doesn't solve my 
 problem.

 What I want is for the Exception to get logged at the web application 
 level (I'm not bothered whether it also gets logged at the Tomcat 
 level or not - Using Tomcat 5.5, it used to get logged at the web 
 application level and not at the Tomcat level at all).
   
you want it to go to webapp.log, as you configured below?
and you did build the additional JARs that Tomcat uses and removed the usage
of Tomcat's own logging.
from your explanation, it doesn't sound like you took these steps, cause if
you did, tomcat would log into your log4j, and not its own mechanism

Filip
 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 18:03
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 if you want a global log4j (instead of tomcat's own framework) 
 http://tomcat.apache.org/tomcat-6.0-doc/logging.html
 then you will need to be tomcat-juli.jar and tomcat-juli-adapters.jar 
 as described in the docs,

 let me know if you need more clarification Filip

 Ashley Hollands wrote:
   
 Hi

 I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5 to 
 6.

 I use Log4J for all my web application logging and have discovered 
 that after the upgrade, any exceptions thrown in the web application 
 are not logged to my web application log, but to the top-level Tomcat 
 log.

 Does anybody know how I can make sure any java.lang.Exceptions thrown 
 are logged to the web application log? It used to work fine with the 
 previous versions of Tomcat (4, 5 and 5.5).

 My web application log4j.properties file is as follows if that helps:

 log4j.rootCategory=ERROR, logfile

 log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.logfile.DatePattern='.'-MM-dd
 log4j.appender.logfile.File=/logs/tomcat/webapp.log
 log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
 log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

 Thanks

 Ashley



 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



   
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



   


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Delete Tomcat logs

2007-08-22 Thread Vivek Mohan
Is there a way to delete tomcat logs which are older than 5 days?

On 8/22/07, Peter Stavrinides [EMAIL PROTECTED] wrote:
 You might want to truncate, 'not delete', instead.

 David Smith wrote:
  AFAIK, this won't work on Windows unless you stop tomcat before and
  restart tomcat after.  Windows keeps the log file open and will do
  strange things if you take the file out from underneath it.  I believe
  log4j has options to support what the OP wants through log rotation.
 
  --David
 
  Ronald Klop wrote:
 
  On Wed Aug 22 10:58:13 CEST 2007 Tomcat Users List
  users@tomcat.apache.org wrote:
 
  Do you know some Windows script to delete Tomcat logs after 5 days?
 
  Thanks a lot
 
  Windows has a scheduler. Put 'DEL c:\Tomcat\logs\*.*' in it every 5
  days.
 
  Ronald.
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
This is your life and it's ending one minute at a time.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Delete Tomcat logs

2007-08-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Vivek,

Vivek Mohan wrote:
 Is there a way to delete tomcat logs which are older than 5 days?

You could configure Tomcat to use log4j instead of juli and use a
DailyRollingFileAppender -- it will generate a new file every day and
you can simply delete the ones that are several days behind whenever you
want.

(Unfortunately, DailyRollingFileAppender doesn't inherit from
RollingFileAppender which includes a max backup index setting and will
automatically clean up after old log files).

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGzIF19CaO5/Lv0PARAg39AKDCPdqZuNlmqfsZDvVhbwDacsnU1ACdEY82
frNhYK+LhiH/3tkH1zAQZwE=
=DVAL
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Filip Hanik - Dev Lists
it will only log to the webapp.log if your application catches the 
exception, then issues a log.error(msg,exception) (tomcat will do the 
same assuming it was correctly configured)


if you provide a sample war, I can validate it for you

Filip

Ashley Hollands wrote:

I did build the extra JAR files as described in the documentation.

Whether I am using Log4J at the Tomcat level, or using Tomcat's
default logging, I do get log messages in my web app log. For
example if I add the following to my web app log4j.properties:

log4j.logger.com.mycompany=INFO

it logs these messages to the web app log no problem - both with
Log4J and Tomcat's default logging at the top-level.

My problem is that it isn't logging Exceptions even though as I
understand it, it should be logging anything with priority ERROR
or higher (lower?) that is generated by the web app to the
web app log.

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 19:12

To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
  

Thanks for the reply Filip

  


if you want a global log4j (instead of tomcat's own framework)...

  
I have configured Tomcat to use Log4J at the top-level using the 
documentation you recommend no problem, but it doesn't solve my 
problem.


What I want is for the Exception to get logged at the web application 
level (I'm not bothered whether it also gets logged at the Tomcat 
level or not - Using Tomcat 5.5, it used to get logged at the web 
application level and not at the Tomcat level at all).
  


you want it to go to webapp.log, as you configured below?
and you did build the additional JARs that Tomcat uses and removed the usage
of Tomcat's own logging.
from your explanation, it doesn't sound like you took these steps, cause if
you did, tomcat would log into your log4j, and not its own mechanism

Filip
  

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: 22 August 2007 18:03
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

if you want a global log4j (instead of tomcat's own framework) 
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
then you will need to be tomcat-juli.jar and tomcat-juli-adapters.jar 
as described in the docs,


let me know if you need more clarification Filip

Ashley Hollands wrote:
  


Hi

I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5 to 
6.


I use Log4J for all my web application logging and have discovered 
that after the upgrade, any exceptions thrown in the web application 
are not logged to my web application log, but to the top-level Tomcat 
log.


Does anybody know how I can make sure any java.lang.Exceptions thrown 
are logged to the web application log? It used to work fine with the 
previous versions of Tomcat (4, 5 and 5.5).


My web application log4j.properties file is as follows if that helps:

log4j.rootCategory=ERROR, logfile

log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.DatePattern='.'-MM-dd
log4j.appender.logfile.File=/logs/tomcat/webapp.log
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

Thanks

Ashley



-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

  

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
e-mail: [EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]



  




-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Ashley Hollands
What is confusing me is that I never had to catch the exception and
log it from within my application in Tomcat 4, 5 or 5.5 - it just appeared
in the web app log automatically.

Is there no way to configure Log4J/Tomcat 6 to do the same thing without
having to do as you suggest?

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 19:51
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

it will only log to the webapp.log if your application catches the
exception, then issues a log.error(msg,exception) (tomcat will do the same
assuming it was correctly configured)

if you provide a sample war, I can validate it for you

Filip

Ashley Hollands wrote:
 I did build the extra JAR files as described in the documentation.

 Whether I am using Log4J at the Tomcat level, or using Tomcat's 
 default logging, I do get log messages in my web app log. For example 
 if I add the following to my web app log4j.properties:

 log4j.logger.com.mycompany=INFO

 it logs these messages to the web app log no problem - both with Log4J 
 and Tomcat's default logging at the top-level.

 My problem is that it isn't logging Exceptions even though as I 
 understand it, it should be logging anything with priority ERROR or 
 higher (lower?) that is generated by the web app to the web app log.

 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 19:12
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 Ashley Hollands wrote:
   
 Thanks for the reply Filip

   
 
 if you want a global log4j (instead of tomcat's own framework)...
 
   
 I have configured Tomcat to use Log4J at the top-level using the 
 documentation you recommend no problem, but it doesn't solve my 
 problem.

 What I want is for the Exception to get logged at the web application 
 level (I'm not bothered whether it also gets logged at the Tomcat 
 level or not - Using Tomcat 5.5, it used to get logged at the web 
 application level and not at the Tomcat level at all).
   
 
 you want it to go to webapp.log, as you configured below?
 and you did build the additional JARs that Tomcat uses and removed the 
 usage of Tomcat's own logging.
 from your explanation, it doesn't sound like you took these steps, 
 cause if you did, tomcat would log into your log4j, and not its own 
 mechanism

 Filip
   
 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 18:03
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 if you want a global log4j (instead of tomcat's own framework) 
 http://tomcat.apache.org/tomcat-6.0-doc/logging.html
 then you will need to be tomcat-juli.jar and tomcat-juli-adapters.jar 
 as described in the docs,

 let me know if you need more clarification Filip

 Ashley Hollands wrote:
   
 
 Hi

 I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5 to 
 6.

 I use Log4J for all my web application logging and have discovered 
 that after the upgrade, any exceptions thrown in the web application 
 are not logged to my web application log, but to the top-level 
 Tomcat log.

 Does anybody know how I can make sure any java.lang.Exceptions 
 thrown are logged to the web application log? It used to work fine 
 with the previous versions of Tomcat (4, 5 and 5.5).

 My web application log4j.properties file is as follows if that helps:

 log4j.rootCategory=ERROR, logfile

 log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.logfile.DatePattern='.'-MM-dd
 log4j.appender.logfile.File=/logs/tomcat/webapp.log
 log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
 log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

 Thanks

 Ashley



 
 - To start a new topic, e-mail: users@tomcat.apache.org To 
 unsubscribe,
 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



   
 
   
 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



   
 


 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
 e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
 e-mail: [EMAIL PROTECTED]
 For additional 

Re: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Filip Hanik - Dev Lists

Ashley Hollands wrote:

What is confusing me is that I never had to catch the exception and
log it from within my application in Tomcat 4, 5 or 5.5 - it just appeared
in the web app log automatically.

Is there no way to configure Log4J/Tomcat 6 to do the same thing without
having to do as you suggest?
  
it should do it, if you removed tomcat's logging manager and replaced it 
with log4j

so you might have just missed a step

Filip

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 19:51

To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

it will only log to the webapp.log if your application catches the
exception, then issues a log.error(msg,exception) (tomcat will do the same
assuming it was correctly configured)

if you provide a sample war, I can validate it for you

Filip

Ashley Hollands wrote:
  

I did build the extra JAR files as described in the documentation.

Whether I am using Log4J at the Tomcat level, or using Tomcat's 
default logging, I do get log messages in my web app log. For example 
if I add the following to my web app log4j.properties:


log4j.logger.com.mycompany=INFO

it logs these messages to the web app log no problem - both with Log4J 
and Tomcat's default logging at the top-level.


My problem is that it isn't logging Exceptions even though as I 
understand it, it should be logging anything with priority ERROR or 
higher (lower?) that is generated by the web app to the web app log.


Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: 22 August 2007 19:12
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
  


Thanks for the reply Filip

  

  

if you want a global log4j (instead of tomcat's own framework)...

  

I have configured Tomcat to use Log4J at the top-level using the 
documentation you recommend no problem, but it doesn't solve my 
problem.


What I want is for the Exception to get logged at the web application 
level (I'm not bothered whether it also gets logged at the Tomcat 
level or not - Using Tomcat 5.5, it used to get logged at the web 
application level and not at the Tomcat level at all).
  

  

you want it to go to webapp.log, as you configured below?
and you did build the additional JARs that Tomcat uses and removed the 
usage of Tomcat's own logging.
from your explanation, it doesn't sound like you took these steps, 
cause if you did, tomcat would log into your log4j, and not its own 
mechanism


Filip
  


Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: 22 August 2007 18:03
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

if you want a global log4j (instead of tomcat's own framework) 
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
then you will need to be tomcat-juli.jar and tomcat-juli-adapters.jar 
as described in the docs,


let me know if you need more clarification Filip

Ashley Hollands wrote:
  

  

Hi

I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5 to 
6.


I use Log4J for all my web application logging and have discovered 
that after the upgrade, any exceptions thrown in the web application 
are not logged to my web application log, but to the top-level 
Tomcat log.


Does anybody know how I can make sure any java.lang.Exceptions 
thrown are logged to the web application log? It used to work fine 
with the previous versions of Tomcat (4, 5 and 5.5).


My web application log4j.properties file is as follows if that helps:

log4j.rootCategory=ERROR, logfile

log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.DatePattern='.'-MM-dd
log4j.appender.logfile.File=/logs/tomcat/webapp.log
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

Thanks

Ashley




- To start a new topic, e-mail: users@tomcat.apache.org To 
unsubscribe,

e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

  


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

  

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Ashley Hollands
OK - I'll run through the steps from scratch again and see if I have
more joy this time.

By the way, I have been using Tribes in my application and it works
really well. I did have a problem initially as I was sending a class
that did not exist in Tomcat's classpath, only in the web application
and there was no error logged anywhere to report the ClassNotFoundException
- can I suggest that this exception is logged somewhere to help
people develop using Tribes?

Thanks for all your help.

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 20:21
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
 What is confusing me is that I never had to catch the exception and 
 log it from within my application in Tomcat 4, 5 or 5.5 - it just 
 appeared in the web app log automatically.

 Is there no way to configure Log4J/Tomcat 6 to do the same thing 
 without having to do as you suggest?
   
it should do it, if you removed tomcat's logging manager and replaced it
with log4j so you might have just missed a step

Filip
 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 19:51
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 it will only log to the webapp.log if your application catches the 
 exception, then issues a log.error(msg,exception) (tomcat will do 
 the same assuming it was correctly configured)

 if you provide a sample war, I can validate it for you

 Filip

 Ashley Hollands wrote:
   
 I did build the extra JAR files as described in the documentation.

 Whether I am using Log4J at the Tomcat level, or using Tomcat's 
 default logging, I do get log messages in my web app log. For example 
 if I add the following to my web app log4j.properties:

 log4j.logger.com.mycompany=INFO

 it logs these messages to the web app log no problem - both with 
 Log4J and Tomcat's default logging at the top-level.

 My problem is that it isn't logging Exceptions even though as I 
 understand it, it should be logging anything with priority ERROR or 
 higher (lower?) that is generated by the web app to the web app log.

 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 19:12
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 Ashley Hollands wrote:
   
 
 Thanks for the reply Filip

   
 
   
 if you want a global log4j (instead of tomcat's own framework)...
 
   
 
 I have configured Tomcat to use Log4J at the top-level using the 
 documentation you recommend no problem, but it doesn't solve my 
 problem.

 What I want is for the Exception to get logged at the web 
 application level (I'm not bothered whether it also gets logged at 
 the Tomcat level or not - Using Tomcat 5.5, it used to get logged at 
 the web application level and not at the Tomcat level at all).
   
 
   
 you want it to go to webapp.log, as you configured below?
 and you did build the additional JARs that Tomcat uses and removed 
 the usage of Tomcat's own logging.
 from your explanation, it doesn't sound like you took these steps, 
 cause if you did, tomcat would log into your log4j, and not its own 
 mechanism

 Filip
   
 
 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 18:03
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 if you want a global log4j (instead of tomcat's own framework) 
 http://tomcat.apache.org/tomcat-6.0-doc/logging.html
 then you will need to be tomcat-juli.jar and 
 tomcat-juli-adapters.jar as described in the docs,

 let me know if you need more clarification Filip

 Ashley Hollands wrote:
   
 
   
 Hi

 I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5 
 to 6.

 I use Log4J for all my web application logging and have discovered 
 that after the upgrade, any exceptions thrown in the web 
 application are not logged to my web application log, but to the 
 top-level Tomcat log.

 Does anybody know how I can make sure any java.lang.Exceptions 
 thrown are logged to the web application log? It used to work fine 
 with the previous versions of Tomcat (4, 5 and 5.5).

 My web application log4j.properties file is as follows if that helps:

 log4j.rootCategory=ERROR, logfile

 log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
 log4j.appender.logfile.DatePattern='.'-MM-dd
 log4j.appender.logfile.File=/logs/tomcat/webapp.log
 log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
 log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

 Thanks

 Ashley



 ---
 -
 - To start a new topic, e-mail: users@tomcat.apache.org To 
 unsubscribe,
 e-mail: [EMAIL PROTECTED]
 For additional commands, 

Re: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Filip Hanik - Dev Lists

Ashley Hollands wrote:

OK - I'll run through the steps from scratch again and see if I have
more joy this time.
  

let me know how it goes, I can help out more.

By the way, I have been using Tribes in my application and it works
really well. I did have a problem initially as I was sending a class
that did not exist in Tomcat's classpath, only in the web application
and there was no error logged anywhere to report the ClassNotFoundException
- can I suggest that this exception is logged somewhere to help
people develop using Tribes?
  
did you by any chance save the stacktrace or was there none? I thought 
tribes was pretty good about not swallowing any errors. but I would like 
to improve if there is possibility to do so


Filip

Thanks for all your help.

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 20:21

To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
  
What is confusing me is that I never had to catch the exception and 
log it from within my application in Tomcat 4, 5 or 5.5 - it just 
appeared in the web app log automatically.


Is there no way to configure Log4J/Tomcat 6 to do the same thing 
without having to do as you suggest?
  


it should do it, if you removed tomcat's logging manager and replaced it
with log4j so you might have just missed a step

Filip
  

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: 22 August 2007 19:51
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

it will only log to the webapp.log if your application catches the 
exception, then issues a log.error(msg,exception) (tomcat will do 
the same assuming it was correctly configured)


if you provide a sample war, I can validate it for you

Filip

Ashley Hollands wrote:
  


I did build the extra JAR files as described in the documentation.

Whether I am using Log4J at the Tomcat level, or using Tomcat's 
default logging, I do get log messages in my web app log. For example 
if I add the following to my web app log4j.properties:


log4j.logger.com.mycompany=INFO

it logs these messages to the web app log no problem - both with 
Log4J and Tomcat's default logging at the top-level.


My problem is that it isn't logging Exceptions even though as I 
understand it, it should be logging anything with priority ERROR or 
higher (lower?) that is generated by the web app to the web app log.


Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: 22 August 2007 19:12
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
  

  

Thanks for the reply Filip

  

  


if you want a global log4j (instead of tomcat's own framework)...

  

  
I have configured Tomcat to use Log4J at the top-level using the 
documentation you recommend no problem, but it doesn't solve my 
problem.


What I want is for the Exception to get logged at the web 
application level (I'm not bothered whether it also gets logged at 
the Tomcat level or not - Using Tomcat 5.5, it used to get logged at 
the web application level and not at the Tomcat level at all).
  

  


you want it to go to webapp.log, as you configured below?
and you did build the additional JARs that Tomcat uses and removed 
the usage of Tomcat's own logging.
from your explanation, it doesn't sound like you took these steps, 
cause if you did, tomcat would log into your log4j, and not its own 
mechanism


Filip
  

  

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: 22 August 2007 18:03
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

if you want a global log4j (instead of tomcat's own framework) 
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
then you will need to be tomcat-juli.jar and 
tomcat-juli-adapters.jar as described in the docs,


let me know if you need more clarification Filip

Ashley Hollands wrote:
  

  


Hi

I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5 
to 6.


I use Log4J for all my web application logging and have discovered 
that after the upgrade, any exceptions thrown in the web 
application are not logged to my web application log, but to the 
top-level Tomcat log.


Does anybody know how I can make sure any java.lang.Exceptions 
thrown are logged to the web application log? It used to work fine 
with the previous versions of Tomcat (4, 5 and 5.5).


My web application log4j.properties file is as follows if that helps:

log4j.rootCategory=ERROR, logfile

log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.DatePattern='.'-MM-dd
log4j.appender.logfile.File=/logs/tomcat/webapp.log
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout

Re: Running Apache Tomcat and Apache on Win XP

2007-08-22 Thread samk
Download the http server from Apache


In Response To: 


Hi,

I'm a little confused about Apache Tomcat. When installed (Win XP) do I get
both the Apache HTTP server and the Tomcat?

I needed the Apache HTTP server for some PHP development tests. And did try
to install it on may machine, but it didn't work. Now I realise that I have
Apache Tomcat on the same machine. Perhaps this won't work?

Can I use the Apache Tomcat installation to serve a PHP application, or do I
need to install a separate Apache HTTP server and shold that work when I
have Apache Tomcat installed?

Thanks!
-- 
... 
http://www.nabble.com/Running-Apache-Tomcat-and-Apache-on-Win-XP-tf4311573.html#a12274518
Sent from the Tomcat - User mailing list archive at 


-
To start a new topic, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 Sent from Techienuggets Netbeans IDE Forum: 
http://www.techienuggets.com/Detail?tx=3

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Ashley Hollands
There wasn't any trace at all - I added my own logging to tell me
that one server had sent the message, but on the other server
there was no sign of why it wasn't being delivered to the ChannelListener
until I turned on debug logging and then it reported the
ClassNotFoundException, but not at the SEVERE or WARNING level.

Seeing as it is the first time I have used Tribes, it is possible that
I did something wrong - but I don't think so.

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 20:39
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
 OK - I'll run through the steps from scratch again and see if I have 
 more joy this time.
   
let me know how it goes, I can help out more.
 By the way, I have been using Tribes in my application and it works 
 really well. I did have a problem initially as I was sending a class 
 that did not exist in Tomcat's classpath, only in the web application 
 and there was no error logged anywhere to report the 
 ClassNotFoundException
 - can I suggest that this exception is logged somewhere to help people 
 develop using Tribes?
   
did you by any chance save the stacktrace or was there none? I thought
tribes was pretty good about not swallowing any errors. but I would like to
improve if there is possibility to do so

Filip
 Thanks for all your help.

 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 20:21
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 Ashley Hollands wrote:
   
 What is confusing me is that I never had to catch the exception and 
 log it from within my application in Tomcat 4, 5 or 5.5 - it just 
 appeared in the web app log automatically.

 Is there no way to configure Log4J/Tomcat 6 to do the same thing 
 without having to do as you suggest?
   
 
 it should do it, if you removed tomcat's logging manager and replaced 
 it with log4j so you might have just missed a step

 Filip
   
 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 19:51
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 it will only log to the webapp.log if your application catches the 
 exception, then issues a log.error(msg,exception) (tomcat will do 
 the same assuming it was correctly configured)

 if you provide a sample war, I can validate it for you

 Filip

 Ashley Hollands wrote:
   
 
 I did build the extra JAR files as described in the documentation.

 Whether I am using Log4J at the Tomcat level, or using Tomcat's 
 default logging, I do get log messages in my web app log. For 
 example if I add the following to my web app log4j.properties:

 log4j.logger.com.mycompany=INFO

 it logs these messages to the web app log no problem - both with 
 Log4J and Tomcat's default logging at the top-level.

 My problem is that it isn't logging Exceptions even though as I 
 understand it, it should be logging anything with priority ERROR or 
 higher (lower?) that is generated by the web app to the web app log.

 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 19:12
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 Ashley Hollands wrote:
   
 
   
 Thanks for the reply Filip

   
 
   
 
 if you want a global log4j (instead of tomcat's own framework)...
 
   
 
   
 I have configured Tomcat to use Log4J at the top-level using the 
 documentation you recommend no problem, but it doesn't solve my 
 problem.

 What I want is for the Exception to get logged at the web 
 application level (I'm not bothered whether it also gets logged at 
 the Tomcat level or not - Using Tomcat 5.5, it used to get logged 
 at the web application level and not at the Tomcat level at all).
   
 
   
 
 you want it to go to webapp.log, as you configured below?
 and you did build the additional JARs that Tomcat uses and removed 
 the usage of Tomcat's own logging.
 from your explanation, it doesn't sound like you took these steps, 
 cause if you did, tomcat would log into your log4j, and not its own 
 mechanism

 Filip
   
 
   
 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 18:03
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 if you want a global log4j (instead of tomcat's own framework) 
 http://tomcat.apache.org/tomcat-6.0-doc/logging.html
 then you will need to be tomcat-juli.jar and 
 tomcat-juli-adapters.jar as described in the docs,

 let me know if you need more clarification Filip

 Ashley Hollands wrote:
   
 
   
 
 Hi

 I have recently upgraded from Tomcat 5.5 to 6.0 and from Java 1.5 
 to 6.

 I use Log4J for all my web 

Re: JDBCRealm + Expired Passwords

2007-08-22 Thread Stephen More
On 8/22/07, Christopher Schultz [EMAIL PROTECTED] wrote:
 1. Checks to see if the Session exists and has a Principal.
 2. Checks to see if the Session contains my User object.
If not, it loads the User object and performs the real login
(as opposed to the basic authentication provided by the container).
 3. Checks to see what the user's status is.
If the user is in the must change password state, I send them
to the change password screen.

Using the default tomcat realms I see 2 possibilities:

1. use the JDBCRealm and create a SQL view for user_roles. If the user
has an expired password, then a role called expiredPassword should
exist as a row in this view.

2. use the JAASRealm, if the password is expired add the role expiredPassword.

Both of these would require a Filter that checks for the existence of
the role expiredPassword and redirect as needed.

I just find it hard to believe that there is no open-source
project/library to mange users that includes the above functionality.

-Steve

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jsvc.exec error: Cannot find daemon loader

2007-08-22 Thread Markus Schönhaber
Ole Ersoy schrieb:

 I'm trying to run tomcat with jsvc.  I did all the things in the manual, and 
 now I'm trying to run it with:
 
 ./bin/jsvc -cp ./bin/bootstrap.jar \
 -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
 org.apache.catalina.startup.Bootstrap
 
 And I get this in catalina.err:
 
 22/08/2007 12:17:31 6772 jsvc.exec error: Cannot find daemon loader 
 org/apache/commons/daemon/support/DaemonLoader
 22/08/2007 12:17:31 6771 jsvc.exec error: Service exit with a return value of 
 1
 
 Any ideas how to fix this?

Add commons-daemon.jar to the classpath:

./bin/jsvc -cp ./bin/commons-daemon.jar:./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Filip Hanik - Dev Lists

Ashley Hollands wrote:

There wasn't any trace at all - I added my own logging to tell me
that one server had sent the message, but on the other server
there was no sign of why it wasn't being delivered to the ChannelListener
until I turned on debug logging and then it reported the
ClassNotFoundException, but not at the SEVERE or WARNING level.

Seeing as it is the first time I have used Tribes, it is possible that
I did something wrong - but I don't think so.
  

you are right, debug has to be enabled, I'm gonna change that right away.
basically, if you have classes outside of the scope of Tribes 
classloader, you are better off just sending a byte[] and do the 
serialization/deserialization yourself.


Filip

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 20:39

To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
  
OK - I'll run through the steps from scratch again and see if I have 
more joy this time.
  


let me know how it goes, I can help out more.
  
By the way, I have been using Tribes in my application and it works 
really well. I did have a problem initially as I was sending a class 
that did not exist in Tomcat's classpath, only in the web application 
and there was no error logged anywhere to report the 
ClassNotFoundException
- can I suggest that this exception is logged somewhere to help people 
develop using Tribes?
  


did you by any chance save the stacktrace or was there none? I thought
tribes was pretty good about not swallowing any errors. but I would like to
improve if there is possibility to do so

Filip
  

Thanks for all your help.

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: 22 August 2007 20:21
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
  

What is confusing me is that I never had to catch the exception and 
log it from within my application in Tomcat 4, 5 or 5.5 - it just 
appeared in the web app log automatically.


Is there no way to configure Log4J/Tomcat 6 to do the same thing 
without having to do as you suggest?
  

  
it should do it, if you removed tomcat's logging manager and replaced 
it with log4j so you might have just missed a step


Filip
  


Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: 22 August 2007 19:51
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

it will only log to the webapp.log if your application catches the 
exception, then issues a log.error(msg,exception) (tomcat will do 
the same assuming it was correctly configured)


if you provide a sample war, I can validate it for you

Filip

Ashley Hollands wrote:
  

  

I did build the extra JAR files as described in the documentation.

Whether I am using Log4J at the Tomcat level, or using Tomcat's 
default logging, I do get log messages in my web app log. For 
example if I add the following to my web app log4j.properties:


log4j.logger.com.mycompany=INFO

it logs these messages to the web app log no problem - both with 
Log4J and Tomcat's default logging at the top-level.


My problem is that it isn't logging Exceptions even though as I 
understand it, it should be logging anything with priority ERROR or 
higher (lower?) that is generated by the web app to the web app log.


Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: 22 August 2007 19:12
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
  

  


Thanks for the reply Filip

  

  

  

if you want a global log4j (instead of tomcat's own framework)...

  

  

I have configured Tomcat to use Log4J at the top-level using the 
documentation you recommend no problem, but it doesn't solve my 
problem.


What I want is for the Exception to get logged at the web 
application level (I'm not bothered whether it also gets logged at 
the Tomcat level or not - Using Tomcat 5.5, it used to get logged 
at the web application level and not at the Tomcat level at all).
  

  

  

you want it to go to webapp.log, as you configured below?
and you did build the additional JARs that Tomcat uses and removed 
the usage of Tomcat's own logging.
from your explanation, it doesn't sound like you took these steps, 
cause if you did, tomcat would log into your log4j, and not its own 
mechanism


Filip
  

  


Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: 22 August 2007 18:03
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

if you want a global log4j (instead of tomcat's own framework) 
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
then you will need to be 

The Solution

2007-08-22 Thread bajistaman

Well, just as a matter of corollary of the soluction everybody was right
because even if I had the Sun Jvm installed, the red hat tomcat5 service was
getting the JAVA_HOME env entry from the one defined in the file
/etc/sysconfig/tomcat5 and not from /etc/tomcat5/tomcat5.conf, so if you
changed it in the latest is not going to work because the first overrides
the second.

Johann

-- 
View this message in context: 
http://www.nabble.com/Tomcat-5-%2B-Red-Hat-Linux.-Exception-trying-to-load-keystore-tf4312574.html#a12282114
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to specify derby home to the JVM

2007-08-22 Thread Ping Yu
People in the list,
   
  I would like to specify derby home to the JVM so that the JVM can
 pickup the database.I added one line in catalina.bat. I added the last
 line to JAVA_OPTS as shown below:
   
  set JAVA_OPTS=%JAVA_OPTS%
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties
 -Dderby.system.home=C:\Absolute_Path_To_\sql 
   
  but it still doesn't work. Apparentely the JVM is not picking it up.
   
  Any ideas? How to debug it? Thanks a lot!
   
  Ping


   
-
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos  more. 

RE: Logging Problem on Upgrade to Tomcat 6

2007-08-22 Thread Ashley Hollands
 basically, if you have classes outside of the scope of Tribes classloader,
 you are better off just sending a byte[] and do the
serialization/deserialization 

Yes - that is basically how I dealt with it in the end.

By the way, I have followed the Log4J instructions again (they don't say
that
you need to copy commons-logging.jar into $CATALINA_HOME/lib - do you?
I did in any case) but I still have the same problem.

I know that Log4J is working and it logs the exception in the Tomcat log
file
at the ERROR level, but still not in the web app log. Am I right in thinking
that
if the rootCategory is set to ERROR in my web app log4j.properties then
it should be logging all exceptions in the web app log?

Ashley

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: 22 August 2007 21:19
To: Tomcat Users List
Subject: Re: Logging Problem on Upgrade to Tomcat 6

Ashley Hollands wrote:
 There wasn't any trace at all - I added my own logging to tell me that 
 one server had sent the message, but on the other server there was no 
 sign of why it wasn't being delivered to the ChannelListener until I 
 turned on debug logging and then it reported the 
 ClassNotFoundException, but not at the SEVERE or WARNING level.

 Seeing as it is the first time I have used Tribes, it is possible that 
 I did something wrong - but I don't think so.
   
you are right, debug has to be enabled, I'm gonna change that right away.
basically, if you have classes outside of the scope of Tribes classloader,
you are better off just sending a byte[] and do the
serialization/deserialization yourself.

Filip
 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 20:39
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 Ashley Hollands wrote:
   
 OK - I'll run through the steps from scratch again and see if I have 
 more joy this time.
   
 
 let me know how it goes, I can help out more.
   
 By the way, I have been using Tribes in my application and it works 
 really well. I did have a problem initially as I was sending a class 
 that did not exist in Tomcat's classpath, only in the web application 
 and there was no error logged anywhere to report the 
 ClassNotFoundException
 - can I suggest that this exception is logged somewhere to help 
 people develop using Tribes?
   
 
 did you by any chance save the stacktrace or was there none? I thought 
 tribes was pretty good about not swallowing any errors. but I would 
 like to improve if there is possibility to do so

 Filip
   
 Thanks for all your help.

 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 20:21
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 Ashley Hollands wrote:
   
 
 What is confusing me is that I never had to catch the exception and 
 log it from within my application in Tomcat 4, 5 or 5.5 - it just 
 appeared in the web app log automatically.

 Is there no way to configure Log4J/Tomcat 6 to do the same thing 
 without having to do as you suggest?
   
 
   
 it should do it, if you removed tomcat's logging manager and replaced 
 it with log4j so you might have just missed a step

 Filip
   
 
 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 19:51
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 it will only log to the webapp.log if your application catches the 
 exception, then issues a log.error(msg,exception) (tomcat will do 
 the same assuming it was correctly configured)

 if you provide a sample war, I can validate it for you

 Filip

 Ashley Hollands wrote:
   
 
   
 I did build the extra JAR files as described in the documentation.

 Whether I am using Log4J at the Tomcat level, or using Tomcat's 
 default logging, I do get log messages in my web app log. For 
 example if I add the following to my web app log4j.properties:

 log4j.logger.com.mycompany=INFO

 it logs these messages to the web app log no problem - both with 
 Log4J and Tomcat's default logging at the top-level.

 My problem is that it isn't logging Exceptions even though as I 
 understand it, it should be logging anything with priority ERROR or 
 higher (lower?) that is generated by the web app to the web app log.

 Ashley

 -Original Message-
 From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
 Sent: 22 August 2007 19:12
 To: Tomcat Users List
 Subject: Re: Logging Problem on Upgrade to Tomcat 6

 Ashley Hollands wrote:
   
 
   
 
 Thanks for the reply Filip

   
 
   
 
   
 if you want a global log4j (instead of tomcat's own framework)...
 
   
 
   
 
 I have configured Tomcat to use Log4J at the top-level using the 
 documentation you recommend no problem, but it 

Container managed securty

2007-08-22 Thread Ali Ok
Hi,

I use Tomcat's JDBC realm for security. However, I want to use a very
customized login form (like remember me option or javascript based modal
login form). How can I make these work?

I cant access j_security_check servlet directly from a page or from a
servlet.

Is there a method like 'setRemoteUser' ?

If I use 'authenticate' method, then will the 'remoteUser' and roles be set
in container?

How do you implement your own login form? Any example will help...

Thank you all.


RE: URL mangling

2007-08-22 Thread Ben Souther
Yes, it should.
Are you running tomcat behind Apache HTTPD or another web server to
serve up static content?






On Wed, 2007-08-22 at 09:17, Hehl, Thomas wrote:
 /*
 
 Shouldn't that get everything? I have a debug at the beginning of doFilter
 that prints out the request and I only get the original one, nothing for the
 images and stuff.
 
 
 -Original Message-
 From: Ben Souther [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 22, 2007 9:03 AM
 To: Tomcat Users List
 Subject: Re: URL mangling
 
  So now I'm trying to see if there's a way to mangle these urls dynamically
  on the security server instead so that I can use the same JSP for
  everything. I tried using a filter, but that works ONLY for the actual
  request itself. Filters evidently don't see requests for images or
  stylesheets, etc.
  
 
 Filters see whatever their mappings tell them to see.
 The url-mapping for filters works the same way as it does for servlets.
 What mapping are you using?
 
 
 
 
 
 
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jsvc.exec error: Cannot find daemon loader

2007-08-22 Thread Ole Ersoy

Hi Markus,

Thank you for the suggestion.  I tried that as well, but I still get the same 
message.  I think there is something funky going on with Fedora, as described 
here:

http://i-hacker.blogspot.com/2007/01/cannot-find-daemon-loader-issue-with.html

I also tried what they did, but still no love.  I'll keep trying with more and more parameters.  


Cheers,
- Ole



Markus Schönhaber wrote:

Ole Ersoy schrieb:


I'm trying to run tomcat with jsvc.  I did all the things in the manual, and 
now I'm trying to run it with:

./bin/jsvc -cp ./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

And I get this in catalina.err:

22/08/2007 12:17:31 6772 jsvc.exec error: Cannot find daemon loader 
org/apache/commons/daemon/support/DaemonLoader
22/08/2007 12:17:31 6771 jsvc.exec error: Service exit with a return value of 1

Any ideas how to fix this?


Add commons-daemon.jar to the classpath:

./bin/jsvc -cp ./bin/commons-daemon.jar:./bin/bootstrap.jar \
-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



why does mod_jk still try to send the request to a shutdown machine?

2007-08-22 Thread Guofeng Zhang
Hi,

 

I use Apache as the load balancer and configured mod_jk to work in
failover mode. The master and slave run on separate machines. 

 

To test how the failover works, I shut down the master machine, then I
access my application. But it takes about one minute for me to see the
first page. I think the time is used to try to establish the socket
connection.

 

I think I need to configure something that I missed in the
worker.properties so that mod_jk could detect the status of the master
before it sends the request to it.

 

Thanks for your help very much.

 

I use Apache HTTPD 2.2.4, mod_jk 2.2.4, JBoss 4.0.4/Tomcat 5.5.

 

The following the log of mod_jk.

 

[Wed Aug 22 17:24:59 2007][1632:1624] [info] mod_jk.c (2775):
mod_jk/1.2.24 initialized

[Wed Aug 22 17:25:42 2007][1632:6124] [info] jk_connect.c (473): connect
to 192.168.225.195:8009 failed (errno=60)

[Wed Aug 22 17:25:42 2007][1632:6124] [info] jk_ajp_common.c (891):
Failed opening socket to (192.168.225.195:8009) (errno=60)

[Wed Aug 22 17:25:42 2007][1632:6124] [info] jk_ajp_common.c (1311):
(master) error connecting to the backend server (errno=60)

[Wed Aug 22 17:25:42 2007][1632:6124] [info] jk_ajp_common.c (2071):
(master) sending request to tomcat failed,  recoverable operation
attempt=1

 

 

The following is the content of worker.properties.

# Define list of workers that will be used 

# for mapping requests

worker.list=loadbalancer,status 

 

# Define Master

worker.master.host=192.168.225.195

worker.master.port=8009

worker.master.type=ajp13

worker.master.lbfactor=1

worker.master.cachesize=10

worker.master.cache_timeout=600

worker.master.socket_timeout=180

worker.master.recycle_timeout=100

worker.master.prepost_timeout=50

worker.master.recovery_options=0 

 

# Define prefered failover node for master

worker.master.redirect=slave 

 

# Define Slave

worker.slave.host= 192.168.225.116

worker.slave.port=8009

worker.slave.type=ajp13

worker.slave.lbfactor=1

worker.slave.cachesize=10

worker.slave.cache_timeout=600

worker.slave.socket_timeout=180

worker.slave.recycle_timeout=100

worker.slave.prepost_timeout=50

worker.slave.recovery_options=0

 

#Disable slave for all requests except failover

worker.slave.activation=disabled 

 

# Load-balancing behaviour

worker.loadbalancer.type=lb

worker.loadbalancer.balance_workers=master, slave

worker.loadbalancer.sticky_session=1 

 

# Status worker for managing load balancer

worker.status.type=status