Export to GitHub

flying-saucer - issue #262

Regression resolving stylesheets relative to docroot


Posted on May 7, 2015 by Happy Hippo

What steps will reproduce the problem? 1. Create an HTML file containing a relative stylesheet link element, e.g. <link href="help.css" rel="stylesheet" type="text/css"/>

  1. Obtain a docRoot URL string pointing into the classpath URL docRootUrl = SomeClass.class.getResource("/help"); if(docRootUrl != null) { docRoot = docRootUrl.toString() + "/"; }

  2. Call setDocumentFromString(yourXHtmlString, docRoot, new XhtmlNamespaceHandler()) on an instance of XHTMLPanel where yourXHtmlString contains the content of the file created in 1.

What is the expected output? What do you see instead? The page should be rendered with the stylesheet loaded from the classpath but is instead rendered without style.

What version of the product are you using? On what operating system? This used to work with 9.0.4 and 9.0.6 but is failing with 9.0.7. Tested on OS X 10.10.3.

Please provide any additional information below. I only checked stylesheets but it's very well possible that this is a general issue concerning docroot handling.

Comment #1

Posted on May 7, 2015 by Happy Hippo

I hope this is still the correct issue tracker...

Status: New

Labels:
Type-Defect Priority-Medium