public class GroovyPagesServlet extends FrameworkServlet implements PluginManagerAware
NOTE: Based on work done by on the GSP standalone project (https://gsp.dev.java.net/) Main servlet class. Example usage in web.xml:
<servlet>
<servlet-name>GroovyPagesServlet</servlet-name>
<servlet-class>GroovyPagesServlet</servlet-class>
<init-param>
<param-name>showSource</param-name>
<param-value>1</param-value>
<description>
Allows developers to view the intermediade source code, when they pass
a showSource argument in the URL (eg /edit/list?showSource=true.
</description>
</init-param>
</servlet>
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
SERVLET_INSTANCE |
The size of the buffer used when formulating the response |
Constructor and description |
---|
GroovyPagesServlet
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected ServletRequestAttributes |
buildRequestAttributes(HttpServletRequest request, HttpServletResponse response, RequestAttributes previousAttributes) |
|
protected GSPResponseWriter |
createResponseWriter(HttpServletResponse response) Creates a response writer for the given response object |
|
protected void |
doService(HttpServletRequest request, HttpServletResponse response) |
|
protected GroovyPageScriptSource |
findPageInBinaryPlugins(java.lang.String pageName) |
|
protected java.lang.String |
getCurrentRequestUri(HttpServletRequest request) |
|
public GroovyPagesTemplateEngine |
getGroovyPagesTemplateEngine() |
|
protected void |
initFrameworkServlet() |
|
protected boolean |
isSecurePath(java.lang.String pageName) |
|
protected void |
renderPageWithEngine(GroovyPagesTemplateEngine engine, HttpServletRequest request, HttpServletResponse response, GroovyPageScriptSource scriptSource) Attempts to render the page with the given arguments |
|
protected void |
sendNotFound(HttpServletResponse response, java.lang.String pageName) |
|
public void |
setGroovyPagesTemplateEngine(GroovyPagesTemplateEngine groovyPagesTemplateEngine) |
|
public void |
setPluginManager(GrailsPluginManager pluginManager) |
The size of the buffer used when formulating the response
Creates a response writer for the given response object
response
- The HttpServletResponseAttempts to render the page with the given arguments
engine
- The GroovyPagesTemplateEngine to userequest
- The HttpServletRequestresponse
- The HttpServletResponsescriptSource
- The template