|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.lang.Binding
groovy.servlet.ServletBinding
public class ServletBinding
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'.
Constructor Summary | |
---|---|
ServletBinding(HttpServletRequest request,
HttpServletResponse response,
ServletContext context)
Initializes a servlet binding. |
Method Summary | |
---|---|
void |
forward(String path)
|
Object |
getVariable(String name)
|
Map |
getVariables()
|
void |
include(String path)
|
void |
redirect(String location)
|
void |
setVariable(String name,
Object value)
Sets the value of the given variable |
Methods inherited from class groovy.lang.Binding |
---|
getProperty, setProperty |
Methods inherited from class groovy.lang.GroovyObjectSupport |
---|
getMetaClass, invokeMethod, setMetaClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServletBinding(HttpServletRequest request, HttpServletResponse response, ServletContext context)
request
- the HttpServletRequest objectresponse
- the HttpServletRequest objectcontext
- the ServletContext objectMethod Detail |
---|
public void setVariable(String name, Object value)
Binding
setVariable
in class Binding
name
- the name of the variable to setvalue
- the new value for the given variablepublic Map getVariables()
getVariables
in class Binding
public Object getVariable(String name)
getVariable
in class Binding
name
- the name of the variable to lookup
public void forward(String path) throws ServletException, IOException
ServletException
IOException
public void include(String path) throws ServletException, IOException
ServletException
IOException
public void redirect(String location) throws IOException
IOException
|
Copyright © 2003-2009 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |