Class ActionExtensionResolver
java.lang.Object
org.apache.struts2.dispatcher.mapper.ActionExtensionResolver
Chooses the extension of a generated action URL from the extensions the target action accepts, so links,
forms and redirects point at an extension the target can be reached by.
- Since:
- 7.5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(ActionMapping target) Sets the extension oftargetto the current request's extension when the target accepts it, otherwise to the target's first accepted extension.voidsetAllowDynamicMethodCalls(String enableDynamicMethodCalls) voidsetConfiguration(Configuration configuration) voidsetExtensions(String extensions)
-
Constructor Details
-
ActionExtensionResolver
public ActionExtensionResolver()
-
-
Method Details
-
setConfiguration
- Parameters:
configuration- the configuration used to look up the target action- Since:
- 7.5.0
-
setExtensions
- Parameters:
extensions- the globalstruts.action.extensionlist- Since:
- 7.5.0
-
setAllowDynamicMethodCalls
- Parameters:
enableDynamicMethodCalls- whethername!methodnames are split at their last!- Since:
- 7.5.0
-
applyTo
Sets the extension oftargetto the current request's extension when the target accepts it, otherwise to the target's first accepted extension. For a target declaring extensions an extensionless request counts as the empty extension; the first accepted extension is used when there is no current request, or for an extensionless request to an undeclared target, as inDefaultActionMapper.lookupExtension(String). Leavestargetunchanged when it already has an extension, when no action in the configuration declares extensions, when the target action is unknown (a name reached only through the namespace'sdefault-action-refcounts as unknown), or when neither the target nor the global constant declares extensions.- Parameters:
target- the mapping of the action the URL points at- Since:
- 7.5.0
-