You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by he...@apache.org on 2002/07/24 17:19:50 UTC
cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/services/component TurbineComponentService.java
henning 2002/07/24 08:19:50
Modified: src/java/org/apache/turbine/services/component
TurbineComponentService.java
Log:
De-Uglyfied the code a little. Now produces nicer pathes. Added some debugging.
Revision Changes Path
1.2 +7 -9 jakarta-turbine-2/src/java/org/apache/turbine/services/component/TurbineComponentService.java
Index: TurbineComponentService.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/component/TurbineComponentService.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TurbineComponentService.java 24 Jul 2002 15:01:34 -0000 1.1
+++ TurbineComponentService.java 24 Jul 2002 15:19:50 -0000 1.2
@@ -90,13 +90,13 @@
{
/** Extension used for Configuration files. */
- private static String CONFIG = "config";
+ private static String CONFIG = "config";
/** Name tag used in Configurations */
- private static String NAME = "name";
+ private static String NAME = "name";
/** Prefix used by the Component Loader */
- private static String COMPONENT = "component";
+ private static String COMPONENT = "component";
/** List of Components that was initialized */
private Object [] components = null;
@@ -118,11 +118,6 @@
public void init(ServletConfig config)
throws InitializationException
{
-
- String webAppRoot = config.getServletContext().getRealPath("");
-
- webAppRoot += System.getProperty("file.separator");
-
Configuration loaderConf = new BaseConfiguration();
String [] names = getConfiguration().getStringArray(NAME);
@@ -143,7 +138,10 @@
if(subKey.equals(CONFIG))
{
- subVal = webAppRoot + (String)subVal;
+ Log.debug("Fixing up "+subVal);
+ subVal =
+ config.getServletContext().getRealPath((String)subVal);
+ Log.debug("Now: "+subVal);
}
loaderConf.addProperty(subProperty + "." + subKey,
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>