All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nutz.mvc.impl.session.NopSessionProvider Maven / Gradle / Ivy

Go to download

Nutz, which is a collections of lightweight frameworks, each of them can be used independently

There is a newer version: 1.r.72
Show newest version
package org.nutz.mvc.impl.session;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * 使用容器原生的Session实现 == 等于什么都没做.
 *
 */
public class NopSessionProvider extends AbstractSessionProvider {

	public HttpSession createSession(HttpServletRequest req,
									 HttpServletResponse resp,
									 ServletContext servletContext) {
		//使用容器原生的Session实现 == 等于什么都没做
		return req.getSession(true);
	}

	public HttpSession getExistSession(HttpServletRequest req, HttpServletResponse resp, ServletContext servletContext) {
	    return req.getSession(false);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy