You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Ehlers, Kolja" <eh...@clinresearch.com> on 2008/11/13 15:21:20 UTC

Different session timeout for local and external users

Hello everybody,

is it somehow possible to set a different session timeout for local
192.168... users and others? I know I could have a rewrite rule and then
forward all calls from local workstation to a different webapp folder but I
thought maybe there is a more easy way to do this.

Thanks

ke

Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


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


Re: Different session timeout for local and external users

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mikolaj,

Mikolaj Rydzewski wrote:
> Ehlers, Kolja wrote:
>> is it somehow possible to set a different session timeout for local
>> 192.168... users and others? I know I could have a rewrite rule and then
>> forward all calls from local workstation to a different webapp folder
>> but I
>> thought maybe there is a more easy way to do this.
>>   
> Servlet filter that will make use of HttpSession#getLastAccessedTime()
> and invalidate session for 'local' users.

I would flip the logic around and instead use setMaxInactiveInterval for
sessions considered "local" and then allow TC to handle the expiration.

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

iEYEARECAAYFAkkcYPcACgkQ9CaO5/Lv0PCuDQCfW05qw/1lvIaO22ary8EO0mtx
Ie4An0z8RP0f/PucSG19Z6yXXtaB3FNc
=d8Ew
-----END PGP SIGNATURE-----

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


Re: Different session timeout for local and external users

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Bret Davies wrote:
> I actually dropped it in the mail yesterday.
>   
Oops, I'm sorry, looks like I have some email problems.

-- 
Mikolaj Rydzewski <mi...@ceti.pl>


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


Re: Different session timeout for local and external users

Posted by Bret Davies <ju...@co.juneau.wi.us>.
Peter

I actually dropped it in the mail yesterday.

sorry.

Bret

----- Original Message ----- 
From: "Mikolaj Rydzewski" <mi...@ceti.pl>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, November 13, 2008 8:28 AM
Subject: Re: Different session timeout for local and external users


> Ehlers, Kolja wrote:
> > is it somehow possible to set a different session timeout for local
> > 192.168... users and others? I know I could have a rewrite rule and then
> > forward all calls from local workstation to a different webapp folder
but I
> > thought maybe there is a more easy way to do this.
> >
> Servlet filter that will make use of HttpSession#getLastAccessedTime()
> and invalidate session for 'local' users.
>
> -- 
> Mikolaj Rydzewski <mi...@ceti.pl>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


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


RE: AW: Different session timeout for local and external users

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ehlers, Kolja [mailto:ehlers@clinresearch.com]
> Subject: AW: AW: Different session timeout for local and
> external users
>
> its located at shared/lib

If it's a standalone class, it should be in shared/classes, not shared/lib.  Also, make sure the class does not exist in any of the individual webapps.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


AW: AW: Different session timeout for local and external users

Posted by "Ehlers, Kolja" <eh...@clinresearch.com>.
its located at shared/lib

14.11.2008 16:33:43 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
14.11.2008 16:33:43 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 593 ms
14.11.2008 16:33:43 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
14.11.2008 16:33:43 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
14.11.2008 16:33:43 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
14.11.2008 16:33:43 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error filterStart
14.11.2008 16:33:43 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [/host-manager] startup failed due to previous errors
14.11.2008 16:33:43 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error filterStart
14.11.2008 16:33:43 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [/manager] startup failed due to previous errors
14.11.2008 16:33:47 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
14.11.2008 16:33:47 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
14.11.2008 16:33:47 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
14.11.2008 16:33:47 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
14.11.2008 16:33:47 org.apache.catalina.startup.Catalina start
INFO: Server startup in 4344 ms

This is all output I get. Maybe this is not working:

<url-pattern>/*</url-pattern>

Thanks

-----Ursprungliche Nachricht-----
Von: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
Gesendet: Freitag, 14. November 2008 16:27
An: Tomcat Users List
Betreff: RE: AW: Different session timeout for local and external users


> From: Ehlers, Kolja [mailto:ehlers@clinresearch.com]
> Subject: AW: AW: Different session timeout for local and
> external users
>
> is it not possible to define a global filter for all web
> applications?

It should be, but it will apply to all webapps, including the ones packaged
with Tomcat.

>     <filter-class>filters.LoggerFilter</filter-class>

Where is filters/LoggerFilter.class located?  It must be accessible to
*every* webapp if you put the declaration in conf/web.xml.

> 14.11.2008 12:34:58 org.apache.catalina.core.StandardContext start
> SCHWERWIEGEND: Error filterStart

There may be another log entry showing the reason for the filterStart
failure, such as class not found.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Gesch�ftsf�hrung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht K�ln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


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


RE: AW: Different session timeout for local and external users

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ehlers, Kolja [mailto:ehlers@clinresearch.com]
> Subject: AW: AW: Different session timeout for local and
> external users
>
> is it not possible to define a global filter for all web
> applications?

It should be, but it will apply to all webapps, including the ones packaged with Tomcat.

>     <filter-class>filters.LoggerFilter</filter-class>

Where is filters/LoggerFilter.class located?  It must be accessible to *every* webapp if you put the declaration in conf/web.xml.

> 14.11.2008 12:34:58 org.apache.catalina.core.StandardContext start
> SCHWERWIEGEND: Error filterStart

There may be another log entry showing the reason for the filterStart failure, such as class not found.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: AW: Different session timeout for local and external users

Posted by André Warnier <aw...@ice-sa.com>.
Mikolaj Rydzewski wrote:
> Ehlers, Kolja wrote:
>> Thanks for the speedy answer to my question. Is this the only 
>> possibility?
>> Since the filter will be called for each request, maybe this will slow 
>> down
>> my web application
>>   
> Maybe. But not likely. Search the web for 'premature optimization' ;-)
> 
Have a look here :
http://tuckey.org/urlrewrite/

This does not have much to do with your case, but somewhere in there is 
a measure of how much time this filter takes per request.  Since it is 
much more complex that what you plan to do, I din't think you should worry.

The UrlRewrite filter itself, on the other hand, is a very handy tool 
that may be useful to you one day.
Maybe in fact it can even do what you want, also.  It can certainly 
distinguish remote IP addresses.


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


Re: AW: AW: Different session timeout for local and external users

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kolja,

Ehlers, Kolja wrote:
> is it not possible to define a global filter for all web applications?

Yes, but I'm not sure why you'd want to do that. If each application
needs it, just enable it in all applications.

> If I add
> 
>   <filter>
>     <filter-name>Logger</filter-name>
>     <filter-class>filters.LoggerFilter</filter-class>
>     <init-param>
>       <param-name>localTimeout</param-name>
>       <param-value>480</param-value>
>     </init-param>
>   </filter>
>   <filter-mapping>
>     <filter-name>Logger</filter-name>
>     <url-pattern>/*</url-pattern>
>   </filter-mapping>
> 
> to conf/web.xml Tomcat gives SERVERE warnings at startup
> 
> 14.11.2008 12:34:57 org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> 14.11.2008 12:34:57 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 576 ms
> 14.11.2008 12:34:58 org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> 14.11.2008 12:34:58 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
> 14.11.2008 12:34:58 org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> 14.11.2008 12:34:58 org.apache.catalina.core.StandardContext start
> SCHWERWIEGEND: Error filterStart

Is that all you get? I would have expected a ClassNotFoundException or
something. Your problem is likely that you have your
filters.LoggerFilter class in one of your webapps' lib directories.
Instead, you have to put it into Tomcat's "lib" directory (for TC 6) or
Tomcat's common/lib directory (for TC 5).

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

iEYEARECAAYFAkkdm+QACgkQ9CaO5/Lv0PCLCwCgli8CLDzQ0XTFWizs0H7JNbLY
qagAoJFFTM+lVnwr7RvPh3GWMrSM2n/P
=0zEw
-----END PGP SIGNATURE-----

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


AW: AW: AW: Different session timeout for local and external users

Posted by "Ehlers, Kolja" <eh...@clinresearch.com>.
yes thanks I will do that. So I cannot just add the filter to the global
web.xml at conf/web.xml?

-----Ursprüngliche Nachricht-----
Von: Mikolaj Rydzewski [mailto:miki@ceti.pl]
Gesendet: Freitag, 14. November 2008 12:53
An: Tomcat Users List
Betreff: Re: AW: AW: Different session timeout for local and external
users


Ehlers, Kolja wrote:
> is it not possible to define a global filter for all web applications?
For Tomcat you can use Valves.

In fact, you should really ignore additional time that such simple
filter will add to request processing time.

First: check if it really slows down your app. If it _really_ slows it
down you can think about some improvements.

--
Mikolaj Rydzewski <mi...@ceti.pl>


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


Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


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


Re: AW: AW: Different session timeout for local and external users

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Ehlers, Kolja wrote:
> is it not possible to define a global filter for all web applications?
For Tomcat you can use Valves.

In fact, you should really ignore additional time that such simple 
filter will add to request processing time.

First: check if it really slows down your app. If it _really_ slows it 
down you can think about some improvements.

-- 
Mikolaj Rydzewski <mi...@ceti.pl>


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


AW: AW: Different session timeout for local and external users

Posted by "Ehlers, Kolja" <eh...@clinresearch.com>.
is it not possible to define a global filter for all web applications? If I
add

  <filter>
    <filter-name>Logger</filter-name>
    <filter-class>filters.LoggerFilter</filter-class>
    <init-param>
      <param-name>localTimeout</param-name>
      <param-value>480</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>Logger</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

to conf/web.xml Tomcat gives SERVERE warnings at startup

14.11.2008 12:34:57 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
14.11.2008 12:34:57 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 576 ms
14.11.2008 12:34:58 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
14.11.2008 12:34:58 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
14.11.2008 12:34:58 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
14.11.2008 12:34:58 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error filterStart

while when using the WEB-INF/web.xml is starts just fine

Thanks again

-----Ursprüngliche Nachricht-----
Von: Mikolaj Rydzewski [mailto:miki@ceti.pl]
Gesendet: Freitag, 14. November 2008 09:42
An: Tomcat Users List
Betreff: Re: AW: Different session timeout for local and external users


Ehlers, Kolja wrote:
> Thanks for the speedy answer to my question. Is this the only possibility?
> Since the filter will be called for each request, maybe this will slow
down
> my web application
>
Maybe. But not likely. Search the web for 'premature optimization' ;-)

--
Mikolaj Rydzewski <mi...@ceti.pl>


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


Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


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


Re: AW: Different session timeout for local and external users

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Ehlers, Kolja wrote:
> Thanks for the speedy answer to my question. Is this the only possibility?
> Since the filter will be called for each request, maybe this will slow down
> my web application
>   
Maybe. But not likely. Search the web for 'premature optimization' ;-)

-- 
Mikolaj Rydzewski <mi...@ceti.pl>


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


AW: Different session timeout for local and external users

Posted by "Ehlers, Kolja" <eh...@clinresearch.com>.
I have looked at the session listeners but there I cannot access the users
remote adress

-----Ursprüngliche Nachricht-----
Von: Ehlers, Kolja [mailto:ehlers@clinresearch.com]
Gesendet: Freitag, 14. November 2008 09:38
An: Tomcat Users List
Betreff: AW: Different session timeout for local and external users


Thanks for the speedy answer to my question. Is this the only possibility?
Since the filter will be called for each request, maybe this will slow down
my web application

Thanks again

-----Ursprüngliche Nachricht-----
Von: Mikolaj Rydzewski [mailto:miki@ceti.pl]
Gesendet: Donnerstag, 13. November 2008 15:29
An: Tomcat Users List
Betreff: Re: Different session timeout for local and external users


Ehlers, Kolja wrote:
> is it somehow possible to set a different session timeout for local
> 192.168... users and others? I know I could have a rewrite rule and then
> forward all calls from local workstation to a different webapp folder but
I
> thought maybe there is a more easy way to do this.
>
Servlet filter that will make use of HttpSession#getLastAccessedTime()
and invalidate session for 'local' users.

--
Mikolaj Rydzewski <mi...@ceti.pl>


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


Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


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


AW: Different session timeout for local and external users

Posted by "Ehlers, Kolja" <eh...@clinresearch.com>.
Thanks for the speedy answer to my question. Is this the only possibility?
Since the filter will be called for each request, maybe this will slow down
my web application

Thanks again

-----Ursprüngliche Nachricht-----
Von: Mikolaj Rydzewski [mailto:miki@ceti.pl]
Gesendet: Donnerstag, 13. November 2008 15:29
An: Tomcat Users List
Betreff: Re: Different session timeout for local and external users


Ehlers, Kolja wrote:
> is it somehow possible to set a different session timeout for local
> 192.168... users and others? I know I could have a rewrite rule and then
> forward all calls from local workstation to a different webapp folder but
I
> thought maybe there is a more easy way to do this.
>
Servlet filter that will make use of HttpSession#getLastAccessedTime()
and invalidate session for 'local' users.

--
Mikolaj Rydzewski <mi...@ceti.pl>


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


Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht Köln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.


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


Re: Different session timeout for local and external users

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Ehlers, Kolja wrote:
> is it somehow possible to set a different session timeout for local
> 192.168... users and others? I know I could have a rewrite rule and then
> forward all calls from local workstation to a different webapp folder but I
> thought maybe there is a more easy way to do this.
>   
Servlet filter that will make use of HttpSession#getLastAccessedTime() 
and invalidate session for 'local' users.

-- 
Mikolaj Rydzewski <mi...@ceti.pl>


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


Re: Different session timeout for local and external users

Posted by Ronald Klop <ro...@base.nl>.
Use HttpSession.setMaxInactiveInterval(int).

if (request.getRemoteHost().startsWith("192.168.")) { // or something more advanced
   request.getSession().setMaxInactiveInterval(1000000);
}

Ronald.


Op donderdag, 13 november 2008 om 15:21 uur schreef Tomcat Users List <us...@tomcat.apache.org>:
> 
> Subject: Different session timeout for local and external users
> Date: Thu Nov 13 15:21:20 CET 2008
> From: Ehlers, Kolja <eh...@clinresearch.com>
> Hello everybody,
> 
> is it somehow possible to set a different session timeout for local
> 192.168... users and others? I know I could have a rewrite rule and then
> forward all calls from local workstation to a different webapp folder but I
> thought maybe there is a more easy way to do this.
> 
> Thanks
> 
> ke
> 
> Geschäftsführung: Dr. Michael Fischer, Reinhard Eisebitt
> Amtsgericht Köln HRB 32356
> Steuer-Nr.: 217/5717/0536
> Ust.Id.-Nr.: DE 204051920
> --
> This email transmission and any documents, files or previous email
> messages attached to it may contain information that is confidential or
> legally privileged. If you are not the intended recipient or a person
> responsible for delivering this transmission to the intended recipient,
> you are hereby notified that any disclosure, copying, printing,
> distribution or use of this transmission is strictly prohibited. If you
> have received this transmission in error, please immediately notify the
> sender by telephone or return email and delete the original transmission
> and its attachments without reading or saving in any manner.
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
>  
> 
> 
>