JspServletContext.java
3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* javax.servlet.RequestDispatcher
* javax.servlet.Servlet
* javax.servlet.ServletContext
* javax.servlet.ServletException
*/
package com.day.crx.explorer.impl;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
public class JspServletContext
implements ServletContext {
private final ServletContext delegatee;
private final Map<String, Object> attributes = new HashMap<String, Object>();
public JspServletContext(ServletContext delegatee) {
this.delegatee = delegatee;
}
public ServletContext getContext(String uripath) {
return this.delegatee.getContext(uripath);
}
public int getMajorVersion() {
return this.delegatee.getMajorVersion();
}
public int getMinorVersion() {
return this.delegatee.getMinorVersion();
}
public String getMimeType(String file) {
return this.delegatee.getMimeType(file);
}
public Set getResourcePaths(String path) {
return this.delegatee.getResourcePaths(path);
}
public URL getResource(String path) throws MalformedURLException {
return this.delegatee.getResource(path);
}
public InputStream getResourceAsStream(String path) {
return this.delegatee.getResourceAsStream(path);
}
public RequestDispatcher getRequestDispatcher(String path) {
return this.delegatee.getRequestDispatcher(path);
}
public RequestDispatcher getNamedDispatcher(String name) {
return this.delegatee.getNamedDispatcher(name);
}
public Servlet getServlet(String name) throws ServletException {
return this.delegatee.getServlet(name);
}
public Enumeration getServlets() {
return this.delegatee.getServlets();
}
public Enumeration getServletNames() {
return this.delegatee.getServletNames();
}
public void log(String msg) {
this.delegatee.log(msg);
}
public void log(Exception exception, String msg) {
this.delegatee.log(exception, msg);
}
public void log(String message, Throwable throwable) {
this.delegatee.log(message, throwable);
}
public String getRealPath(String path) {
return this.delegatee.getRealPath(path);
}
public String getServerInfo() {
return this.delegatee.getServerInfo();
}
public String getInitParameter(String name) {
return this.delegatee.getInitParameter(name);
}
public Enumeration getInitParameterNames() {
return this.delegatee.getInitParameterNames();
}
public Object getAttribute(String name) {
return this.attributes.get(name);
}
public Enumeration getAttributeNames() {
return Collections.enumeration(this.attributes.keySet());
}
public void setAttribute(String name, Object object) {
this.attributes.put(name, object);
}
public void removeAttribute(String name) {
this.attributes.remove(name);
}
public String getServletContextName() {
return this.delegatee.getServletContextName();
}
}