本文整理了Java中org.eclipse.jetty.webapp.WebAppContext.setSessionHandler()
方法的一些代码示例,展示了WebAppContext.setSessionHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.setSessionHandler()
方法的具体详情如下:
包路径:org.eclipse.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:setSessionHandler
暂无
代码示例来源:origin: neo4j/neo4j
staticContext.setServer( getJetty() );
staticContext.setContextPath( mountPoint );
staticContext.setSessionHandler( sessionHandler );
staticContext.setInitParameter( "org.eclipse.jetty.servlet.Default.dirAllowed", "false" );
URL resourceLoc = getClass().getClassLoader().getResource( contentLocation );
代码示例来源:origin: org.eclipse.jetty.tests/test-sessions-common
public WebAppContext addWebAppContext(String warPath, String contextPath) throws Exception
{
WebAppContext context = new WebAppContext(_contexts, warPath, contextPath);
SessionHandler sessionHandler = newSessionHandler();
sessionHandler.setSessionIdManager(_sessionIdManager);
sessionHandler.setMaxInactiveInterval(_maxInactivePeriod);
context.setSessionHandler(sessionHandler);
return context;
}
代码示例来源:origin: org.nanoframework/nano-jetty-server
protected void applySessionHandler(final WebAppContext webapp) {
final String jettyCluster = context.getProperty(JettyRedisSession.JETTY_CLUSTER);
if (StringUtils.isNotBlank(jettyCluster)) {
setSessionIdManager(createRedisSessionIdManager(jettyCluster));
webapp.setSessionHandler(new SessionHandler(createRedisSessionManager(jettyCluster)));
}
}
代码示例来源:origin: com.github.sogyf/goja-jfinal
private void persistSession(WebAppContext webApp) {
String storeDir = getStoreDir();
SessionManager sm = webApp.getSessionHandler().getSessionManager();
if (sm instanceof HashSessionManager) {
((HashSessionManager)sm).setStoreDirectory(new File(storeDir));
return ;
}
HashSessionManager hsm = new HashSessionManager();
hsm.setStoreDirectory(new File(storeDir));
SessionHandler sh = new SessionHandler();
sh.setSessionManager(hsm);
webApp.setSessionHandler(sh);
}
代码示例来源:origin: org.neo4j.app/neo4j-server
staticContext.setServer( getJetty() );
staticContext.setContextPath( mountPoint );
staticContext.setSessionHandler( sessionHandler );
staticContext.setInitParameter( "org.eclipse.jetty.servlet.Default.dirAllowed", "false" );
URL resourceLoc = getClass().getClassLoader().getResource( contentLocation );
代码示例来源:origin: org.visallo/visallo-jetty-server
webAppContext.setContextPath(this.getContextPath());
webAppContext.setWar(getWebAppDir().getAbsolutePath());
webAppContext.setSessionHandler(new HashSessionManager().getSessionHandler());
webAppContext.setMaxFormContentSize(MAX_FORM_CONTENT_SIZE);
代码示例来源:origin: apache/tapestry-5
private JettyRunner configureClusteredJetty(String name, int port) throws Exception
{
JettyRunner runner = new JettyRunner();
runner.configure("src/test/cluster", "", port, port + 100);
JDBCSessionIdManager idMgr = new JDBCSessionIdManager(runner.getServer());
idMgr.setWorkerName(name);
idMgr.setDriverInfo("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:clustertest");
Server server = runner.getServer();
server.setSessionIdManager(idMgr);
WebAppContext wac = (WebAppContext) server.getHandler();
JDBCSessionManager jdbcMgr = new JDBCSessionManager();
jdbcMgr.setIdManager(server.getSessionIdManager());
// force the session to be read from the database with no delay
// This is an incorrectly documented feature.
jdbcMgr.setSaveInterval(0);
wac.setSessionHandler(new SessionHandler(jdbcMgr));
wac.getServletContext().setInitParameter("cluster.name", name);
runner.start();
return runner;
}
内容来源于网络,如有侵权,请联系作者删除!