base/struts-tools/src/main/com/thesett/common/webapp/servlets/PropertyLoaderServlet.java
public void init()
    {
        log.fine("public void init(): called");

        // Get the name of the property file resource to load and the application variable name to store it under
        String propertyResource = getInitParameter(PROPERTY_RESOURCE);
        String varName = getInitParameter(APP_VAR_NAME);

        log.fine("varName = " + varName);

        // Use the default property reader to load the resource
        Properties properties = DefaultPropertyReader.getProperties(propertyResource);

        log.fine("properties = " + properties);

        // Store the properties under the specified variable name in the application scope
        getServletContext().setAttribute(varName, properties);
    }
public void init()
    {
        log.fine("public void init(): called");

        // Get the name of the property file resource to load and the application variable name to store it under
        String propertyResource = getInitParameter(PROPERTY_RESOURCE);
        String varName = getInitParameter(APP_VAR_NAME);

        log.fine("varName = " + varName);

        // Use the default property reader to load the resource
        Properties properties = DefaultPropertyReader.getProperties(propertyResource);

        log.fine("properties = " + properties);

        // Store the properties under the specified variable name in the application scope
        getServletContext().setAttribute(varName, properties);
    }
public void init ( ) { log . fine ( "public void init(): called" ) ; // Get the name of the property file resource to load and the application variable name to store it under String propertyResource = getInitParameter ( PROPERTY_RESOURCE ) ; String varName = getInitParameter ( APP_VAR_NAME ) ; log . fine ( "varName = " + varName ) ; // Use the default property reader to load the resource Properties properties = DefaultPropertyReader . getProperties ( propertyResource ) ; log . fine ( "properties = " + properties ) ; // Store the properties under the specified variable name in the application scope getServletContext ( ) . setAttribute ( varName , properties ) ; }
Loads a properties file and stores it in the application context. The property resource name and the application
scope variable name are passed as initialization parameters in the servlet config in the web.xml.
Loads a properties file and stores it in the application context . The property resource name and the application scope variable name are passed as initialization parameters in the servlet config in the web . xml .