public class ServletInitParamVar extends DefaultingVar
The format for this var is
This variable resolver requires that a RestRequest
object be set as a context object on the resolver or a
session object on the resolver session.
Values are pulled from the GenericServlet.getInitParameter(String)
method.
Since this is a SimpleVar
, any variables contained in the result will be recursively resolved.
Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
Modifier and Type | Field and Description |
---|---|
static String |
NAME
The name of this variable.
|
Constructor and Description |
---|
ServletInitParamVar()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canResolve(VarResolverSession session)
Returns
|
String |
resolve(VarResolverSession session,
String key)
The interface that needs to be implemented for subclasses of
SimpleVar . |
doResolve
allowNested, allowRecurse, getName
public static final String NAME
public ServletInitParamVar()
public String resolve(VarResolverSession session, String key)
Var
SimpleVar
.public boolean canResolve(VarResolverSession session)
Var
For example, some variable cannot resolve unless specific context or session objects are available.
canResolve
in class Var
session
- The current session.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.