public final class NutSessionListener extends Object implements javax.servlet.http.HttpSessionListener
启用的方法是在 web.xml 中,添加下面的代码:
<listener> <listerner-class>org.nutz.mvc.NutSessionListener</listerner-class> </listener>
Modifier and Type | Field and Description |
---|---|
static boolean |
isSessionScopeEnable
如果你在 web.xml 配置了这个监听器,那么我们理解你的意图就是要自动创建 session
否则你就不需要自动创建 session。 在 Nutz 默认的 ModuleProcessor 里,会根据这个变量来决定是否自动创建session的 |
Constructor and Description |
---|
NutSessionListener() |
Modifier and Type | Method and Description |
---|---|
void |
sessionCreated(javax.servlet.http.HttpSessionEvent se) |
void |
sessionDestroyed(javax.servlet.http.HttpSessionEvent se) |
public static boolean isSessionScopeEnable
public void sessionCreated(javax.servlet.http.HttpSessionEvent se)
sessionCreated
in interface javax.servlet.http.HttpSessionListener
public void sessionDestroyed(javax.servlet.http.HttpSessionEvent se)
sessionDestroyed
in interface javax.servlet.http.HttpSessionListener
Copyright © 2017. All rights reserved.