Groovy Documentation

## org.codehaus.groovy.grails.web.servlet
[Java] Class DefaultGrailsApplicationAttributes

    java.lang.Object
      org.codehaus.groovy.grails.web.servlet.DefaultGrailsApplicationAttributes

All Implemented Interfaces:
  GrailsApplicationAttributes

    public class DefaultGrailsApplicationAttributes

Holds knowledge about how to obtain certain attributes from either the ServletContext or the HttpServletRequest instance.

Authors:
  Graeme Rocher

See Also:
  GrailsWebRequest

Since:
  0.3

Constructor Summary
`DefaultGrailsApplicationAttributes(ServletContext context)`

Method Summary
`ApplicationContext` | `getApplicationContext()`
`java.lang.String` | `getApplicationUri(ServletRequest request)` @deprecated Use instead
`groovy.lang.GroovyObject` | `getController(ServletRequest request)`
`java.lang.String` | `getControllerActionUri(ServletRequest request)`
`java.lang.String` | `getControllerUri(ServletRequest request)`
`Errors` | `getErrors(ServletRequest request)`
`FlashScope` | `getFlashScope(ServletRequest request)`
`GrailsApplication` | `getGrailsApplication()`
`GroovyPagesUriService` | `getGroovyPagesUriService()`
`MessageSource` | `getMessageSource()`
`java.lang.String` | `getNoSuffixViewURI(groovy.lang.GroovyObject controller, java.lang.String viewName)`
`java.io.Writer` | `getOut(HttpServletRequest request)`
`GroovyPagesTemplateEngine` | `getPagesTemplateEngine()`
`java.lang.String` | `getPluginContextPath(HttpServletRequest request)`
`ServletContext` | `getServletContext()`
`groovy.lang.GroovyObject` | `getTagLibraryForTag(HttpServletRequest request, HttpServletResponse response, java.lang.String tagName)`
`groovy.lang.GroovyObject` | `getTagLibraryForTag(HttpServletRequest request, HttpServletResponse response, java.lang.String tagName, java.lang.String namespace)`
`java.lang.String` | `getTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName)`
`java.lang.String` | `getTemplateUri(java.lang.CharSequence templateName, ServletRequest request)`
`java.lang.String` | `getViewUri(java.lang.String viewName, HttpServletRequest request)`
`void` | `setOut(HttpServletRequest request, java.io.Writer out2)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### DefaultGrailsApplicationAttributes

    public DefaultGrailsApplicationAttributes(ServletContext context)

Method Detail

### getApplicationContext

    public ApplicationContext getApplicationContext()

### getApplicationUri

    @Deprecated
    public java.lang.String getApplicationUri(ServletRequest request)

  deprecated:
    Use instead
  Parameters:
    `request` - The Servlet Reqest
  Returns:
    The Application URI

### getController

    public groovy.lang.GroovyObject getController(ServletRequest request)

### getControllerActionUri

    public java.lang.String getControllerActionUri(ServletRequest request)

### getControllerUri

    public java.lang.String getControllerUri(ServletRequest request)

### getErrors

    public Errors getErrors(ServletRequest request)

### getFlashScope

    public FlashScope getFlashScope(ServletRequest request)

### getGrailsApplication

    public GrailsApplication getGrailsApplication()

### getGroovyPagesUriService

    public GroovyPagesUriService getGroovyPagesUriService()

### getMessageSource

    public MessageSource getMessageSource()

### getNoSuffixViewURI

    public java.lang.String getNoSuffixViewURI(groovy.lang.GroovyObject controller, java.lang.String viewName)

### getOut

    public java.io.Writer getOut(HttpServletRequest request)

### getPagesTemplateEngine

    public GroovyPagesTemplateEngine getPagesTemplateEngine()

### getPluginContextPath

    public java.lang.String getPluginContextPath(HttpServletRequest request)

### getServletContext

    public ServletContext getServletContext()

### getTagLibraryForTag

    public groovy.lang.GroovyObject getTagLibraryForTag(HttpServletRequest request, HttpServletResponse response, java.lang.String tagName)

### getTagLibraryForTag

    public groovy.lang.GroovyObject getTagLibraryForTag(HttpServletRequest request, HttpServletResponse response, java.lang.String tagName, java.lang.String namespace)

### getTemplateURI

    public java.lang.String getTemplateURI(groovy.lang.GroovyObject controller, java.lang.String templateName)

### getTemplateUri

    public java.lang.String getTemplateUri(java.lang.CharSequence templateName, ServletRequest request)

### getViewUri

    public java.lang.String getViewUri(java.lang.String viewName, HttpServletRequest request)

### setOut

    public void setOut(HttpServletRequest request, java.io.Writer out2)

Groovy Documentation