com.pow2.resources
Class PropertiesInit

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.pow2.resources.InitServlet
              extended bycom.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

Field Summary
 
Fields inherited from class com.pow2.resources.InitServlet
cat
 
Constructor Summary
PropertiesInit()
           
 
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 com.pow2.resources.InitServlet
getInitParameterFilePath
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesInit

public PropertiesInit()
Method Detail

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 propertiesMap
newProperties - The new properties object to store


Copyright © 2002-2004 Power Of Two S.R.L. All Rights Reserved.