com.pow2.resources
Class PropertiesInit
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.pow2.resources.InitServlet
com.pow2.resources.PropertiesInit
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
- public class PropertiesInit
- extends InitServlet
Properties init servlet.
Define the following servlet in the web.xml file for your web-application.
log4j-init
com.pow2.resources.PropertiesInit
properties-init-fileKey
myProperties
properties-init-fileValue
WEB-INF/myProperties.properties
1
CVS info:
$Id: PropertiesInit.java,v 1.1.1.1 2004/08/31 20:22:46 foxat Exp $
- Author:
- Fossato
- See Also:
- Serialized Form
Method Summary |
static Properties |
getProperties(String key)
Gets the properties object stored into the propertiesMap identified by the input key |
void |
init()
Initialize this servlet. |
static void |
setProperties(String key,
Properties newProperties)
Sets the properties object into the propertiesMap using the input key |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertiesInit
public PropertiesInit()
init
public void init()
throws ServletException
- Initialize this servlet.
- Throws:
ServletException
- if any error occurs
getProperties
public static Properties getProperties(String key)
- Gets the properties object stored into the propertiesMap identified by the input key
- Parameters:
key
- the key to use to retrieve the Properties object from the propertiesMap
- Returns:
- The properties object
setProperties
public static void setProperties(String key,
Properties newProperties)
- Sets the properties object into the propertiesMap using the input key
- Parameters:
key
- the key to use to store the Properties object into the propertiesMapnewProperties
- The new properties object to store
Copyright © 2002-2004 Power Of Two S.R.L. All Rights Reserved.