Bug 110587
Summary: | "Download XSL Files" doesn't work under PatternStylesheetResolver | ||
---|---|---|---|
Product: | [Retired] Red Hat Web Application Framework | Reporter: | Vadim Nasardinov <vnasardinov> |
Component: | other | Assignee: | Daniel Berrangé <berrange> |
Status: | CLOSED RAWHIDE | QA Contact: | Jon Orris <jorris> |
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: | 2007-08-01 18:48:05 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: |
Description
Vadim Nasardinov
2003-11-21 16:03:36 UTC
There are in fact two bugs here. The first, as per Vadim's comment is that it only processes file:// URLs, the second is that it doesn't actually add the files themselves to the ZIP - it merely creates the headers. This was fixed in London 5.2 Core: Change 30838 by dan@dan-aplaws on 2003/05/12 08:46:39 So it turns out adding a JarEntry doesn't actually add the sodding file to the JAR, it just creates the MANIFEST entry. This shouldn't be applied directly however, since it uses java.io.File. When fixing it we need to use java.net.URL#openStream to read the bytes. The only (small) complication is generating the paths for the XSL files, but basically the way style sheet resolution works we ought to be able to simply strip off 'http://el-vadimo:9000/' from the HTTP urls & '/' from the file URLs to generate relative paths. On a related note, while fixing this, it is probably a good idea to move the code that generates the ZIP file out of the presentation manager & into a c.a.templating.XSLTemplate#toZIP() method or similar. >On a related note, while fixing this, it is probably a good idea to
>move the code that generates the ZIP file out of the presentation
>manager & into a c.a.templating.XSLTemplate#toZIP() method or similar.
Just as an FYI, there are some zip utilities in
com.arsdigita.util.Files. They only deal with Files but it may make
sense to consolidate as much as possible.
This is now resolved in p4 39829 QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future. Moving to ON_QA. |