1 18 19 package org.apache.activemq.web; 20 21 import java.io.IOException ; 22 23 import javax.servlet.Filter ; 24 import javax.servlet.FilterChain ; 25 import javax.servlet.FilterConfig ; 26 import javax.servlet.ServletException ; 27 import javax.servlet.ServletRequest ; 28 import javax.servlet.ServletResponse ; 29 import javax.servlet.http.HttpServletRequest ; 30 import javax.servlet.http.HttpSession ; 31 32 33 34 38 public class SessionFilter implements Filter { 39 40 public void init(FilterConfig filterConfig) throws ServletException { 41 } 42 43 public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException , ServletException { 44 HttpSession session=((HttpServletRequest )request).getSession(true); 45 chain.doFilter(request,response); 48 } 49 50 public void destroy() { 51 } 52 53 } 54 | Popular Tags |