cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@indexgeo.com.au>
Subject Re: BUG 5060, CommandlineContext
Date Sun, 30 Dec 2001 03:38:04 GMT
Hi Bernhard, it will be excellent if you have fixed this, as we
have been going one step back then one step forward for months.
When you commit your attempt, then we can immediately
check on a Linux platform (where everything currently works
for us).

Bernhard Huber wrote:
> hi, tried to solve BUG 5060, see
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5060
> see also 
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=100866335220243&w=2
> 
> As this problem only appears in the commandline environment, I check
> org.apache.cocoon.environment.commandline.CommandlineContext

However, remember that the result is different on other platforms.
The last patch to CommandlineContext fixed the same problem
for UNIX platforms (and by the way seemed to still work for Win).
See CVSview and also:
Re: found the cause of Bug #5060 build docs
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=100693279511532&w=2
Hopefully your patch is universal - it does appear to be a better
and more complete solution.

> I think that the implementation of getResource, and getRealPath of 
> CommandlineContext is wrong.
> I want to replace it by:
>     /**
>      * Constructs a CommandlineContext object from a ServletContext object
>      */
>     public CommandlineContext (String contextDir) {
>         String contextDirPath = new File(contextDir).getAbsolutePath();
>         this.contextDir = contextDirPath;
>         this.attributes = new HashMap();
>     }
>     public URL getResource(String path) throws MalformedURLException {
>         getLogger().debug("CommandlineContext: getResource=" + path);
>         File f = new File( contextDir, path );
>         return f.toURL();
>     }
> 
>     public String getRealPath(String path) {
>         getLogger().debug("CommandlineContext: getRealPath=" + path);
>         File f = new File( this.contextDir, path );
>         return f.getAbsolutePath();
>     }
> 
> As I'm also writing JUnit Testcases for CommandlineContext, and 
> ResolverImpl,
> which are not finished yet, and I will only able to test it on W2K, I 
> will wait a bit, checking in the CommandlineContext changes.

Looking forward to seeing some testcases. I can test on Linux.

> As CommandlineContext is very fundamental, any objections against the 
> CommandlineContext changes?
> 
> bye bernhard


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message