public final class JspUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COMPOSE_STACK_ATTRIBUTE_NAME
The name of the attribute that will contain the compose stack.
|
Modifier and Type | Method and Description |
---|---|
static void |
evaluateFragment(javax.servlet.jsp.tagext.JspFragment fragment)
Evaluates the fragment (invokes it with a null Writer) if not null.
|
static String |
evaluateFragmentAsString(javax.servlet.jsp.tagext.JspFragment fragment)
Evaluates the fragment and returns its content as a string.
|
static ArrayStack<Object> |
getComposeStack(javax.servlet.jsp.JspContext context)
Returns the compose stack, that is used by the tags to compose
definitions, attributes, etc.
|
static TilesContainer |
getContainer(javax.servlet.jsp.JspContext context)
Returns the default Tiles container.
|
static TilesContainer |
getContainer(javax.servlet.jsp.JspContext context,
String key)
Returns a specific Tiles container.
|
static TilesContainer |
getCurrentContainer(javax.servlet.jsp.JspContext context)
Returns the current container that has been set, or the default one.
|
static int |
getScope(String scopeName)
Converts the scope name into its corresponding PageContext constant value.
|
static boolean |
isForceInclude(javax.servlet.jsp.JspContext context)
Returns true if forced include of the result is needed.
|
static void |
setContainer(javax.servlet.jsp.JspContext context,
TilesContainer container)
Configures the default container to be used in the application.
|
static void |
setContainer(javax.servlet.jsp.JspContext context,
TilesContainer container,
String key)
Configures the container to be used in the application.
|
static void |
setCurrentContainer(javax.servlet.jsp.JspContext context,
String key)
Sets the current container to use in web pages.
|
static void |
setCurrentContainer(javax.servlet.jsp.JspContext context,
TilesContainer container)
Sets the current container to use in web pages.
|
static void |
setForceInclude(javax.servlet.jsp.JspContext context,
boolean forceInclude)
Sets the option that enables the forced include of the response.
|
public static final String COMPOSE_STACK_ATTRIBUTE_NAME
public static boolean isForceInclude(javax.servlet.jsp.JspContext context)
context
- The page context.true
the include operation must be forced.public static void setForceInclude(javax.servlet.jsp.JspContext context, boolean forceInclude)
context
- The page context.forceInclude
- If true
the include operation must be
forced.public static TilesContainer getContainer(javax.servlet.jsp.JspContext context)
context
- The page context to use.public static TilesContainer getContainer(javax.servlet.jsp.JspContext context, String key)
context
- The page context to use.key
- The key under which the container is stored. If null, the
default container will be returned.public static void setContainer(javax.servlet.jsp.JspContext context, TilesContainer container)
context
- The page context object to use.container
- The container object to set.public static void setContainer(javax.servlet.jsp.JspContext context, TilesContainer container, String key)
context
- The page context object to use.container
- The container object to set.key
- The key under which the container will be stored.public static void setCurrentContainer(javax.servlet.jsp.JspContext context, String key)
context
- The page context to use.key
- The key under which the container is stored.public static void setCurrentContainer(javax.servlet.jsp.JspContext context, TilesContainer container)
context
- The page context to use.container
- The container to use as the current container.public static TilesContainer getCurrentContainer(javax.servlet.jsp.JspContext context)
context
- The page context to use.public static ArrayStack<Object> getComposeStack(javax.servlet.jsp.JspContext context)
context
- The page context.public static int getScope(String scopeName) throws TilesJspException
scopeName
- Can be "page", "request", "session", or "application" in any
case.TilesJspException
- if the scopeName is not a valid name.public static void evaluateFragment(javax.servlet.jsp.tagext.JspFragment fragment) throws javax.servlet.jsp.JspException, IOException
fragment
- The fragment to evaluate.javax.servlet.jsp.JspException
- If the fragment invocation fails.IOException
- If the fragment invocation fails.public static String evaluateFragmentAsString(javax.servlet.jsp.tagext.JspFragment fragment) throws javax.servlet.jsp.JspException, IOException
fragment
- The fragment to evaluate.javax.servlet.jsp.JspException
- If the fragment invocation fails.IOException
- If the fragment invocation fails with an I/O error.Copyright © 2016. All rights reserved.