com.aoindustries.website.SessionRequestWrapper Maven / Gradle / Ivy
/*
* aoweb-struts-core - Core API for legacy Struts-based site framework with AOServ Platform control panels.
* Copyright (C) 2007-2009, 2015, 2016 AO Industries, Inc.
* [email protected]
* 7262 Bull Pen Cir
* Mobile, AL 36695
*
* This file is part of aoweb-struts-core.
*
* aoweb-struts-core is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* aoweb-struts-core is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with aoweb-struts-core. If not, see .
*/
package com.aoindustries.website;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpSession;
/**
* @author AO Industries, Inc.
*/
public class SessionRequestWrapper extends HttpServletRequestWrapper {
public SessionRequestWrapper(HttpServletRequest request) {
super(request);
}
@Override
public HttpSession getSession() {
HttpSession session = super.getSession();
if(session!=null) {
if(!(session instanceof FilteredHttpSession)) session = new FilteredHttpSession(session);
}
return session;
}
@Override
public HttpSession getSession(boolean create) {
HttpSession session = super.getSession(create);
if(session!=null) {
if(!(session instanceof FilteredHttpSession)) session = new FilteredHttpSession(session);
}
return session;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy