1 package com.opensymphony.webwork.config; 2 3 import javax.servlet.ServletContext ; 4 5 21 public class ServletContextSingleton { 22 26 private ServletContext servletContext; 27 28 31 private static ServletContextSingleton singleton; 32 33 37 private ServletContextSingleton() { 38 } 39 40 48 public static ServletContextSingleton getInstance() { 49 if (singleton == null) { 50 singleton = new ServletContextSingleton(); 51 } 52 return singleton; 53 } 54 55 58 public ServletContext getServletContext() { 59 return servletContext; 60 } 61 62 65 public void setServletContext(ServletContext context) { 66 servletContext = context; 67 } 68 69 } 70 | Popular Tags |