## 6.2.1.1 Variables and Scopes

Within the `<% %>` brackets you can of course declare variables:

    <% now = new Date() %>

And then re-use those variables further down the page:

    <%=now%>

However, within the scope of a GSP there are a number of pre-defined variables including:

- `application` - The javax.servlet.ServletContext instance
- `applicationContext` The Spring ApplicationContext instance
- `flash` - The flash object
- `grailsApplication` - The api:org.codehaus.groovy.grails.commons.GrailsApplication instance
- `out` - The response writer for writing to the output stream
- `params` - The params object for retrieving request parameters
- `request` - The HttpServletRequest instance
- `response` - The HttpServletResponse instance
- `session` - The HttpSession instance
- `webRequest` - The api:org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequest instance