hi,

David Crossley wrote:

>Try these ...
>/cocoon/documents/catalog-test.html
>/cocoon/catalog-demo
>
><snip result="fails for Cartsen" os=""/>
><snip result="OK for David" os="linux"/>
><snip result="OK for Vadim" os=""/>
><snip result="fails for Bernhard" os="win"/>
>
<snip result="fails for bernhard" os="win" version="2000" 
container="wls6.1, tomcat3.2.3"/>
<snip result="ok for bernhard" os="win" version="2000" 
container="commandline"/>

More analysis:

testing commandline context version is okay,
as commandline context builds a correct correct catalog url

    [junit] DEBUG   10113   [testAvai] (): System OASIS Catalog URL is 
file:/C:/DOCUME~1/huberb1/LOCALS~1/Temp/./work/catalog
    [junit] Parse catalog: 
file:/C:/DOCUME~1/huberb1/LOCALS~1/Temp/./work/catalog
    [junit] Loading catalog: 
file:/C:/DOCUME~1/huberb1/LOCALS~1/Temp/./work/catalog
    [junit] Default BASE: 
file:/C:/DOCUME~1/huberb1/LOCALS~1/Temp/./work/catalog

testing servlet context version is not okay,
as servlet context build malformed catalog url,
getResource().toExternalForm() returns a bad file url,
which is not understood by resolver.jar

DEBUG   (2002-01-18) 00:24.04:856   [core.resolver] (Unknown-URI) 
Unknown-thread/ResolverImpl: Setting Catalog resolver verbosity level to 10
DEBUG   (2002-01-18) 00:24.04:856   [core.resolver] (Unknown-URI) 
Unknown-thread/ResolverImpl: System OASIS Catalog URL is 
file:D:/projects/apache-xml/apache-cvs-new-cocoon-dir/xml-cocoon2/build/cocoon/webapp/resources/entities/catalog

Parse catalog: 
file:D:/projects/apache-xml/apache-cvs-new-cocoon-dir/xml-cocoon2/build/cocoon/webapp/resources/entities/catalog
Loading catalog: 
file:D:/projects/apache-xml/apache-cvs-new-cocoon-dir/xml-cocoon2/build/cocoon/webapp/resources/entities/catalog
Default BASE: 
file:/D:/bea/wlserver6.1/D:/projects/apache-xml/apache-cvs-new-cocoon-dir/xml-cocoon2/build/cocoon/webapp/resources/entities/catalog
Catalog does not exist: 
file:/D:/bea/wlserver6.1/D:/projects/apache-xml/apache-cvs-new-cocoon-dir/xml-cocoon2/build/cocoon/webapp/resources/entities/catalog

I think that the servlet implementation for getResource is somewhat wrong,
it is a bad idea trying to getExternalForm() from an directory installed
webapplication, hence trying first getRealPath(), and only if it returns 
null
try using getResource(), yields okay

For Win2K, WLS6.1, directory deployed Cocoon webapp,

Changed not checked-in modified ResolverImpl

        // Load the built-in catalog.
        String catalogFile = params.getParameter("catalog",
          "/resources/entities/catalog");
        try {
            String catalogURL = null;
            catalogURL = this.context.getRealPath( catalogFile );
            if (catalogURL == null) {
              catalogURL = 
this.context.getResource(catalogFile).toExternalForm();
            }

With this changed ResolverImpl:
<snip result="ok for bernhard" os="win" version="2000" container="wls6.1"/>
<snip result="not tested" os="win" version="2000" container="tomcat3.2.3"/>
<snip result="ok for bernhard" os="win" version="2000" 
container="commandline"/>

bye bernhard



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

Reply via email to