|
Groovy 1.7.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.lang.Binding
groovy.servlet.ServletBinding
class ServletBinding extends Binding
Servlet-specific binding extension to lazy load the writer or the output stream from the response.
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.getOoutputStream() and using 'out' or 'html'.
Nested Class Summary | |
---|---|
class |
ServletBinding.InvalidOutputStream
A OutputStream dummy that will throw a GroovyBugError for any write method call to it. |
class |
ServletBinding.ServletOutput
A class to manage the response output stream and writer. |
Constructor Summary | |
ServletBinding()
|
Method Summary | |
---|---|
def
|
ServletBinding(HttpServletRequest request, HttpServletResponse response, ServletContext context)
Initializes a servlet binding. |
void
|
forward(String path)
|
Object
|
getVariable(String name)
|
Map
|
getVariables()
|
void
|
include(String path)
|
void
|
redirect(String location)
|
void
|
setVariable(String name, Object value)
|
Methods inherited from class Binding | |
---|---|
getProperty, getVariable, getVariables, setProperty, setVariable |
Methods inherited from class GroovyObjectSupport | |
---|---|
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty |
Methods inherited from class Object | |
---|---|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Constructor Detail |
---|
ServletBinding()
Method Detail |
---|
public def ServletBinding(HttpServletRequest request, HttpServletResponse response, ServletContext context)
public void forward(String path)
@Override public Object getVariable(String name)
@Override public Map getVariables()
public void include(String path)
public void redirect(String location)
@Override public void setVariable(String name, Object value)
Copyright © 2003-2009 The Codehaus. All rights reserved.