on 5/29/2000 2:19 PM, Rafal Krzewski at [EMAIL PROTECTED] wrote:

> Hi everybody.
> 
> Don't you think that WebMacro's method of locating it's .properties file,
> and specyfing the templates directory is not good?
> 
> Locating .propertis is OK under Tomcat - they are contained inside
> the web application directory, so there is no ambiguity. On the other
> hand, for purely aesthetical reasons, I'd prefer to have both
> Turbine.properties
> and WebMacro.properties in the same directory /WEB-INF/conf or
> /WEB-INF/etc. This is much worse under Jserv 1.1 - the classloader fails
> to load property files located in zone repositories - at least it failed for
> me.
> This enforces single server-wide WebMacro.properties file, specyfing
> template directories for all running applications. This is deinetly bad,
> because
> it can lead to conflicts easily and is exteremely unelegant. I think it would
> be 
> good, if there was a way to specify the location of .properties file as
> servlet initialization parameter, just as it's done with
> TurbineResource.properties.

Yep...I agree...

> Another thing that bothers me about WebMacro is the way of specyfing
> template paths. You can  use absolute paths, which is bad, because you
> must edit them when you deploy your application in the destination server,
> or you can use relative paths, which is even worse, because they are relative
> to whatever the servlet container choses to be it's current directory. For
> Tomcat, this is the directory where you launched /bin/startup.sh from.
> I really like the way that Turbine deals with locating it's properties file -
> if the path is relative to web application's root (if the container supports
> getRealPath()). This makes deploing your application simpler.

Yep...I agree...

> This is my proposal of changes to WebMacro:
> 1. location of WebMacro.properties should be specified as servlet
> intialization
> argument (be it Turbine or your own servlet extending WMServlet class)
> 2. if no location is specified, a fallback to standard WebMacro procedures is
> preformed

It should do the classpath first AND what you suggest second.

> 3. the locations of WebMacro.properties, and template direcories may be
> absolute, or relative to webapp directory if the container supports it, or
> relative to "the current directory" if it doesn't.

+1...we *might* be able to do this ourselves, but it would be nice to have
WM support this. There has been talk on the WM mailing list (with code) to
fix this problem, but i'm not sure if it has been solved in the code yet.

> I volunteer to make necessary changes to WebMacro code, providing that
> somebody sends me sources of WebMacro we are using, or points me to
> a location where I can get them.

read the WM list archives.

> My plan for doing this:
> 1. make the changes
> 2. test them on my installation
> 3. send the patch to Turbine list, so people can test it, and if it's ok
> start using it
> 4. join WebMacro list, explain my idea and post the patch
> 
> Again, please advise if this is the correct way of doing things

+1

-jon



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to