|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.util.TurbineConfig
org.apache.turbine.util.TurbineXmlConfig
A class used for initialization of Turbine without a servlet container.
If you need to use Turbine outside of a servlet container, you can use this class for initialization of the Turbine servlet.
TurbineXmlConfig config = new TurbineXmlConfig(".", "conf/TurbineResources.properties");
All paths referenced in TurbineResources.properties and the path to the properties file itself (the second argument) will be resolved relative to the directory given as the first argument of the constructor, here - the directory where application was started. Don't worry about discarding the references to objects created above. They are not needed, once everything is initialized.
In order to initialize the Services Framework outside of the Turbine Servlet,
you need to call the init()
method. By default, this will
initialize the Resource and Logging Services and any other services you
have defined in your TurbineResources.properties file.
Field Summary |
Fields inherited from class org.apache.turbine.util.TurbineConfig |
attributes, CONFIGURATION_PATH_KEY, initParams, PROPERTIES_PATH_DEFAULT, PROPERTIES_PATH_KEY, root |
Constructor Summary | |
TurbineXmlConfig(java.lang.String path,
java.util.Map initParams)
|
|
TurbineXmlConfig(java.lang.String path,
java.util.Map attributes,
java.util.Map initParams)
Constructs a new TurbineXmlConfig. |
|
TurbineXmlConfig(java.lang.String path,
java.lang.String config)
Constructs a TurbineXmlConfig. |
Methods inherited from class org.apache.turbine.util.TurbineConfig |
dispose, getAttribute, getAttributeNames, getContext, getInitParameter, getInitParameterNames, getMajorVersion, getMimeType, getMinorVersion, getNamedDispatcher, getRealPath, getRequestDispatcher, getResource, getResourceAsStream, getResourcePaths, getServerInfo, getServlet, getServletContext, getServletContextName, getServletName, getServletNames, getServlets, init, initialize, log, log, log, removeAttribute, setAttribute |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TurbineXmlConfig(java.lang.String path, java.util.Map attributes, java.util.Map initParams)
For the list of recognized init parameters, see
Turbine
class.
path
- The web application root (i.e. the path for file lookup).attributes
- Servlet container (or emulator) attributes.initParams
- initialization parameters.public TurbineXmlConfig(java.lang.String path, java.util.Map initParams)
TurbineXmlConfig(String path, Map attributes, Map initParams)
public TurbineXmlConfig(java.lang.String path, java.lang.String config)
path
- The web application root (i.e. the path for file lookup).
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |