org.apache.struts.util
public class ModuleUtils extends Object
Since: Struts 1.2
Version: $Rev: 54929 $
Field Summary | |
---|---|
static ModuleUtils | instance
The Singleton instance. |
static Log | log
Commons logging instance. |
Constructor Summary | |
---|---|
protected | ModuleUtils()
Constructor for ModuleUtils. |
Method Summary | |
---|---|
static ModuleUtils | getInstance()
Returns the Singleton instance of TagUtils. |
ModuleConfig | getModuleConfig(HttpServletRequest request)
Return the current ModuleConfig object stored in request, if it exists,
null otherwise.
|
ModuleConfig | getModuleConfig(String prefix, ServletContext context)
Return the desired ModuleConfig object stored in context, if it exists,
null otherwise.
|
ModuleConfig | getModuleConfig(String prefix, HttpServletRequest request, ServletContext context)
Return the desired ModuleConfig object stored in context, if it exists,
otherwise return the current ModuleConfig
|
ModuleConfig | getModuleConfig(HttpServletRequest request, ServletContext context)
Return the ModuleConfig object is it exists, null otherwise. |
String | getModuleName(HttpServletRequest request, ServletContext context)
Get the module name to which the specified request belong. |
String | getModuleName(String matchPath, ServletContext context)
Get the module name to which the specified uri belong. |
String[] | getModulePrefixes(ServletContext context)
Return the list of module prefixes that are defined for
this web application. |
void | selectModule(HttpServletRequest request, ServletContext context)
Select the module to which the specified request belongs, and
add corresponding request attributes to this request.
|
void | selectModule(String prefix, HttpServletRequest request, ServletContext context)
Select the module to which the specified request belongs, and
add corresponding request attributes to this request.
|
{@link RequestUtils#selectModule(HttpServletRequest, ServletContext)}
.Parameters: request The servlet request we are processing
Returns: the ModuleConfig object from request, or null if none is set in the request.
Parameters: prefix The module prefix of the desired module context The ServletContext for this web application
Returns: the ModuleConfig object specified, or null if not found in the context.
Parameters: prefix The module prefix of the desired module request The servlet request we are processing context The ServletContext for this web application
Returns: the ModuleConfig object specified, or null if not found in the context.
Parameters: request The servlet request we are processing context The ServletContext for this web application
Returns: the ModuleConfig object
Parameters: request The servlet request we are processing context The ServletContext for this web application
Returns: The module prefix or ""
Parameters: matchPath The uri from which we want the module name. context The ServletContext for this web application
Returns: The module prefix or ""
Parameters: context The ServletContext for this web application.
Returns: An array of module prefixes.
Parameters: request The servlet request we are processing context The ServletContext for this web application
Parameters: prefix The module prefix of the desired module request The servlet request we are processing context The ServletContext for this web application