What the hell is wrong?!
I searched this forum and everywhere I could imagine. Many people have the same problem and none of them have received any answer!!! Even people have the same problem with jboss/catalina. That one is fortunately solvable.
Has anybody in the world written a real application with jboss/jetty 3.0.4?! It's a serious problem.
Even if there is an answer, isn't it silly that sessions are not enabled by default?!
We're running a fairly complex system (a full ERP system) via JBoss 3.0.6 w/Jetty and are not having any issues with regard to servlets and session management. We didn't have to do anything to make it work, and in fact in runs on different app servers identically.
Admittedly, in our web.xml file, we do specify a <session-config> directive (for session timeout), however that is all.
Our layout is probably significantly different from yours, in that we make use of a filter to handle session management (creating it, logging the user in, etc.) so the actual servlets themselves really don't care about whether there is or isn't a session-- they never get called if the user isn't authorized to be there in the first place, and they have all their persistent information passed into them via attributes.
The one problem we've had with Jetty, was solved very quickly (read hours), but we had to go to Jetty to get the answer. Have you posted your problem on the Jetty site at http://jetty.mortbay.org/jetty/resources.html (select mailing lists, then support) ?
It was all my fault. xdoclet put a <distributable/> at the beginning of web.xml. That caused the problem...