public class FreemarkerRequest extends AbstractViewRequest
FORCE_INCLUDE_ATTRIBUTE_NAME
APPLICATION_SCOPE, REQUEST_SCOPE
Constructor and Description |
---|
FreemarkerRequest(DispatchRequest enclosedRequest,
freemarker.core.Environment env)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static FreemarkerRequest |
createServletFreemarkerRequest(ApplicationContext applicationContext,
freemarker.core.Environment env)
Creates a new Freemarker request.
|
List<String> |
getAvailableScopes()
Returns all available scopes.
|
Map<String,Object> |
getContext(String scope)
Returns a context map, given the scope name.
|
freemarker.core.Environment |
getEnvironment()
Returns the environment object.
|
Map<String,Object> |
getPageScope()
Returns the page scope.
|
PrintWriter |
getPrintWriter()
Returns a print writer to be used to write directly in the response.
|
Locale |
getRequestLocale()
Return the preferred Locale in which the client will accept content.
|
Writer |
getWriter()
Returns a writer to be used to write directly in the response.
|
dispatch, doInclude, include
getApplicationContext, getHeader, getHeaderValues, getOutputStream, getParam, getParamValues, getResponseHeaders, getWrappedRequest, isResponseCommitted, isUserInRole, setContentType
isForceInclude, setForceInclude
public FreemarkerRequest(DispatchRequest enclosedRequest, freemarker.core.Environment env)
enclosedRequest
- The request that exposes non-FreeMarker specific propertiesenv
- The FreeMarker environment.public static FreemarkerRequest createServletFreemarkerRequest(ApplicationContext applicationContext, freemarker.core.Environment env)
applicationContext
- The application context.env
- The Freemarker's environment object.public freemarker.core.Environment getEnvironment()
public Locale getRequestLocale()
getRequestLocale
in interface Request
getRequestLocale
in class DispatchRequestWrapper
org.apache.tiles.locale.LocaleResolver
to implement strategies to
resolve locales.public Map<String,Object> getPageScope()
public List<String> getAvailableScopes()
DispatchRequestWrapper
getAvailableScopes
in interface Request
getAvailableScopes
in class DispatchRequestWrapper
public PrintWriter getPrintWriter()
getPrintWriter
in interface Request
getPrintWriter
in class DispatchRequestWrapper
public Writer getWriter()
getWriter
in interface Request
getWriter
in class DispatchRequestWrapper
public Map<String,Object> getContext(String scope)
DispatchRequestWrapper
getContext
in interface Request
getContext
in class DispatchRequestWrapper
scope
- The name of the scope.Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.