|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.servlet.FrameworkServlet org.codehaus.groovy.grails.web.pages.GroovyPagesServlet
public class GroovyPagesServlet extends FrameworkServlet
NOTE: Based on work done by on the GSP standalone project (https://gsp.dev.java.net/)
Main servlet class. Example usage in web.xml:
Field Summary | |
---|---|
static java.lang.String |
EXCEPTION_MODEL_KEY
|
static java.lang.String |
SERVLET_INSTANCE
|
Constructor Summary | |
GroovyPagesServlet()
|
Method Summary | |
---|---|
protected java.io.Writer
|
createResponseWriter(HttpServletResponse response)
Creates a response writer for the given response object |
protected void
|
doService(HttpServletRequest request, HttpServletResponse response)
|
protected void
|
handleException(HttpServletRequest request, HttpServletResponse response, java.lang.Exception exception, java.io.Writer out, GroovyPagesTemplateEngine engine)
Performs exception handling by attempting to render the Errors view |
protected void
|
initFrameworkServlet()
|
protected void
|
renderPageWithEngine(GroovyPagesTemplateEngine engine, HttpServletRequest request, HttpServletResponse response, groovy.text.Template template)
Attempts to render the page with the given arguments |
Field Detail |
---|
public static final java.lang.String EXCEPTION_MODEL_KEY
public static final java.lang.String SERVLET_INSTANCE
Constructor Detail |
---|
public GroovyPagesServlet()
Method Detail |
---|
protected java.io.Writer createResponseWriter(HttpServletResponse response)
response
- The HttpServletResponse
@Override protected void doService(HttpServletRequest request, HttpServletResponse response)
protected void handleException(HttpServletRequest request, HttpServletResponse response, java.lang.Exception exception, java.io.Writer out, GroovyPagesTemplateEngine engine)
exception
- The exception that occuredout
- The Writerengine
- The GSP engine
@Override protected void initFrameworkServlet()
protected void renderPageWithEngine(GroovyPagesTemplateEngine engine, HttpServletRequest request, HttpServletResponse response, groovy.text.Template template)
engine
- The GroovyPagesTemplateEngine to userequest
- The HttpServletRequestresponse
- The HttpServletResponsetemplate
- The template
Groovy Documentation