I've got session-timeout set to -1 so that ain't it.
Here's what I did: I searched through all of the source code to tomcat looking for the
string '408'
%find . -name '*.java' -exec grep 408 {} \;
* Status code (408) indicating that the client did not produce a request
public static final int SC_REQUEST_TIMEOUT = 408;
Found it. So now look for SC_REQUEST_TIMEOUT and show me the name of the file(s) it occurs in
%find . -name '*.java' -exec grep -l SC_REQUEST_TIMEOUT {} \;
./java/javax/servlet/http/HttpServletResponse.java
./java/org/apache/catalina/authenticator/FormAuthenticator.java
That's it. It's defined it HttpServletResponse and used only in FormAuthenticator. And in only one place.
It's true that The session should have already been created and indeed it
was. and then it was lost. the call: session = request.getSessionInternal(false); didn't find it.
And since there is no landing page, 408.
I downloaded the source in apache-tomcat-7.0.11-src.zip
I'm not an expert on this. Or, at least I've never even looked at the source to tomcat. But, there it is.
From what I understand, the session IS supposed to be destroyed and a new one is to take its place. That's a new security feature so hackers can't sniff the jsessionid cookie.
Again, I'm not an expert and I can't go saying the code is wrong without spending hours and hours becoming familiar with it. But I wonder what would happen if request.getSessionInternal(false); were instead: request.getSessionInternal(
true); That is, create the session if it ain't there.
I have a feeling there's a good reason why it is the way it is. Maybe something else should have already created the session internally before authenticate was ever called.
I'd just like to be able to login.
Thanks for your replies.