public class ServletPathMapper extends LookupCommand implements Command
Command
that uses the "servlet path" component of the request URI
to select a Command
from the appropriate Catalog
, and
execute it. To use this command, you would typically map an instance
of ChainProcessor
to an extension pattern like "*.execute" and
then arrange that this is the default command to be executed. In such
an environment, a request for a context relative URI of "/foo.execute"
would cause the "/foo.execute" command to be loaded and executed.
CONTINUE_PROCESSING, PROCESSING_COMPLETE
Constructor and Description |
---|
ServletPathMapper() |
Modifier and Type | Method and Description |
---|---|
protected Catalog |
getCatalog(Context context)
|
String |
getCatalogKey()
Deprecated.
Use catalogName to specify the name of the catalog in the
catalog factory
|
protected String |
getCommandName(Context context)
Look up the servlet path information for this request, and use it to
select an appropriate
Command to be executed. |
void |
setCatalogKey(String catalogKey)
Deprecated.
Use catalogName to specify the name of the catalog in the
catalog factory
|
execute, getCatalogFactory, getCatalogName, getCommand, getName, getNameKey, isIgnoreExecuteResult, isIgnorePostprocessResult, isOptional, postprocess, setCatalogFactory, setCatalogName, setIgnoreExecuteResult, setIgnorePostprocessResult, setName, setNameKey, setOptional
public String getCatalogKey()
Return the context key under which our Catalog
has been
stored.
public void setCatalogKey(String catalogKey)
Set the context key under which our Catalog
has been
stored.
catalogKey
- The new catalog keyprotected String getCommandName(Context context)
Look up the servlet path information for this request, and use it to
select an appropriate Command
to be executed.
getCommandName
in class LookupCommand
context
- Context for the current requestCommand
instanceprotected Catalog getCatalog(Context context)
getCatalog
in class LookupCommand
context
- Context
for this requestIllegalArgumentException
- if no Catalog
can be foundCopyright © 2003–2021 The Apache Software Foundation. All rights reserved.