You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/08/28 18:27:23 UTC

cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/services/resources TurbineResourceService.java

jvanzyl     01/08/28 09:27:23

  Modified:    src/java/org/apache/turbine/services/resources
                        TurbineResourceService.java
  Log:
  - make this service obey the location of the application root by
    using Turbine.getRealPath(s). allows the TRP file to remain in its
    CVS location.
  
  Revision  Changes    Path
  1.2       +8 -4      jakarta-turbine-2/src/java/org/apache/turbine/services/resources/TurbineResourceService.java
  
  Index: TurbineResourceService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/resources/TurbineResourceService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TurbineResourceService.java	2001/08/16 05:09:12	1.1
  +++ TurbineResourceService.java	2001/08/28 16:27:23	1.2
  @@ -59,6 +59,7 @@
   import java.util.Properties;
   import java.util.Vector;
   import javax.servlet.ServletConfig;
  +import org.apache.turbine.Turbine;
   import org.apache.turbine.services.BaseInitable;
   import org.apache.turbine.services.BaseServiceBroker;
   import org.apache.turbine.services.InitializationException;
  @@ -91,9 +92,10 @@
    * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
    * @author <a href="mailto:luta.raphael@networks.vivendi.net">Rapha�l Luta</a>
    * @author <a href="mailto:jvanzyl@periapt.com@">Jason van Zyl</a>
  - * @version $Id: TurbineResourceService.java,v 1.1 2001/08/16 05:09:12 jvanzyl Exp $
  + * @version $Id: TurbineResourceService.java,v 1.2 2001/08/28 16:27:23 jvanzyl Exp $
    */
  -public class TurbineResourceService extends TurbineBaseService
  +public class TurbineResourceService 
  +    extends TurbineBaseService
       implements ResourceService
   {
       /** The container for the generic resources. */
  @@ -147,14 +149,16 @@
           // will not have an issue with using it this way. I don't know
           // if this will break other servlet engines, but it probably
           // shouldn't since WAR files are the future anyways.
  -        props = ServletUtils.expandRelative(config, props);
  -
  +        //props = ServletUtils.expandRelative(config, props);
  +        props = Turbine.getRealPath(props);
  +        
           try
           {
               init(new Configuration(props));
           }
           catch (IOException e)
           {
  +            e.printStackTrace();
               throw new InitializationException("Can't load file " + props);
           }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org