Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326675

Summary: Osgi Http Service does not create SessionHandler
Product: [RT] Jetty Reporter: Jan Rosczak <jan.rosczak>
Component: osgiAssignee: Hugues Malphettes <hmalphettes>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gregw, jetty-inbox, mgorovoy, tbecker
Version: 7.1.5   
Target Milestone: 7.2.x   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jan Rosczak CLA 2010-09-30 10:31:00 EDT
The context.xml for the Osgi Http Service does not set a session handler on the ServletContextHandler instance. Therefore no session manager is available when a web application needs a new session, resulting in an IllegalArgumentException.
Comment 1 Greg Wilkins CLA 2010-12-02 10:18:17 EST
Hugues,

we want Thomas to learn about the OSGi integration.  Is this an issue he could start looking at?
Comment 2 Hugues Malphettes CLA 2010-12-02 13:21:12 EST
(In reply to comment #1)
> Hugues,
> 
> we want Thomas to learn about the OSGi integration.  Is this an issue he could
> start looking at?
Sure sorry I let this one goes done the pile: I think we discussed it on the mailing list fixed it there:
http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk/jetty-osgi/jetty-osgi-httpservice/contexts/httpservice.xml

<Configure class="org.eclipse.jetty.servlet.ServletContextHandler">
<!-- this configures the servlet session manager -->
  <Set name="SessionHandler">
    <New class="org.eclipse.jetty.server.session.SessionHandler"/>
  </Set>
<!-- this servlet provides the OSGi HTTP Service once it is initialized -->
  <Call name="addServlet">
    <Arg>org.eclipse.jetty.osgi.httpservice.HttpServiceServletX</Arg>
    <Arg>/*</Arg>
    <Set name="InitOrder">0</Set>
  </Call>
</Configure>
Comment 3 Hugues Malphettes CLA 2011-01-12 04:15:11 EST
This was fixed a while ago when the session handler was added to the context file in charge of creating the servlet for the http service:
http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk/jetty-osgi/jetty-osgi-httpservice/contexts/httpservice.xml