Klasse TurbineXmlConfig
- Alle implementierten Schnittstellen:
ServletConfig
,ServletContext
,org.apache.avalon.framework.activity.Disposable
,org.apache.avalon.framework.activity.Initializable
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.
- Version:
- $Id$
- Autor:
- Eric Pugh
-
Feldübersicht
Von Klasse geerbte Felder org.apache.turbine.util.TurbineConfig
attributes, CONFIGURATION_PATH_KEY, initParams, PROPERTIES_PATH_DEFAULT, PROPERTIES_PATH_KEY, root, timeout
Von Schnittstelle geerbte Felder javax.servlet.ServletContext
ORDERED_LIBS, TEMPDIR
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungTurbineXmlConfig
(String path, String config) Constructs a TurbineXmlConfig.Constructs a new TurbineXmlConfig.TurbineXmlConfig
(String path, Map<String, String> initParams) Constructs a new TurbineXmlConfig. -
Methodenübersicht
Von Klasse geerbte Methoden org.apache.turbine.util.TurbineConfig
addFilter, addFilter, addFilter, addListener, addListener, addListener, addServlet, addServlet, addServlet, createFilter, createListener, createServlet, declareRoles, dispose, getAttribute, getAttributeNames, getClassLoader, getContext, getContextPath, getDefaultSessionTrackingModes, getEffectiveMajorVersion, getEffectiveMinorVersion, getEffectiveSessionTrackingModes, getFilterRegistration, getFilterRegistrations, getInitParameter, getInitParameterNames, getJspConfigDescriptor, getMajorVersion, getMimeType, getMinorVersion, getNamedDispatcher, getRealPath, getRequestDispatcher, getResource, getResourceAsStream, getResourcePaths, getServerInfo, getServlet, getServletContext, getServletContextName, getServletName, getServletNames, getServletRegistration, getServletRegistrations, getServlets, getSessionCookieConfig, getTurbine, getVirtualServerName, init, initialize, log, log, log, removeAttribute, setAttribute, setInitParameter, setSessionTrackingModes
-
Konstruktordetails
-
TurbineXmlConfig
Constructs a new TurbineXmlConfig. This is the general form of the constructor. You can provide a path to search for files, and a name-value map of init parameters.For the list of recognized init parameters, see
Turbine
class.- Parameter:
path
- The web application root (i.e. the path for file lookup).attributes
- Servlet container (or emulator) attributes.initParams
- initialization parameters.
-
TurbineXmlConfig
Constructs a new TurbineXmlConfig. This is the general form of the constructor. You can provide a path to search for files, and a name-value map of init parameters.For the list of recognized init parameters, see
Turbine
class.- Parameter:
path
- The web application root (i.e. the path for file lookup).initParams
- initialization parameters.
-
TurbineXmlConfig
Constructs a TurbineXmlConfig. This is a specialized constructor that allows to configure Turbine easily in the common setups.- Parameter:
path
- The web application root (i.e. the path for file lookup).config
- the relative path to TurbineResources.xml file
-