Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] I've just added authentication to my embedded jetty 9 web server. I'm using the JDBCLoginService and everything works fine. I now want to add a login page. But I can’t get it working: when the FormAuthenticator.validate() method is called, it's trying to get an HTTPsession and none is found. I've been trying to create Sessions but I've been unable to find the correct API. Can someone give me an example? This is my code: // the file server part ResourceHandler resource_handler = new ResourceHandler(); resource_handler.setDirectoriesListed(false); resource_handler.setResourceBase("www"); resource_handler.setDirectoriesListed(false); resource_handler.setWelcomeFiles(new String[]{ "html/dashboard.html" }); // the JSP part WebAppContext webAppContext = new WebAppContext(); webAppContext.setResourceBase("www"); webAppContext.setInitParameter("dirAllowed", "false"); webAppContext.addServlet(new ServletHolder(new QueryGlobals()), "/queries/globals"); webAppContext.addServlet(ne




Back to the top