Methods Summary |
---|
public java.lang.Object | getAttribute(java.lang.String name)Override the getAttribute() method of the wrapped request.
// ------------------------------------------------- ServletRequest Methods
synchronized (attributes) {
return (attributes.get(name));
}
|
public java.util.Enumeration | getAttributeNames()Override the getAttributeNames() method of the wrapped
request.
synchronized (attributes) {
return (new Enumerator(attributes.keySet()));
}
|
protected boolean | isSpecial(java.lang.String name)Is this attribute name one of the special ones that is added only for
included servlets?
for (int i = 0; i < specials.length; i++) {
if (specials[i].equals(name))
return (true);
}
return (false);
|
public void | removeAttribute(java.lang.String name)Override the removeAttribute() method of the
wrapped request.
synchronized (attributes) {
attributes.remove(name);
if (!isSpecial(name))
getRequest().removeAttribute(name);
}
|
public void | setAttribute(java.lang.String name, java.lang.Object value)Override the setAttribute() method of the
wrapped request.
synchronized (attributes) {
attributes.put(name, value);
if (!isSpecial(name))
getRequest().setAttribute(name, value);
}
|
public void | setRequest(javax.servlet.ServletRequest request)Set the request that we are wrapping.
super.setRequest(request);
// Initialize the attributes for this request
synchronized (attributes) {
attributes.clear();
Enumeration names = request.getAttributeNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
Object value = request.getAttribute(name);
attributes.put(name, value);
}
}
|