public class ServletBinding extends Binding
request.getSession(false) - can be null!
If response.getWriter() is called directly (without using out), then a write method call on 'sout' will not cause the IllegalStateException, but it will still be invalid. It is the responsibility of the user of this class, to not to mix these different usage styles. The same applies to calling response.getOutputStream() and using 'out' or 'html'.
| Constructor and Description |
|---|
ServletBinding(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context)
Initializes a servlet binding.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getVariable(java.lang.String name) |
java.util.Map |
getVariables() |
void |
setVariable(java.lang.String name,
java.lang.Object value)
Sets the value of the given variable
|
getProperty, setPropertygetMetaClass, invokeMethod, setMetaClasspublic ServletBinding(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context)
request - the HttpServletRequest objectresponse - the HttpServletRequest objectcontext - the ServletContext objectpublic void setVariable(java.lang.String name,
java.lang.Object value)
BindingsetVariable in class Bindingname - the name of the variable to setvalue - the new value for the given variablepublic java.util.Map getVariables()
getVariables in class Bindingpublic java.lang.Object getVariable(java.lang.String name)
getVariable in class Bindingname - the name of the variable to lookup