1 package com.opensymphony.webwork.dispatcher; 2 3 import com.opensymphony.webwork.config.ServletContextSingleton; 4 import org.apache.commons.logging.Log; 5 import org.apache.commons.logging.LogFactory; 6 7 import javax.servlet.Filter ; 8 import javax.servlet.FilterConfig ; 9 import javax.servlet.ServletContext ; 10 import javax.servlet.ServletException ; 11 import javax.servlet.http.HttpSession ; 12 13 14 31 public class FilterDispatcherCompatWeblogic61 32 extends FilterDispatcher 33 implements Filter { 34 37 private static Log log = 38 LogFactory.getLog(FilterDispatcherCompatWeblogic61.class); 39 40 52 public void setFilterConfig(FilterConfig filterConfig) { 53 try { 54 init(filterConfig); 55 } catch (ServletException se) { 56 log.error("Couldn't set the filter configuration in this filter", se); 57 } 58 59 ServletContextSingleton singleton = ServletContextSingleton.getInstance(); 60 singleton.setServletContext(filterConfig.getServletContext()); 61 } 62 63 75 protected ServletContext getServletContext(HttpSession session) { 76 ServletContextSingleton singleton = 77 ServletContextSingleton.getInstance(); 78 return singleton.getServletContext(); 79 } 80 81 88 public FilterConfig getFilterConfig() { 89 return super.getFilterConfig(); 90 } 91 } 92 | Popular Tags |