Re: Issue with tomcat 6 connector

2011-03-20 Thread Michael Ludwig
Krish schrieb am 19.03.2011 um 17:31 (-0700):

 I am using tomcat 6.0.20. In the frontend i have sun one webserver 7
 using nsapi_redirect-1.2.31 connector.
 
My OS is windows server 2003 32bit.
 
 I am trying to create a connector using the document below.

 http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html

 my tomcat is ssl enabled and my sun one webserver 7 is http.

Unrelated, but why would you need SSL in Tomcat when you're fronting it
with Sun One Webserver?

 here is the configuration in obj.conf. I can get the tomcat base html
 pages. But jsp is not working.

Look at this mapping:

 NameTrans fn=assign-name from=/*.jsp/ name=jknsapi

Are you sure it applies to all JSPs? I'd presume it applies only to JSPs
directly beneatht the document root.

-- 
Michael Ludwig

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issue with tomcat 6 connector

2011-03-20 Thread Krish
Hi Michael,

I can't even access the jsp's under document root as well. Only html's work.


I just followed this documentation. No jsp's work. That is the whole
problem.

Please let me know the correct configuration.

http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html

Regards,
Krish




On Sun, Mar 20, 2011 at 1:43 AM, Michael Ludwig mil...@gmx.de wrote:

 Krish schrieb am 19.03.2011 um 17:31 (-0700):

  I am using tomcat 6.0.20. In the frontend i have sun one webserver 7
  using nsapi_redirect-1.2.31 connector.
 
 My OS is windows server 2003 32bit.
 
  I am trying to create a connector using the document below.
 
  http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html
 
  my tomcat is ssl enabled and my sun one webserver 7 is http.

 Unrelated, but why would you need SSL in Tomcat when you're fronting it
 with Sun One Webserver?

  here is the configuration in obj.conf. I can get the tomcat base html
  pages. But jsp is not working.

 Look at this mapping:

  NameTrans fn=assign-name from=/*.jsp/ name=jknsapi

 Are you sure it applies to all JSPs? I'd presume it applies only to JSPs
 directly beneatht the document root.

 --
 Michael Ludwig

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
Krish


Session timeouts: ignore periodic polling URL?

2011-03-20 Thread sol myr
Hi,

We have a Servelts/JSP application Tomcat6.
Our javascripts issues automatic, periodic polling requests (Ajax and Comet), 
in order to keep the view  up-to-date.
Unfortunately this prevents sessions from timing out...

Is there a way to tell Tomcat that some URL shouldn't affect session timeouts?
Namely if for the last 30 minutes, the browser requested nothing but 
http://server/autoRefresh.do; , then Tomcat should assume the user went away 
from the computer, and kill the session.

Thanks :)



  

Re: How to detect down of tomcat.

2011-03-20 Thread Francis GALIEGUE
On Sun, Mar 20, 2011 at 05:05, Hide hide3...@ob4.aitai.ne.jp wrote:
[...]

 My explanation seems to have been bad.
 I explain it a little more.

 It is a method to output the information of the abnormal termination in
 catalina.log that I want to know.
 Would you teach it if you know some method?


Not really, no. If, for instance, you don't have a minimal security
configuration, you can put in your code, say, System.exit(0), and
Tomcat will die without notice.

The base scripts output the PID of a running Tomcat instance in a
file, what you can do is check for the existence of the PID in this
file. All the code is in catalina.sh already - which makes me wonder
why isn't there a catalina.sh status option while we are at it?

And even though you are running Windows, you should consider using
cygwin. I don't know for PowerShell, what I do know though is that
Unix shell expertise is far more common, and Unix shell is much more
powerful than Windows' batch files anyway.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Installing Tomcat the Brute Force Way?

2011-03-20 Thread André Warnier

Robinson, Eric wrote:
From looking at the server, it would appear that tomcat was 
installed 

using tomcat-6.0.18-0.noarch.rpm.
Now you're in trouble.  The 3rd-party repackaged versions of 
Tomcat typically scatter files all over, and then try to get 
things back together with symlinks.  You're better off doing 
a proper install on the new server.  Had you used a real 
Tomcat, life would be much easier.


 - Chuck



Not necessarily. I did an rpm -qlp on tomcat-6.0.18-0.noarch.rpm. All
the files it installs are in /opt/tomcat



The files, yes.  But it is highly likely that it installs also links from /etc/tomcat, 
/usr/share/tomcat, /usr/lib/tomcat, /var/lib/tomcat and so on.

At least, that is what most Linux packages that I know are doing.

To take a top-down view, you generally have two major choices :

A) you download and install the real tomcat from tomcat.apache.org.  That one installs 
everything below one top directory.  It is easy to install, copy, update, etc..

* on its own *.
If your purpose is mainly Tomcat-centric (e.g. you want to test Tomcat or develop for 
Tomcat, you have only this one server where you need to take care of it etc..), then that 
is probably the easiest solution.
It is also easier to get support on this list, because with that one, everyone knows where 
to look for the files.

And, that is also the right one to use of you want the very latest version 
available.

OR

B) you go with whatever package manager system is used by the target server, and use 
whatever best version they've got.
As Chuck says, these packages have a tendency to spread files and links all over, if you 
look at it from a purely Tomcat point of view.  But if you have to manage a bunch of 
servers, and Tomcat is only one little part in what you have to manage, and/or you need 
Tomcat to interact with other software packages which need to be of compatible versions 
etc.., then packages are definitely easier.
I personally find it rather sweet to be able, on a new Debian Linux system fresh out of 
the box :

- apt-get install sun-jdk6
- apt-get install apache2
- apt-get installl tomcat6
- apt-get install apache2-mod-jk
(more or less)
and have it all just work, and have it all put its startup scripts where (as a sysadmin) 
you expect (/etc/init.d), its logfiles where you expect them (/var/log/apache2 and 
/var/log/tomcat6) (and they get rotated too), its configuration files where you expect 
them (/etc/apache2 and /etc/tomcat6), and so on.
It gets a little bit more puzzling when it comes time to figure out where (or if) it has 
installed the demo webapps though, or where exactly to find Tomcat's startup.sh, and 
whether the system is using it or not..


But you have a choice, and that's the nice part.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hook into Tomcat before web applications load

2011-03-20 Thread Felix Schumacher
Am Samstag, den 19.03.2011, 19:26 -0400 schrieb Pulkit Singhal:
 Hello,
 
 Is there a hook exposed in tomcat such that a custom class can be
 introduced to do some work at a point where we have a list of the
 docBase attribute for all the web applications that will be hosted by
 this tomcat instance ... while one of the web application specific
 handling has begun yet?
 
 I 'm asking this for any tomcat version, starting with 5.x, 6.x or 7.x
 ... I don't care.
 
 The motivation behind this question is a bit wordy so I don't want to
 take everyone off topic by posting it here ... but if you are
 interested in reading you can refer to this link:
 http://pulkitsinghal.blogspot.com/2011/03/idea-day-scan-for-shared-webapp.html
There may be such a hook, but I don't think it would be a good idea to
use it for your usecase.

There are reasons why the web-app class loader and commons loader are
not the same. Only the developer can really decide if jar's can be
shared.

Take for example log4j. You will find it in many web-apps, but if you
try to put it into your common class loader, it will only be initialized
by the first web-app. The other web-apps will be able to use it, though.
But you will get strange results.

Any globally shared ressource, such as static variables or Singletons
will get you in trouble.

So: Don't do it.

Regards
 Felix
 
 Thanks!
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier
Or write the script in perl.  That way, it will be portable between Unix/Linux/Windows and 
basically whatever.


Darryl Lewis wrote:

You could write something similar using windows powershell. Do you have that 
installed on your server?


On 20/03/11 2:14 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

Hi, Darryl.

Thanks for your advice.

Your script looks like very useful.
But in my case, tomcat is running on Microsoft Windows.
I am looking for a method to detect the down of tomcat by log file.


- Original Message -
From: Darryl Lewis darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:00 PM
Subject: Re: How to detect down of tomcat.


Put this in a cronjob to fire every minute

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
  then
  subject=`tomcat down; date`
  address=m...@domain.com
  ps -efatt.txt
  mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


Fill in the address with your email address, and you can also pipe an attachment

For myself, I have scripts that detects when the service is down, sends me an 
email, then tries to restart it, then will email
if it has managed to recover it. If it can't restart it after 5 minutes, then I 
get an SMS.
In the morning, I can quickly see if it failed overnight, and my beauty rest 
only gets disturbed in the really bad cases.

On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a log 
file?

If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service is good.

The motive that wants to know such a thing is because I want to detect down of 
tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of tomcat 
automatically.

Thanks for your advice.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier
The basic problem with abnormal termination, is that whatever you may think of, may not 
be called, if the termination is really abnormal.


And also : define abnormal.

Hide wrote:

Hi, Darryl.

Thanks for your advice.

My explanation seems to have been bad.
I explain it a little more.

It is a method to output the information of the abnormal termination in 
catalina.log that I want to know.

Would you teach it if you know some method?

Thank you.

- Original Message - From: Darryl Lewis 
darryl.le...@unsw.edu.au

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:17 PM
Subject: Re: How to detect down of tomcat.


You could write something similar using windows powershell. Do you have 
that installed on your server?



On 20/03/11 2:14 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

Hi, Darryl.

Thanks for your advice.

Your script looks like very useful.
But in my case, tomcat is running on Microsoft Windows.
I am looking for a method to detect the down of tomcat by log file.


- Original Message -
From: Darryl Lewis darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:00 PM
Subject: Re: How to detect down of tomcat.


Put this in a cronjob to fire every minute

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
 then
 subject=`tomcat down; date`
 address=m...@domain.com
 ps -efatt.txt
 mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


Fill in the address with your email address, and you can also pipe an 
attachment


For myself, I have scripts that detects when the service is down, sends 
me an email, then tries to restart it, then will email
if it has managed to recover it. If it can't restart it after 5 minutes, 
then I get an SMS.
In the morning, I can quickly see if it failed overnight, and my beauty 
rest only gets disturbed in the really bad cases.


On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a 
log file?


If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service 
is good.


The motive that wants to know such a thing is because I want to detect 
down of tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of 
tomcat automatically.


Thanks for your advice.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issue with tomcat 6 connector

2011-03-20 Thread André Warnier
Probably in some way, the same ever recurring issue of allowing Apache to bypass Tomcat 
and get to the JSP pages directly.




Krish wrote:

Hi Michael,

I can't even access the jsp's under document root as well. Only html's work.


I just followed this documentation. No jsp's work. That is the whole
problem.

Please let me know the correct configuration.

http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html

Regards,
Krish




On Sun, Mar 20, 2011 at 1:43 AM, Michael Ludwig mil...@gmx.de wrote:


Krish schrieb am 19.03.2011 um 17:31 (-0700):


I am using tomcat 6.0.20. In the frontend i have sun one webserver 7
using nsapi_redirect-1.2.31 connector.

   My OS is windows server 2003 32bit.

I am trying to create a connector using the document below.

http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html

my tomcat is ssl enabled and my sun one webserver 7 is http.

Unrelated, but why would you need SSL in Tomcat when you're fronting it
with Sun One Webserver?


here is the configuration in obj.conf. I can get the tomcat base html
pages. But jsp is not working.

Look at this mapping:


NameTrans fn=assign-name from=/*.jsp/ name=jknsapi

Are you sure it applies to all JSPs? I'd presume it applies only to JSPs
directly beneatht the document root.

--
Michael Ludwig

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org








-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Session timeouts: ignore periodic polling URL?

2011-03-20 Thread André Warnier

sol myr wrote:

Hi,

We have a Servelts/JSP application Tomcat6.
Our javascripts issues automatic, periodic polling requests (Ajax and Comet), 
in order to keep the view  up-to-date.
Unfortunately this prevents sessions from timing out...

Is there a way to tell Tomcat that some URL shouldn't affect session timeouts?
Namely if for the last 30 minutes, the browser requested nothing but 
http://server/autoRefresh.do; , then Tomcat should assume the user went away 
from the computer, and kill the session.

You may have to explain the logic of this a bit better, because on the face of it, it 
makes no sense.
Presumably, if you create a session, it is because the application needs a session (aka, 
needs some information to be preserved between individual requests of the same user/browser).

Then why would you want it to time out ?
And if you don't need a session, then why do you create one ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to detect down of tomcat.

2011-03-20 Thread Darryl Lewis
The other problem will be that tomcat is running, but the application is not 
responding. There may be nothing in the logs for this, and this is one of my 
most common issues.
In this case, I use some custom scripts to simulate a log in and check for an 
expected string in the return.


On 20/03/11 10:11 PM, André Warnier a...@ice-sa.com wrote:

The basic problem with abnormal termination, is that whatever you may think 
of, may not
be called, if the termination is really abnormal.

And also : define abnormal.

Hide wrote:
 Hi, Darryl.

 Thanks for your advice.

 My explanation seems to have been bad.
 I explain it a little more.

 It is a method to output the information of the abnormal termination in
 catalina.log that I want to know.
 Would you teach it if you know some method?

 Thank you.

 - Original Message - From: Darryl Lewis
 darryl.le...@unsw.edu.au
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Sunday, March 20, 2011 12:17 PM
 Subject: Re: How to detect down of tomcat.


 You could write something similar using windows powershell. Do you have
 that installed on your server?


 On 20/03/11 2:14 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

 Hi, Darryl.

 Thanks for your advice.

 Your script looks like very useful.
 But in my case, tomcat is running on Microsoft Windows.
 I am looking for a method to detect the down of tomcat by log file.


 - Original Message -
 From: Darryl Lewis darryl.le...@unsw.edu.au
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Sunday, March 20, 2011 12:00 PM
 Subject: Re: How to detect down of tomcat.


 Put this in a cronjob to fire every minute

 #!/bin/sh
 if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
  then
  subject=`tomcat down; date`
  address=m...@domain.com
  ps -efatt.txt
  mail -s $subject $addr -- -fno-reply@yourdomain att.txt
 fi


 Fill in the address with your email address, and you can also pipe an
 attachment

 For myself, I have scripts that detects when the service is down, sends
 me an email, then tries to restart it, then will email
 if it has managed to recover it. If it can't restart it after 5 minutes,
 then I get an SMS.
 In the morning, I can quickly see if it failed overnight, and my beauty
 rest only gets disturbed in the really bad cases.

 On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

 How to detect down of tomcat.

 Helo.

 My environment is tomcat7, java1.6, windows.

 When process of tomcat terminated abnormally,
 is there any method or setting that output the abnormal termination to a
 log file?

 If there is it, please let me know.

 tomcat is the premise that is not service of windows, but even service
 is good.

 The motive that wants to know such a thing is because I want to detect
 down of tomcat in  automatically without human operation.
 I set a file and keyword in a log monitor tool, and it  detects down of
 tomcat automatically.

 Thanks for your advice.


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier

Right.
And many other things like that.

Hide,
you may save yourself a lot of time (now and in the future), by having a look at something 
like Nagios : http://www.nagios.org/
Otherwise, there is a big chance that you will spend a lot of time re-inventing what a lot 
of people have already done before you.



Darryl Lewis wrote:

The other problem will be that tomcat is running, but the application is not 
responding. There may be nothing in the logs for this, and this is one of my 
most common issues.
In this case, I use some custom scripts to simulate a log in and check for an 
expected string in the return.


On 20/03/11 10:11 PM, André Warnier a...@ice-sa.com wrote:

The basic problem with abnormal termination, is that whatever you may think 
of, may not
be called, if the termination is really abnormal.

And also : define abnormal.

Hide wrote:

Hi, Darryl.

Thanks for your advice.

My explanation seems to have been bad.
I explain it a little more.

It is a method to output the information of the abnormal termination in
catalina.log that I want to know.
Would you teach it if you know some method?

Thank you.

- Original Message - From: Darryl Lewis
darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:17 PM
Subject: Re: How to detect down of tomcat.


You could write something similar using windows powershell. Do you have
that installed on your server?


On 20/03/11 2:14 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

Hi, Darryl.

Thanks for your advice.

Your script looks like very useful.
But in my case, tomcat is running on Microsoft Windows.
I am looking for a method to detect the down of tomcat by log file.


- Original Message -
From: Darryl Lewis darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:00 PM
Subject: Re: How to detect down of tomcat.


Put this in a cronjob to fire every minute

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
 then
 subject=`tomcat down; date`
 address=m...@domain.com
 ps -efatt.txt
 mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


Fill in the address with your email address, and you can also pipe an
attachment

For myself, I have scripts that detects when the service is down, sends
me an email, then tries to restart it, then will email
if it has managed to recover it. If it can't restart it after 5 minutes,
then I get an SMS.
In the morning, I can quickly see if it failed overnight, and my beauty
rest only gets disturbed in the really bad cases.

On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a
log file?

If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service
is good.

The motive that wants to know such a thing is because I want to detect
down of tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of
tomcat automatically.

Thanks for your advice.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to detect down of tomcat.

2011-03-20 Thread Kees Jan Koster
Or you can install http://java-monitor.com It will send you an e-mail or SMS 
when Tomcat dies. Plus graphs for memory and file descriptors etc

Kees Jan

On 20 mrt. 2011, at 12:07, André Warnier a...@ice-sa.com wrote:

 Or write the script in perl.  That way, it will be portable between 
 Unix/Linux/Windows and basically whatever.
 
 Darryl Lewis wrote:
 You could write something similar using windows powershell. Do you have that 
 installed on your server?
 On 20/03/11 2:14 PM, Hide hide3...@ob4.aitai.ne.jp wrote:
 Hi, Darryl.
 Thanks for your advice.
 Your script looks like very useful.
 But in my case, tomcat is running on Microsoft Windows.
 I am looking for a method to detect the down of tomcat by log file.
 - Original Message -
 From: Darryl Lewis darryl.le...@unsw.edu.au
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Sunday, March 20, 2011 12:00 PM
 Subject: Re: How to detect down of tomcat.
 Put this in a cronjob to fire every minute
 #!/bin/sh
 if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
  then
  subject=`tomcat down; date`
  address=m...@domain.com
  ps -efatt.txt
  mail -s $subject $addr -- -fno-reply@yourdomain att.txt
 fi
 Fill in the address with your email address, and you can also pipe an 
 attachment
 For myself, I have scripts that detects when the service is down, sends me 
 an email, then tries to restart it, then will email
 if it has managed to recover it. If it can't restart it after 5 minutes, 
 then I get an SMS.
 In the morning, I can quickly see if it failed overnight, and my beauty rest 
 only gets disturbed in the really bad cases.
 On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:
 How to detect down of tomcat.
 Helo.
 My environment is tomcat7, java1.6, windows.
 When process of tomcat terminated abnormally,
 is there any method or setting that output the abnormal termination to a log 
 file?
 If there is it, please let me know.
 tomcat is the premise that is not service of windows, but even service is 
 good.
 The motive that wants to know such a thing is because I want to detect down 
 of tomcat in  automatically without human operation.
 I set a file and keyword in a log monitor tool, and it  detects down of 
 tomcat automatically.
 Thanks for your advice.
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Session timeouts: ignore periodic polling URL?

2011-03-20 Thread sebb
On 20 March 2011 11:19, André Warnier a...@ice-sa.com wrote:
 sol myr wrote:

 Hi,

 We have a Servelts/JSP application Tomcat6.
 Our javascripts issues automatic, periodic polling requests (Ajax and
 Comet), in order to keep the view  up-to-date.
 Unfortunately this prevents sessions from timing out...

 Is there a way to tell Tomcat that some URL shouldn't affect session
 timeouts?
 Namely if for the last 30 minutes, the browser requested nothing but
 http://server/autoRefresh.do; , then Tomcat should assume the user went
 away from the computer, and kill the session.

 You may have to explain the logic of this a bit better, because on the face
 of it, it makes no sense.
 Presumably, if you create a session, it is because the application needs a
 session (aka, needs some information to be preserved between individual
 requests of the same user/browser).
 Then why would you want it to time out ?

This is the sort of behaviour one wants for online banking - the
session should be logged out if the user does not do anything for a
while, even though the page may be doing background requests.

 And if you don't need a session, then why do you create one ?

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Session timeouts: ignore periodic polling URL?

2011-03-20 Thread André Warnier

sebb wrote:

On 20 March 2011 11:19, André Warnier a...@ice-sa.com wrote:

sol myr wrote:

Hi,

We have a Servelts/JSP application Tomcat6.
Our javascripts issues automatic, periodic polling requests (Ajax and
Comet), in order to keep the view  up-to-date.
Unfortunately this prevents sessions from timing out...

Is there a way to tell Tomcat that some URL shouldn't affect session
timeouts?
Namely if for the last 30 minutes, the browser requested nothing but
http://server/autoRefresh.do; , then Tomcat should assume the user went
away from the computer, and kill the session.


You may have to explain the logic of this a bit better, because on the face
of it, it makes no sense.
Presumably, if you create a session, it is because the application needs a
session (aka, needs some information to be preserved between individual
requests of the same user/browser).
Then why would you want it to time out ?


This is the sort of behaviour one wants for online banking - the
session should be logged out if the user does not do anything for a
while, even though the page may be doing background requests.



Allright then, I'll buy that, if somewhat reluctantly.

The creation or retrieval of a session, as far as I understand it, is totally under 
application control.
In other words, if your servlet (or JSP), when it is called, executes a 
HttpServletRequest.getSession() call, then it will retrieve the existing session (or 
create one if none exists yet); and if it does not call getSession(), it will not.


In other words, if you want some requests URLs not to count (or be excluded) as far as 
the session mechanism is concerned, then you just have to map these requests (URLs) to a 
servlet/JSP page which does not do a getSession().


Of course, if in order to refresh the information in the browser page, the application 
needs to access information stored in the session, then you have a problem.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Session timeouts: ignore periodic polling URL?

2011-03-20 Thread Stevo Slavić
If ajax requests need session state, then IMO Tomcat can not help you
with that - it can not and should not differentiate requests issued by
ajax and requests issued by user. In that case one solution would be
to logout user with a logout request after timeout. Where ajax
requests live, javascript is enabled, so on page load you can just
https://developer.mozilla.org/en/DOM/window.setTimeout to logout
request, where client side timeout duration could/should be same as
server side session timeout.

Regards,
Stevo.

On Sun, Mar 20, 2011 at 3:40 PM, André Warnier a...@ice-sa.com wrote:
 sebb wrote:

 On 20 March 2011 11:19, André Warnier a...@ice-sa.com wrote:

 sol myr wrote:

 Hi,

 We have a Servelts/JSP application Tomcat6.
 Our javascripts issues automatic, periodic polling requests (Ajax and
 Comet), in order to keep the view  up-to-date.
 Unfortunately this prevents sessions from timing out...

 Is there a way to tell Tomcat that some URL shouldn't affect session
 timeouts?
 Namely if for the last 30 minutes, the browser requested nothing but
 http://server/autoRefresh.do; , then Tomcat should assume the user went
 away from the computer, and kill the session.

 You may have to explain the logic of this a bit better, because on the
 face
 of it, it makes no sense.
 Presumably, if you create a session, it is because the application needs
 a
 session (aka, needs some information to be preserved between individual
 requests of the same user/browser).
 Then why would you want it to time out ?

 This is the sort of behaviour one wants for online banking - the
 session should be logged out if the user does not do anything for a
 while, even though the page may be doing background requests.


 Allright then, I'll buy that, if somewhat reluctantly.

 The creation or retrieval of a session, as far as I understand it, is
 totally under application control.
 In other words, if your servlet (or JSP), when it is called, executes a
 HttpServletRequest.getSession() call, then it will retrieve the existing
 session (or create one if none exists yet); and if it does not call
 getSession(), it will not.

 In other words, if you want some requests URLs not to count (or be
 excluded) as far as the session mechanism is concerned, then you just have
 to map these requests (URLs) to a servlet/JSP page which does not do a
 getSession().

 Of course, if in order to refresh the information in the browser page, the
 application needs to access information stored in the session, then you have
 a problem.

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to detect down of tomcat.

2011-03-20 Thread Hide

Hi, Darryl.

I understood that Tomcat cannot output specific words when tomcat terminated 
abnormally.
I will write a servlet that outputs specific words. I will write a script to call it periodically. The script outputs error log 
when specific words are not output.


Thank you very much.

- Original Message - 
From: Darryl Lewis darryl.le...@unsw.edu.au

To: Tomcat Users List users@tomcat.apache.org; Tomcat Users List 
users@tomcat.apache.org
Sent: Sunday, March 20, 2011 8:20 PM
Subject: Re: How to detect down of tomcat.


The other problem will be that tomcat is running, but the application is not responding. There may be nothing in the logs for 
this, and this is one of my most common issues.

In this case, I use some custom scripts to simulate a log in and check for an 
expected string in the return.


On 20/03/11 10:11 PM, André Warnier a...@ice-sa.com wrote:

The basic problem with abnormal termination, is that whatever you may think 
of, may not
be called, if the termination is really abnormal.

And also : define abnormal.

Hide wrote:

Hi, Darryl.

Thanks for your advice.

My explanation seems to have been bad.
I explain it a little more.

It is a method to output the information of the abnormal termination in
catalina.log that I want to know.
Would you teach it if you know some method?

Thank you.

- Original Message - From: Darryl Lewis
darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:17 PM
Subject: Re: How to detect down of tomcat.


You could write something similar using windows powershell. Do you have
that installed on your server?


On 20/03/11 2:14 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

Hi, Darryl.

Thanks for your advice.

Your script looks like very useful.
But in my case, tomcat is running on Microsoft Windows.
I am looking for a method to detect the down of tomcat by log file.


- Original Message -
From: Darryl Lewis darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:00 PM
Subject: Re: How to detect down of tomcat.


Put this in a cronjob to fire every minute

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
 then
 subject=`tomcat down; date`
 address=m...@domain.com
 ps -efatt.txt
 mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


Fill in the address with your email address, and you can also pipe an
attachment

For myself, I have scripts that detects when the service is down, sends
me an email, then tries to restart it, then will email
if it has managed to recover it. If it can't restart it after 5 minutes,
then I get an SMS.
In the morning, I can quickly see if it failed overnight, and my beauty
rest only gets disturbed in the really bad cases.

On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a
log file?

If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service
is good.

The motive that wants to know such a thing is because I want to detect
down of tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of
tomcat automatically.

Thanks for your advice.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to detect down of tomcat.

2011-03-20 Thread André Warnier

Exactly.
And when you will have done that, you will have done exactly what a Nagios 
plugin would do.
http://exchange.nagios.org/directory/Plugins


Hide wrote:

Hi, Darryl.

I understood that Tomcat cannot output specific words when tomcat 
terminated abnormally.
I will write a servlet that outputs specific words. I will write a 
script to call it periodically. The script outputs error log when 
specific words are not output.


Thank you very much.

- Original Message - From: Darryl Lewis 
darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org; Tomcat Users List 
users@tomcat.apache.org

Sent: Sunday, March 20, 2011 8:20 PM
Subject: Re: How to detect down of tomcat.


The other problem will be that tomcat is running, but the application is 
not responding. There may be nothing in the logs for this, and this is 
one of my most common issues.
In this case, I use some custom scripts to simulate a log in and check 
for an expected string in the return.



On 20/03/11 10:11 PM, André Warnier a...@ice-sa.com wrote:

The basic problem with abnormal termination, is that whatever you may 
think of, may not

be called, if the termination is really abnormal.

And also : define abnormal.

Hide wrote:

Hi, Darryl.

Thanks for your advice.

My explanation seems to have been bad.
I explain it a little more.

It is a method to output the information of the abnormal termination in
catalina.log that I want to know.
Would you teach it if you know some method?

Thank you.

- Original Message - From: Darryl Lewis
darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:17 PM
Subject: Re: How to detect down of tomcat.


You could write something similar using windows powershell. Do you have
that installed on your server?


On 20/03/11 2:14 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

Hi, Darryl.

Thanks for your advice.

Your script looks like very useful.
But in my case, tomcat is running on Microsoft Windows.
I am looking for a method to detect the down of tomcat by log file.


- Original Message -
From: Darryl Lewis darryl.le...@unsw.edu.au
To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, March 20, 2011 12:00 PM
Subject: Re: How to detect down of tomcat.


Put this in a cronjob to fire every minute

#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
 then
 subject=`tomcat down; date`
 address=m...@domain.com
 ps -efatt.txt
 mail -s $subject $addr -- -fno-reply@yourdomain att.txt
fi


Fill in the address with your email address, and you can also pipe an
attachment

For myself, I have scripts that detects when the service is down, sends
me an email, then tries to restart it, then will email
if it has managed to recover it. If it can't restart it after 5 minutes,
then I get an SMS.
In the morning, I can quickly see if it failed overnight, and my beauty
rest only gets disturbed in the really bad cases.

On 20/03/11 1:38 PM, Hide hide3...@ob4.aitai.ne.jp wrote:

How to detect down of tomcat.

Helo.

My environment is tomcat7, java1.6, windows.

When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a
log file?

If there is it, please let me know.

tomcat is the premise that is not service of windows, but even service
is good.

The motive that wants to know such a thing is because I want to detect
down of tomcat in  automatically without human operation.
I set a file and keyword in a log monitor tool, and it  detects down of
tomcat automatically.

Thanks for your advice.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to detect down of tomcat.

2011-03-20 Thread Mark Thomas
On 20/03/2011 10:22, Francis GALIEGUE wrote:
 Not really, no. If, for instance, you don't have a minimal security
 configuration, you can put in your code, say, System.exit(0), and
 Tomcat will die without notice.

Wrong. If you do that you will see a normal shut-down sequence.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issue with tomcat 6 connector

2011-03-20 Thread Krish
Hi,

I am not able to get you. i am not using any apache here.

Regards,
Krish

On Sun, Mar 20, 2011 at 4:14 AM, André Warnier a...@ice-sa.com wrote:

 Probably in some way, the same ever recurring issue of allowing Apache to
 bypass Tomcat and get to the JSP pages directly.




 Krish wrote:

 Hi Michael,

 I can't even access the jsp's under document root as well. Only html's
 work.


 I just followed this documentation. No jsp's work. That is the whole
 problem.

 Please let me know the correct configuration.

 http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html

 Regards,
 Krish




 On Sun, Mar 20, 2011 at 1:43 AM, Michael Ludwig mil...@gmx.de wrote:

 Krish schrieb am 19.03.2011 um 17:31 (-0700):

 I am using tomcat 6.0.20. In the frontend i have sun one webserver 7
 using nsapi_redirect-1.2.31 connector.

   My OS is windows server 2003 32bit.

 I am trying to create a connector using the document below.

 http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html

 my tomcat is ssl enabled and my sun one webserver 7 is http.

 Unrelated, but why would you need SSL in Tomcat when you're fronting it
 with Sun One Webserver?

 here is the configuration in obj.conf. I can get the tomcat base html
 pages. But jsp is not working.

 Look at this mapping:

 NameTrans fn=assign-name from=/*.jsp/ name=jknsapi

 Are you sure it applies to all JSPs? I'd presume it applies only to JSPs
 directly beneatht the document root.

 --
 Michael Ludwig

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org






 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
Krish


RE: Installing Tomcat the Brute Force Way?

2011-03-20 Thread Robinson, Eric
  Not necessarily. I did an rpm -qlp on 
 tomcat-6.0.18-0.noarch.rpm. All 
  the files it installs are in /opt/tomcat
  
 
 The files, yes.  But it is highly likely that it installs 
 also links from /etc/tomcat, /usr/share/tomcat, 
 /usr/lib/tomcat, /var/lib/tomcat and so on.
 At least, that is what most Linux packages that I know are doing.
 


So if I look in all the places you mentioned and I don't find any tomcat
files or links, is it safer to say that the package did not actually
install files outside the /opt/tomcat tree?

Better yet, is there an easy way to look into an RPM package and see
what all it does in terms of cearting links and such?

--Eric


































Disclaimer - March 20, 2011 
This email and any files transmitted with it are confidential and intended 
solely for Tomcat Users List. If you are not the named addressee you should not 
disseminate, distribute, copy or alter this email. Any views or opinions 
presented in this email are solely those of the author and might not represent 
those of Physicians' Managed Care or Physician Select Management. Warning: 
Although Physicians' Managed Care or Physician Select Management has taken 
reasonable precautions to ensure no viruses are present in this email, the 
company cannot accept responsibility for any loss or damage arising from the 
use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Session timeouts: ignore periodic polling URL?

2011-03-20 Thread Felix Schumacher

On Sun, 20 Mar 2011 15:40:48 +0100, André Warnier wrote:

sebb wrote:

On 20 March 2011 11:19, André Warnier a...@ice-sa.com wrote:

sol myr wrote:

Hi,

We have a Servelts/JSP application Tomcat6.
Our javascripts issues automatic, periodic polling requests (Ajax 
and

Comet), in order to keep the view  up-to-date.
Unfortunately this prevents sessions from timing out...

Is there a way to tell Tomcat that some URL shouldn't affect 
session

timeouts?
Namely if for the last 30 minutes, the browser requested nothing 
but
http://server/autoRefresh.do; , then Tomcat should assume the 
user went

away from the computer, and kill the session.

You may have to explain the logic of this a bit better, because on 
the face

of it, it makes no sense.
Presumably, if you create a session, it is because the application 
needs a
session (aka, needs some information to be preserved between 
individual

requests of the same user/browser).
Then why would you want it to time out ?

This is the sort of behaviour one wants for online banking - the
session should be logged out if the user does not do anything for a
while, even though the page may be doing background requests.



Allright then, I'll buy that, if somewhat reluctantly.

The creation or retrieval of a session, as far as I understand it, is
totally under application control.
In other words, if your servlet (or JSP), when it is called, executes
a HttpServletRequest.getSession() call, then it will retrieve the
existing session (or create one if none exists yet); and if it does
not call getSession(), it will not.
If the browser sends a session-id, tomcat will touch the session and 
mark it as alive.


I remember a similar thread not long ago, but I can't find it in the 
archives. I could
find a similar thread from 2008 where Christopher gave some answers to 
this problem[1].


If OP knows the url-pattern for all its ajax-request, that should be 
ignored for
session-keepalive, the parameter in the filter could be dropped. He 
would just have to

limit the filter to that url.

Regards
 Felix

[1] 
http://old.nabble.com/Session-expiration-and-AJAX-issues-td15671248.html


In other words, if you want some requests URLs not to count (or be
excluded) as far as the session mechanism is concerned, then you 
just
have to map these requests (URLs) to a servlet/JSP page which does 
not

do a getSession().

Of course, if in order to refresh the information in the browser
page, the application needs to access information stored in the
session, then you have a problem.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Installing Tomcat the Brute Force Way?

2011-03-20 Thread Hassan Schroeder
On Sun, Mar 20, 2011 at 1:10 PM, Robinson, Eric eric.robin...@psmnv.com wrote:

 So if I look in all the places you mentioned and I don't find any tomcat
 files or links, is it safer to say that the package did not actually
 install files outside the /opt/tomcat tree?

 Better yet, is there an easy way to look into an RPM package and see
 what all it does in terms of cearting links and such?

Considering that Tomcat isn't distributed by ASF as an RPM, maybe
this isn't the best place for these questions  :-)

OTOH, why not *just try it*? If you don't want to mess with an existing
system, spin up a VM and see what happens; probably a good idea in
any case, since if something gets messed up, you can just revert to a
previous known good state and try again...

FWIW,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Issue with tomcat 6 connector

2011-03-20 Thread André Warnier

Krish wrote:

Hi,

I am not able to get you. i am not using any apache here.


Sorry, I should have said front-end webserver.

I do not know the Sun webserver nor the nsapi connector per se, but I was referring to a 
common source of problems which consists of giving the front-end webserver direct access 
to the (tomcat) directory which houses the JSP pages for example, *without* going through 
the connector.





Regards,
Krish

On Sun, Mar 20, 2011 at 4:14 AM, André Warnier a...@ice-sa.com wrote:


Probably in some way, the same ever recurring issue of allowing Apache to
bypass Tomcat and get to the JSP pages directly.




Krish wrote:


Hi Michael,

I can't even access the jsp's under document root as well. Only html's
work.


I just followed this documentation. No jsp's work. That is the whole
problem.

Please let me know the correct configuration.

http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html

Regards,
Krish




On Sun, Mar 20, 2011 at 1:43 AM, Michael Ludwig mil...@gmx.de wrote:

Krish schrieb am 19.03.2011 um 17:31 (-0700):

I am using tomcat 6.0.20. In the frontend i have sun one webserver 7

using nsapi_redirect-1.2.31 connector.

  My OS is windows server 2003 32bit.

I am trying to create a connector using the document below.

http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html

my tomcat is ssl enabled and my sun one webserver 7 is http.


Unrelated, but why would you need SSL in Tomcat when you're fronting it
with Sun One Webserver?

here is the configuration in obj.conf. I can get the tomcat base html

pages. But jsp is not working.


Look at this mapping:

NameTrans fn=assign-name from=/*.jsp/ name=jknsapi
Are you sure it applies to all JSPs? I'd presume it applies only to JSPs
directly beneatht the document root.

--
Michael Ludwig

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org








-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Session timeouts: ignore periodic polling URL?

2011-03-20 Thread André Warnier

Felix Schumacher wrote:
...



The creation or retrieval of a session, as far as I understand it, is
totally under application control.
In other words, if your servlet (or JSP), when it is called, executes
a HttpServletRequest.getSession() call, then it will retrieve the
existing session (or create one if none exists yet); and if it does
not call getSession(), it will not.


If the browser sends a session-id, tomcat will touch the session and 
mark it as alive.


My response above was made on the base of the Servlet Specification and the Javadoc of 
HttpRequest.getSession().  I am not versed enough in the specifics of the Tomcat code to 
contradict what you say above.
But I remain unconvinced.  It sounds illogical that the container would go look for the 
session, before it is explicitly asked to do so.


So we need a real Tomcat expert here.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Session timeouts: ignore periodic polling URL?

2011-03-20 Thread Martin Gainty

!--  Default Session Configuration = --
!-- You can set the default session timeout (in minutes) for all newly created 
sessions by modifying the value in web.xml  --

session-config
session-timeout30/session-timeout
/session-config

regards,
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Sun, 20 Mar 2011 21:14:43 +0100
 From: felix.schumac...@internetallee.de
 To: users@tomcat.apache.org
 Subject: Re: Session timeouts: ignore periodic polling URL?
 
  On Sun, 20 Mar 2011 15:40:48 +0100, André Warnier wrote:
  sebb wrote:
  On 20 March 2011 11:19, André Warnier a...@ice-sa.com wrote:
  sol myr wrote:
  Hi,
 
  We have a Servelts/JSP application Tomcat6.
  Our javascripts issues automatic, periodic polling requests (Ajax 
  and
  Comet), in order to keep the view  up-to-date.
  Unfortunately this prevents sessions from timing out...
 
  Is there a way to tell Tomcat that some URL shouldn't affect 
  session
  timeouts?
  Namely if for the last 30 minutes, the browser requested nothing 
  but
  http://server/autoRefresh.do; , then Tomcat should assume the 
  user went
  away from the computer, and kill the session.
 
  You may have to explain the logic of this a bit better, because on 
  the face
  of it, it makes no sense.
  Presumably, if you create a session, it is because the application 
  needs a
  session (aka, needs some information to be preserved between 
  individual
  requests of the same user/browser).
  Then why would you want it to time out ?
  This is the sort of behaviour one wants for online banking - the
  session should be logged out if the user does not do anything for a
  while, even though the page may be doing background requests.
 
 
  Allright then, I'll buy that, if somewhat reluctantly.
 
  The creation or retrieval of a session, as far as I understand it, is
  totally under application control.
  In other words, if your servlet (or JSP), when it is called, executes
  a HttpServletRequest.getSession() call, then it will retrieve the
  existing session (or create one if none exists yet); and if it does
  not call getSession(), it will not.
  If the browser sends a session-id, tomcat will touch the session and 
  mark it as alive.
 
  I remember a similar thread not long ago, but I can't find it in the 
  archives. I could
  find a similar thread from 2008 where Christopher gave some answers to 
  this problem[1].
 
  If OP knows the url-pattern for all its ajax-request, that should be 
  ignored for
  session-keepalive, the parameter in the filter could be dropped. He 
  would just have to
  limit the filter to that url.
 
  Regards
   Felix
 
  [1] 
  http://old.nabble.com/Session-expiration-and-AJAX-issues-td15671248.html
 
  In other words, if you want some requests URLs not to count (or be
  excluded) as far as the session mechanism is concerned, then you 
  just
  have to map these requests (URLs) to a servlet/JSP page which does 
  not
  do a getSession().
 
  Of course, if in order to refresh the information in the browser
  page, the application needs to access information stored in the
  session, then you have a problem.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  

Tomcat 6 graceful shutdown

2011-03-20 Thread Igor Cicimov
Hi,

I'm running Tomcat 6.0.26 on Solaris 10 and have a question about what
exactly happens during Tomcat graceful shutdown? I guess first thing it does
is stop accepting new sessions on the listening ports. Sessions only or it
stops accepting new requests from the already established sessions? Does it
wait for the current sessions to end (I don't think so since this might take
very long time) or just for the servelets to finish their current requests?
What happens exactly with the servlets and the threads? In general, how the
threads and servlets are being destroyed during graceful shutdown?

When I issue the following command from the unix shell:

# $TOMCAT_HOME/bin/catalina.sh stop 600

I can still see the server being shut down in less than 10 seconds although
I specify 10 minutes delay. Does that mean that the server has already shut
down all the resources properly and doesn't have to wait for 10 minutes?

Is the unloadDelay specified in the application Context the only wait of
controlling the shutdown process (the servlet unload time)?

How can I make sure that all the requests finish before the server shutdown?

Thank you very much for your help.