1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.portals.bridges.struts;
17
18 import java.util.Enumeration;
19
20 import javax.servlet.ServletConfig;
21 import javax.servlet.ServletContext;
22
23
24 /***
25 * PortletServletConfigImpl
26 *
27 * @author <a href="mailto:ate@douma.nu">Ate Douma</a>
28 * @version $Id: PortletServletConfigImpl.java 187139 2004-07-30 00:16:41 +0200 (Fri, 30 Jul 2004) ate $
29 */
30 class PortletServletConfigImpl implements ServletConfig
31 {
32 private ServletConfig config;
33 private ServletContext context;
34 public PortletServletConfigImpl(ServletConfig config)
35 {
36 this.config = config;
37 }
38 public String getInitParameter(String arg0)
39 {
40 return config.getInitParameter(arg0);
41 }
42 public Enumeration getInitParameterNames()
43 {
44 return config.getInitParameterNames();
45 }
46 public synchronized ServletContext getServletContext()
47 {
48 if (context == null)
49 context = new PortletServletContextImpl(config.getServletContext());
50 return context;
51 }
52 public String getServletName()
53 {
54 return config.getServletName();
55 }
56 public String toString()
57 {
58 return config.toString();
59 }
60 }