You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Martin Dubuc <ma...@gmail.com> on 2008/12/01 23:10:53 UTC

j_security_check

I would like Tomcat to automatically redirect to a special session expiry
notification page when a user session times out. I am currently using the
meta tag to force redirection as follows:

<meta http-equiv="refresh"
content="${pageContext.session.maxInactiveInterval};url=sessionTimeout.jsp">

However, I also have an unload Javascipt directive in some of my pages to
prompt users when they navigate away from these pages. The JavaScirpt code
looks like this:

window.onbeforeunload = confirmUnload();

function confirmUnload() {
    return "Navigate away?";
}

I am not sure I understand exactly why, but it seems to me that, although
the sessionTimeout.jsp page is not protected, if the user responds to
"Navigate away" prompt after Tomcat removes the session from the session
list, then, Tomcat presents the login form instead of the session expiry
notification page. Once user submits the login form, Tomcat reports an HTTP
Status 400 - Invalid direct reference to form login page. I am not sure
exactly what happens behind the scens and would like to get some advice to
better troubleshoot or fix this kind of issue.

I would also like to know why ${pageContext.session.maxInactiveInterval}
evaluates to 900 even if I set the session-timeout variable to 1 minute in
the application web.xml configuration file (and even in Tomcat conf/web.xml
file). I find it odd that looking at the manager application main page, the
sessions listed on that page show Expire sessions with idle >= 1 minutes,
but yet, the TTL in the application session page starts at 15 minutes and
session only expires after 15 minutes.

I am using Tomcat 6.0.18.

Martin

Re: Tribes and IPv6 Support

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
Thanks Mike,
This would really be a JVM issue, and it doesn't look that promising

http://x86.sun.com/thread.jspa?messageID=10274291
http://forums.java.net/jive/thread.jspa?messageID=247308

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4640544

Filip

Mike Wannamaker wrote:
> I'm having an issue starting tribes under tomcat 5.5 on Windows 2008 Server, IPv6 only setup.
>
> Get the following exception
>
> Dec 1, 2008 11:25:07 AM org.apache.catalina.tribes.transport.ReceiverBase bind
> INFO: Unable to bind server socket to:/fe80:0:0:0:c8cb:7933:1d84:c05d:4099 throwing error.
> Dec 1, 2008 11:25:07 AM org.apache.catalina.tribes.transport.nio.NioReceiver start
> SEVERE: Unable to start cluster receiver
> java.net.SocketException: Address family not supported by protocol family: bind
> 	at sun.nio.ch.Net.bind(Native Method)
> 	at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
> 	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
> 	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:205)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
> 	at org.apache.catalina.tribes.transport.nio.NioReceiver.bind(NioReceiver.java:132)
> 	at org.apache.catalina.tribes.transport.nio.NioReceiver.start(NioReceiver.java:102)
> 	at org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(ChannelCoordinator.java:142)
> 	at org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordinator.java:97)
> 	at org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInterceptorBase.java:149)
> 	at org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInterceptorBase.java:149)
> 	at org.apache.catalina.tribes.group.GroupChannel.start(GroupChannel.java:407)
>
> Any help is appreciated.
>   


---------------------------------------------------------------------
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


Tribes and IPv6 Support

Posted by Mike Wannamaker <mw...@opentext.com>.
I'm having an issue starting tribes under tomcat 5.5 on Windows 2008 Server, IPv6 only setup.

Get the following exception

Dec 1, 2008 11:25:07 AM org.apache.catalina.tribes.transport.ReceiverBase bind
INFO: Unable to bind server socket to:/fe80:0:0:0:c8cb:7933:1d84:c05d:4099 throwing error.
Dec 1, 2008 11:25:07 AM org.apache.catalina.tribes.transport.nio.NioReceiver start
SEVERE: Unable to start cluster receiver
java.net.SocketException: Address family not supported by protocol family: bind
	at sun.nio.ch.Net.bind(Native Method)
	at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:205)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.ReceiverBase.bind(ReceiverBase.java:217)
	at org.apache.catalina.tribes.transport.nio.NioReceiver.bind(NioReceiver.java:132)
	at org.apache.catalina.tribes.transport.nio.NioReceiver.start(NioReceiver.java:102)
	at org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(ChannelCoordinator.java:142)
	at org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordinator.java:97)
	at org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInterceptorBase.java:149)
	at org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInterceptorBase.java:149)
	at org.apache.catalina.tribes.group.GroupChannel.start(GroupChannel.java:407)

Any help is appreciated.

Re: j_security_check

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

Martin,

Martin Dubuc wrote:
> I will describe the browser interactions with regards to the access logs.

Thanks, this was helpful.

> My assumption is that clicking on OK caused the client to be
> redirected to sessionTimeout.jsf.

I think you mean that the browser simply requested sessionTimeout.jsf,
rather than being redirected. The response was 200, which means that it
should have been successfully serviced. I think recent Tomcats return
200 when the login-page is shown, though, so it's tough to tell exactly
what happened.

Requests for the following resources seemed to happen simultaneously
(probably from the original page being loaded):

/a4j/s/3_2_2.SR1org/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
/a4j/s/3_2_2.SR1org/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/skinning.js.jsf
/favicon.ico HTTP/1.1

None of those should have caused the login page to be displayed, either
(which wouldn't have happened anyway, since it would have been included
in the main content, rather than being the response to the initial request).

> I do not understand why, but that
> redirection seems to cause Tomcat to ask for authentication, altough there
> is no protected resources used by sessionTimeout.jsf or any other URLs that
> are listed in the access log after 17:13:06.

Are you sure you don't have any other <security-constraint> sections in
your web.xml?

> So to answer some of your question more specifically,:
> 
> - To get the session timeout to kick in after 1 minute, I had to disable
> some of my application code that was hard coding all sessions
> maxInactiveInterval value to 15 minutes on startup (bypassing the web.xml
> value).

That'll do it ;)

> - The sessionTimeout.jsf was triggered from JavaScript.

Okay, so this simply requests /sessionTimeout.jsf after the session
should have timed out. This should behave exactly as if you manually
typed-in /sessionTimeout.jsf into your browser. Remember to run that URL
through response.encodeURL() before putting it into your Javascript,
just in case your client isn't using cookies.

> - The login page does not access any of the protected resources (it doesn't
> use the stylesheet, nor any images).

Ok.

> - I believe that the session expired at 17:14:06, although I think the
> client only gets redirected to sessionTimeout.jsf at 17:28:04 after user
> clicks on OK.

You can easily convince yourself that your login expired because you are
asked to login again ;) Not sure why you have to, but at least you know
your session is gone.

> - I do not know why any request resulted in the login page to be shown in
> the first place. None of the a4j/*, favicon.ico should trigger the login
> page.

Ok.

Can you post more of your web.xml?

- -chris

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

iEYEARECAAYFAkk4OpIACgkQ9CaO5/Lv0PC3vgCdHtyFdztw6px/s35pmI6rzep7
2WEAniK8Oh49jZCcoitk0Z3ks79RT/Fb
=LCGJ
-----END PGP SIGNATURE-----

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


Re: j_security_check

Posted by Martin Dubuc <ma...@gmail.com>.
Christopher,

I will describe the browser interactions with regards to the access logs.

At 17:13:06, the user accessed the main.jsf page. The session timeout for
the application is 1 minute. The main.jsf page has meta tag that redirectes
to sessionTimeout.jsf after 1 minute. The main.jsf page also has a
window.onbeforeunload  directive. After the meta timeout occurs (after 1
minute), I assume the client automatically tries to redirect to
sessionTimeout.jsf. Before the redirection takes place, the onbeforeunload
event is serviced and a prompt is presented to the user (Do you want to
navigate away from current page). In the recorded session, the user pressed
OK at 17:28:04. Note that accesses at 17:13:13 and 17:28:01 to the manager
application were done to verify if the session was still alive or not. At
17:28:01, the session was not present anymore in the list of live Tomcat
sessions. My assumption is that clicking on OK caused the client to be
redirected to sessionTimeout.jsf. I do not understand why, but that
redirection seems to cause Tomcat to ask for authentication, altough there
is no protected resources used by sessionTimeout.jsf or any other URLs that
are listed in the access log after 17:13:06.

So to answer some of your question more specifically,:

- To get the session timeout to kick in after 1 minute, I had to disable
some of my application code that was hard coding all sessions
maxInactiveInterval value to 15 minutes on startup (bypassing the web.xml
value).
- The sessionTimeout.jsf was triggered from JavaScript.
- The login page does not access any of the protected resources (it doesn't
use the stylesheet, nor any images).
- I believe that the session expired at 17:14:06, although I think the
client only gets redirected to sessionTimeout.jsf at 17:28:04 after user
clicks on OK.
- I do not know why any request resulted in the login page to be shown in
the first place. None of the a4j/*, favicon.ico should trigger the login
page.


On Tue, Dec 2, 2008 at 1:29 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Martin,
>
> Martin Dubuc wrote:
> > I finally managed to get the sessions to time out after 1 minute.
>
> What did you have to change?
>
> > Here is the security-constraint definition:
> >     <security-constraint>
> >         <web-resource-collection>
> >             <web-resource-name>
> >                 Page constraints for users
> >             </web-resource-name>
> >             <url-pattern>/index.html</url-pattern>
> >             <url-pattern>/main.jsf</url-pattern>
> >             <url-pattern>/stylesheet.css</url-pattern>
> >             <url-pattern>/images/*</url-pattern>
> >             <url-pattern>/logOut.jsf</url-pattern>
> >         </web-resource-collection>
> >         <auth-constraint>
> >             <role-name>myrole</role-name>
> >         </auth-constraint>
>
> Does your login page attempt to display any of these files? Perhaps an
> image or your stylesheet? If so, this isn't going to work properly and
> you'll get a bunch of requests that all get sent to the login page after
> a session timeout.
>
> > Here is the access log:
>
> Care to point out when the session expires?
>
> > 192.168.0.110 - admin [02/Dec/2008:17:13:13 +0000] "POST
> > /manager/html/sessions?path=/system HTTP/1.1" 200 5114
>
> It looks like you wait for 15 minutes, here, and then there's another
> request:
>
> > 192.168.0.110 - admin [02/Dec/2008:17:28:01 +0000] "POST
> > /manager/html/sessions?path=/system HTTP/1.1" 200 4436
> > 192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET /sessionTimeout.jsf
> > HTTP/1.1" 200 2614
>
> Was this request for /sessionTimeout.jsf done from your javascript code,
> or by you typing something into the URL bar of your browser?
>
> > 192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET
> >
> /a4j/s/3_2_2.SR1org/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
> > HTTP/1.1" 200 6857
> > 192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET
> >
> /a4j/s/3_2_2.SR1org/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
> > HTTP/1.1" 200 4134
> > 192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET
> > /a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/skinning.js.jsf
> > HTTP/1.1" 200 1164
>
> Are any of the above requests related to the problem you are observing?
>
> > 192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET /favicon.ico
> HTTP/1.1"
> > 200 21630
> > 192.168.0.110 - - [02/Dec/2008:17:28:11 +0000] "POST /j_security_check
> > HTTP/1.1" 400 1100
>
> This is obviously where you get the 400 response. Which request resulted
> in the login page being shown in the first place?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkk1fmgACgkQ9CaO5/Lv0PCddQCgsXyX7KJ5gOZFn2xNeaPPxY3p
> 4Z0AoLbp8FYcs6B+lxx/W/Nl7vKRZTyP
> =5oYE
> -----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: j_security_check

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

Martin,

Martin Dubuc wrote:
> I finally managed to get the sessions to time out after 1 minute.

What did you have to change?

> Here is the security-constraint definition:
>     <security-constraint>
>         <web-resource-collection>
>             <web-resource-name>
>                 Page constraints for users
>             </web-resource-name>
>             <url-pattern>/index.html</url-pattern>
>             <url-pattern>/main.jsf</url-pattern>
>             <url-pattern>/stylesheet.css</url-pattern>
>             <url-pattern>/images/*</url-pattern>
>             <url-pattern>/logOut.jsf</url-pattern>
>         </web-resource-collection>
>         <auth-constraint>
>             <role-name>myrole</role-name>
>         </auth-constraint>

Does your login page attempt to display any of these files? Perhaps an
image or your stylesheet? If so, this isn't going to work properly and
you'll get a bunch of requests that all get sent to the login page after
a session timeout.

> Here is the access log:

Care to point out when the session expires?

> 192.168.0.110 - admin [02/Dec/2008:17:13:13 +0000] "POST
> /manager/html/sessions?path=/system HTTP/1.1" 200 5114

It looks like you wait for 15 minutes, here, and then there's another
request:

> 192.168.0.110 - admin [02/Dec/2008:17:28:01 +0000] "POST
> /manager/html/sessions?path=/system HTTP/1.1" 200 4436
> 192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET /sessionTimeout.jsf
> HTTP/1.1" 200 2614

Was this request for /sessionTimeout.jsf done from your javascript code,
or by you typing something into the URL bar of your browser?

> 192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET
> /a4j/s/3_2_2.SR1org/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
> HTTP/1.1" 200 6857
> 192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET
> /a4j/s/3_2_2.SR1org/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
> HTTP/1.1" 200 4134
> 192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET
> /a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/skinning.js.jsf
> HTTP/1.1" 200 1164

Are any of the above requests related to the problem you are observing?

> 192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET /favicon.ico HTTP/1.1"
> 200 21630
> 192.168.0.110 - - [02/Dec/2008:17:28:11 +0000] "POST /j_security_check
> HTTP/1.1" 400 1100

This is obviously where you get the 400 response. Which request resulted
in the login page being shown in the first place?

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

iEYEARECAAYFAkk1fmgACgkQ9CaO5/Lv0PCddQCgsXyX7KJ5gOZFn2xNeaPPxY3p
4Z0AoLbp8FYcs6B+lxx/W/Nl7vKRZTyP
=5oYE
-----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: j_security_check

Posted by Martin Dubuc <ma...@gmail.com>.
I finally managed to get the sessions to time out after 1 minute. This makes
it much easier for testing purposes! I style get the exception however.

Here is the security-constraint definition:
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>
                Page constraints for users
            </web-resource-name>
            <url-pattern>/index.html</url-pattern>
            <url-pattern>/main.jsf</url-pattern>
            <url-pattern>/stylesheet.css</url-pattern>
            <url-pattern>/images/*</url-pattern>
            <url-pattern>/logOut.jsf</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>myrole</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

Here is the access log:

192.168.0.110 - admin [02/Dec/2008:17:13:02 +0000] "GET /images/hidden.gif
HTTP/1.1" 200 1510
192.168.0.110 - admin [02/Dec/2008:17:13:02 +0000] "GET /favicon.ico
HTTP/1.1" 200 21630
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "POST /main.jsf HTTP/1.1"
200 90018
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET
/a4j/g/3_2_2.SR1org.ajax4jsf.javascript.AjaxScript.jsf HTTP/1.1" 200 53724
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET
/a4j/g/3_2_2.SR1org.ajax4jsf.javascript.PrototypeScript.jsf HTTP/1.1" 200
95028
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET
/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/utils.js.jsf HTTP/1.1"
200 9094
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET
/a4j/g/3_2_2.SR1org/ajax4jsf/javascript/scripts/form.js.jsf HTTP/1.1" 200
2098
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET
/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/form.js.jsf HTTP/1.1"
200 372
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET
/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/panelMenu.js.jsf
HTTP/1.1" 200 10162
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET
/a4j/s/3_2_2.SR1org/richfaces/renderkit/html/css/panelMenu.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
 HTTP/1.1" 200
1262
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET
/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/data-table.js.jsf
HTTP/1.1" 200 5500
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET /a4j/s/3_2_2.SR1c
ss/table.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf HTTP/1.1" 200
2717              192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET
/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/skinning.js.jsf
HTTP/1.1" 200 1164
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET /stylesheet.css
HTTP/1.1" 200 8715
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET
/images/hiddenimage.gif HTTP/1.1" 200 68
192.168.0.110 - admin [02/Dec/2008:17:13:06 +0000] "GET /favicon.ico
HTTP/1.1" 200 21630
192.168.0.110 - admin [02/Dec/2008:17:13:13 +0000] "POST
/manager/html/sessions?path=/system HTTP/1.1" 200 5114
192.168.0.110 - admin [02/Dec/2008:17:28:01 +0000] "POST
/manager/html/sessions?path=/system HTTP/1.1" 200 4436
192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET /sessionTimeout.jsf
HTTP/1.1" 200 2614
192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET
/a4j/s/3_2_2.SR1org/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
HTTP/1.1" 200 6857
192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET
/a4j/s/3_2_2.SR1org/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
HTTP/1.1" 200 4134
192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET
/a4j/g/3_2_2.SR1org/richfaces/renderkit/html/scripts/skinning.js.jsf
HTTP/1.1" 200 1164
192.168.0.110 - - [02/Dec/2008:17:28:04 +0000] "GET /favicon.ico HTTP/1.1"
200 21630
192.168.0.110 - - [02/Dec/2008:17:28:11 +0000] "POST /j_security_check
HTTP/1.1" 400 1100
192.168.0.110 - - [02/Dec/2008:17:28:11 +0000] "GET /favicon.ico HTTP/1.1"
200 21630


On Tue, Dec 2, 2008 at 11:28 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Martin,
>
> Martin Dubuc wrote:
> > I am not sure I understand exactly why, but it seems to me that, although
> > the sessionTimeout.jsp page is not protected, if the user responds to
> > "Navigate away" prompt after Tomcat removes the session from the session
> > list, then, Tomcat presents the login form instead of the session expiry
> > notification page.
>
> Perhaps Tomcat is reacting to a request for a different resource. Can
> you post your access log for the time period around this request? Also,
> you might want to post your <security-constraint> sections from web.xml.
>
> > I would also like to know why ${pageContext.session.maxInactiveInterval}
> > evaluates to 900 even if I set the session-timeout variable to 1 minute
> in
> > the application web.xml configuration file (and even in Tomcat
> conf/web.xml
> > file). I find it odd that looking at the manager application main page,
> the
> > sessions listed on that page show Expire sessions with idle >= 1 minutes,
> > but yet, the TTL in the application session page starts at 15 minutes and
> > session only expires after 15 minutes.
>
> Maybe you'd better post that configuration as well.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkk1YkoACgkQ9CaO5/Lv0PDHQwCgv2/xLxBa8JMG5UxRQMmXWF14
> 2osAn3VOaoptfmdDq53bU3Y84vPw+e3v
> =/Wrd
> -----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: j_security_check

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

Martin,

Martin Dubuc wrote:
> I am not sure I understand exactly why, but it seems to me that, although
> the sessionTimeout.jsp page is not protected, if the user responds to
> "Navigate away" prompt after Tomcat removes the session from the session
> list, then, Tomcat presents the login form instead of the session expiry
> notification page.

Perhaps Tomcat is reacting to a request for a different resource. Can
you post your access log for the time period around this request? Also,
you might want to post your <security-constraint> sections from web.xml.

> I would also like to know why ${pageContext.session.maxInactiveInterval}
> evaluates to 900 even if I set the session-timeout variable to 1 minute in
> the application web.xml configuration file (and even in Tomcat conf/web.xml
> file). I find it odd that looking at the manager application main page, the
> sessions listed on that page show Expire sessions with idle >= 1 minutes,
> but yet, the TTL in the application session page starts at 15 minutes and
> session only expires after 15 minutes.

Maybe you'd better post that configuration as well.

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

iEYEARECAAYFAkk1YkoACgkQ9CaO5/Lv0PDHQwCgv2/xLxBa8JMG5UxRQMmXWF14
2osAn3VOaoptfmdDq53bU3Y84vPw+e3v
=/Wrd
-----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