Greg,

Thank you for the advice. I modified the code to become:

public static void main(String[] args) throws Exception {
 // Create the server
 Server server = new Server(12043);

// Add ServletContextHandler
ServletContextHandler servletContextHandler = new ServletContextHandler(
                                ServletContextHandler.SESSIONS);
servletContextHandler.setContextPath("/");

server.setHandler(servletContextHandler);

// Add BaseServlet
ServletHolder holder = new ServletHolder(new BaseServlet());
servletContextHandler.addServlet(holder, "/*");

// Start the server
server.start();
System.out.println("SERVER DUMP AFTER START" + server.dump());

server.join();

}

But I am still not seeing the session information:

Request = Request(GET //localhost:12043/)@968bbe8
Response = HTTP/1.1 200
Date: Wed, 18 May 2016 13:00:04 GMT


Create = false
no session

Thanks!

Jennifer



From:   Greg Wilkins <[email protected]>
To:     JETTY user mailing list <[email protected]>
Date:   05/17/2016 07:35 PM
Subject:        Re: [jetty-users] Help with Null Embedded Jetty Server Session
Sent by:        [email protected]





Jennifer,

a quick glance at your code reveals nothing obviously wrong???   I'll try
to get time to look in more detail later, but meanwhile can you try again
but remove all the code that is setting up a SessionManager and
SessionIdManager and instead just rely on the defaults that will be created
when you pass SESSION to the ServletContextHandler.

If that works, then I would try getting rather than setting the session
handler and then injecting configuration.

cheers







--
Greg Wilkins <[email protected]> CTO http://webtide.com
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to