Bug 114739

Summary: PatternStylesheetResolver fails on Windows
Product: [Retired] Red Hat Web Application Framework Reporter: Daniel BerrangĂ© <berrange>
Component: otherAssignee: Vadim Nasardinov <vnasardinov>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-17 23:00:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 113496    

Description Daniel Berrangé 2004-02-02 09:00:26 UTC
Description of problem:
See
https://www.redhat.com/archives/redhat-ccm-list/2004-February/msg00000.html

<quote>
   I have tried to install WAF 6.1 in Windows. However I run into
problems serving the stylesheet. I found out later, the problem is using
java.net.URL(). I have changed the file com.arsdigita.templating.
PatternStylesheetResolver to accommodate for any platform (not just
Windows)

I have used
String realFile = new File(pathname).toURL().toExternalForm();
return new java.net.URL(realFile);

instead of
return new java.net.URL("file://" + pathname);
</quote>

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Vadim Nasardinov 2004-02-02 22:33:57 UTC
Looks like we may want to also apply this fix to the following files:

$ find /var/vadim/p4checkout/core-platform/dev/src/ -name \*.java \ |
  xargs grep '"file://' | sed 's/java:/java:\n/'

/var/vadim/p4checkout/core-platform/dev/src/com/arsdigita/packaging/ConfigRegistry.java:
            return new URL(new URL("file://" + home), "conf/");
/var/vadim/p4checkout/core-platform/dev/src/com/arsdigita/runtime/RuntimeClassLoader.java:
            return super.unmarshal("file://" + literal + "/conf/", errors);
/var/vadim/p4checkout/core-platform/dev/src/com/arsdigita/sitenode/BasePresentationManager.java:
                    java.net.URL sheet = new java.net.URL("file://" + sctx.getRealPath(path));
/var/vadim/p4checkout/core-platform/dev/src/com/arsdigita/templating/Templating.java:
                        URL newURL = new URL("file://" + filename);


Comment 2 Vadim Nasardinov 2004-02-02 22:36:53 UTC
Looks like bug 112560 may need to be re-fixed along the same lines.

Comment 3 Vadim Nasardinov 2004-02-03 20:21:44 UTC
Fixed on the trunk in change 40018.

Comment 4 Jon Orris 2004-02-11 14:47:00 UTC
Dan, do you have any verification that this is working properly on the
Windows end? If so, I'm going to go ahead & close this.