jvanzyl     01/09/20 20:21:00

  Modified:    src/java/org/apache/turbine Turbine.java
                        TurbineConstants.java
  Log:
  - adding ${webappRoot} and ${applicationRoot} to the configuration
    so that they are available in the TRP. you must upgrade your
    commons-collections jar to take advantage of this feature.
  
  Revision  Changes    Path
  1.9       +11 -1     jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java
  
  Index: Turbine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Turbine.java      2001/09/17 18:48:45     1.8
  +++ Turbine.java      2001/09/21 03:21:00     1.9
  @@ -111,7 +111,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Rafal Krzewski</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Rall</a>
  - * @version $Id: Turbine.java,v 1.8 2001/09/17 18:48:45 jon Exp $
  + * @version $Id: Turbine.java,v 1.9 2001/09/21 03:21:00 jvanzyl Exp $
    */
   public class Turbine
       extends HttpServlet
  @@ -567,6 +567,16 @@
           // interface so that service and app configuration
           // can be stored anywhere.
           configuration = new ExtendedProperties(propsPath);
  +        
  +        // We want to set a few values in the configuration so
  +        // that ${variable} interpolation will work for
  +        // 
  +        // ${applicationRoot}
  +        // ${webappRoot}
  +        configuration.setProperty(APPLICATION_ROOT, applicationRoot);
  +        configuration.setProperty(WEBAPP_ROOT, 
  +            config.getServletContext().getRealPath(""));
  +        
           serviceManager.setConfiguration(configuration);
   
           // Initialize the service manager. Services
  
  
  
  1.5       +1 -1      
jakarta-turbine-3/src/java/org/apache/turbine/TurbineConstants.java
  
  Index: TurbineConstants.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/TurbineConstants.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TurbineConstants.java     2001/09/17 18:48:45     1.4
  +++ TurbineConstants.java     2001/09/21 03:21:00     1.5
  @@ -319,7 +319,7 @@
        * application runs from.
        */
       public static final String APPLICATION_ROOT = "applicationRoot";
  -
  +    public static final String WEBAPP_ROOT = "webappRoot";
       public static final String WEB_CONTEXT = "webContext";
       
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to