Class ConfigLoader
java.lang.Object
com.opensymphony.module.sitemesh.mapper.ConfigLoader
The ConfigLoader reads a configuration XML file that contains Decorator definitions
(name, url, init-params) and path-mappings (pattern, name).
These can then be accessed by the getDecoratorByName() methods and getMappedName() methods respectively.
The DTD for the configuration file in old (deprecated) format is located at http://www.opensymphony.com/dtds/sitemesh_1_0_decorators.dtd .
The DTD for the configuration file in new format is located at http://www.opensymphony.com/dtds/sitemesh_1_5_decorators.dtd .
Editing the config file will cause it to be auto-reloaded.
This class is used by ConfigDecoratorMapper, and uses PathMapper for pattern matching.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConfigLoader(File configFile) Create new ConfigLoader using supplied File.ConfigLoader(String configFileName, Config config) Create new ConfigLoader using supplied filename and config. -
Method Summary
Modifier and TypeMethodDescriptiongetDecoratorByName(String name) Retrieve Decorator based on name specified in configuration file.getMappedName(String path) Get name of Decorator mapped to given path.
-
Constructor Details
-
ConfigLoader
Create new ConfigLoader using supplied File.- Throws:
jakarta.servlet.ServletException
-
ConfigLoader
Create new ConfigLoader using supplied filename and config.- Throws:
jakarta.servlet.ServletException
-
-
Method Details
-
getDecoratorByName
Retrieve Decorator based on name specified in configuration file.- Throws:
jakarta.servlet.ServletException
-
getMappedName
Get name of Decorator mapped to given path.- Throws:
jakarta.servlet.ServletException
-