henning 2003/06/07 01:41:49
Modified: src/java/org/apache/turbine/util TurbineConfig.java
Log:
Roll back to rev 1.13, Eric will add another class for XML Configuration.
Revision Changes Path
1.15 +10 -17
jakarta-turbine-2/src/java/org/apache/turbine/util/TurbineConfig.java
Index: TurbineConfig.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/util/TurbineConfig.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- TurbineConfig.java 6 Jun 2003 22:08:09 -0000 1.14
+++ TurbineConfig.java 7 Jun 2003 08:41:49 -0000 1.15
@@ -109,13 +109,14 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Eric Pugh</a>
* @version $Id$
*/
-public class TurbineConfig implements ServletConfig, ServletContext, Initializable,
Disposable
+public class TurbineConfig
+ implements ServletConfig, ServletContext, Initializable, Disposable
{
/**
* Servlet initialization parameter name for the path to
* TurbineConfiguration.xml file used by Turbine
*/
- public static final String CONFIGURATION_PATH_KEY = "configuration";
+ public static final String CONFIGURATION_PATH_KEY = "configuration";
/**
* Servlet initialization parameter name for the path to
@@ -127,7 +128,8 @@
* Default value of TurbineResources.properties file path
* (<code>/WEB-INF/conf/TurbineResources.properties</code>).
*/
- public static final String PROPERTIES_PATH_DEFAULT =
"/WEB-INF/conf/TurbineResources.properties";
+ public static final String PROPERTIES_PATH_DEFAULT =
+ "/WEB-INF/conf/TurbineResources.properties";
/** Filenames are looked up in this directory. */
private File root;
@@ -180,22 +182,12 @@
* Turbine easiliy in the common setups.
*
* @param path The web application root (i.e. the path for file lookup).
- * @param properties the relative path to setup file. Either
- * TurbineResources.properties or TurbineConfiguration.xml. If the file
- * ends in .xml, then we assume taht it is a ConfigurationFactory config
- * file. Otherwise we assume it is a standard TurbineResources.propeties file.
+ * @param properties the relative path to TurbineResources.properties file
*/
public TurbineConfig(String path, String properties)
{
this(path, new HashMap(1));
- if (properties.toLowerCase().endsWith(".xml"))
- {
- initParams.put(CONFIGURATION_PATH_KEY, properties);
- }
- else
- {
- initParams.put(PROPERTIES_PATH_KEY, properties);
- }
+ initParams.put(PROPERTIES_PATH_KEY, properties);
}
/**
@@ -279,7 +271,7 @@
if (f.exists())
{
- result = f.getPath();
+ result = f.getPath();
}
else
{
@@ -343,7 +335,8 @@
* @return a URL pointing to the resource
* @exception MalformedURLException
*/
- public URL getResource(String s) throws MalformedURLException
+ public URL getResource(String s)
+ throws MalformedURLException
{
return new URL("file://" + getRealPath(s));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]