Simple ServletContext implementation without HTTP-specific methods.
| 68 | * Simple <code>ServletContext</code> implementation without HTTP-specific methods. |
| 69 | */ |
| 70 | public class JspCServletContext implements ServletContext { |
| 71 | |
| 72 | |
| 73 | // ----------------------------------------------------- Instance Variables |
| 74 | |
| 75 | |
| 76 | /** |
| 77 | * Servlet context attributes. |
| 78 | */ |
| 79 | private final Map<String,Object> myAttributes; |
| 80 | |
| 81 | |
| 82 | /** |
| 83 | * Servlet context initialization parameters. |
| 84 | */ |
| 85 | private final Map<String,String> myParameters = new ConcurrentHashMap<>(); |
| 86 | |
| 87 | |
| 88 | /** |
| 89 | * The log writer we will write log messages to. |
| 90 | */ |
| 91 | private final PrintWriter myLogWriter; |
| 92 | |
| 93 | |
| 94 | /** |
| 95 | * The base URL (document root) for this context. |
| 96 | */ |
| 97 | private final URL myResourceBaseURL; |
| 98 | |
| 99 | |
| 100 | /** |
| 101 | * Merged web.xml for the application. |
| 102 | */ |
| 103 | private final WebXml webXml; |
| 104 | |
| 105 | |
| 106 | private List<URL> resourceJARs; |
| 107 | |
| 108 | |
| 109 | private final JspConfigDescriptor jspConfigDescriptor; |
| 110 | |
| 111 | |
| 112 | /** |
| 113 | * Web application class loader. |
| 114 | */ |
| 115 | private final ClassLoader loader; |
| 116 | |
| 117 | |
| 118 | // ----------------------------------------------------------- Constructors |
| 119 | |
| 120 | /** |
| 121 | * Create a new instance of this ServletContext implementation. |
| 122 | * |
| 123 | * @param aLogWriter PrintWriter which is used for <code>log()</code> calls |
| 124 | * @param aResourceBaseURL Resource base URL |
| 125 | * @param classLoader Class loader for this {@link ServletContext} |
| 126 | * @param validate Should a validating parser be used to parse web.xml? |
| 127 | * @param blockExternal Should external entities be blocked when parsing web.xml? |
nothing calls this directly
no outgoing calls
no test coverage detected