Apache Portals Bridges provides a neat solution (I wrote myself ) to "scope" HttpSession attributes for a specific Portlet window when it dispatches to a servlet.
This solution is needed for transparent "bridging" of existing web development frameworks like Struts, or Wicket (which I'm currently working on) to portlets.
So far, this proxy solution works like a charm and I've tested it successfully on Tomcat, Websphere, WebLogic and GlassFish.
Only with Jetty it fails
The reason is simple: AbstractSessionManager uses direct type casting of a provided HttpSession parameter to its inner Session class, so when a proxied version is passed in a ClassCastException is the result.
But the solution is also very simple, small and completely non-intrusive and I've attached a patch for it.
It adds a new interface JettySession with one method: JettySession getJettySession() and applies it to AbstractSessionManager.Session.
That interface allows Jetty to always get back to its own/underlying Session class.
With this patch applied, I can now run Jetspeed-2.1.1 (trunk) fully on Jetty 6.1.4 and we're planning to provide a Jetty based Jetspeed-2 demo installer with the imminent 2.1.1 release including neat hot deployment of war support.. But we will need to provide our own patched version of Jetty until this issue can be resolved.
(NB: I'm also a Jetspeed-2 committer)
So I would very much appreciate if you can review and consider this patch for inclusion in the next version of Jetty so we won't need to use a patched version of Jetty for running Jetspeed-2.