https://bz.apache.org/bugzilla/show_bug.cgi?id=60950
Bug ID: 60950 Summary: JSTL TransformSupport XSL import not finding relative path Product: Taglibs Version: 1.2.5 Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: XTags Taglib Assignee: dev@tomcat.apache.org Reporter: tomaz.ce...@gmail.com Target Milestone: --- Created attachment 34894 --> https://bz.apache.org/bugzilla/attachment.cgi?id=34894&action=edit Reproducer war When you try to use references to local xslt files inside same deployment. You can get error when creating XML Transformer as transformer factory doesn't have URI resolver set to be able to recognize jstl protocol. Reproducer "test.war" is attached. Part of code that makes it fail: test.jsp: ------------ <c:import var="xslStylesheet" url="/xsl/style.xsl" charEncoding="UTF-8" /> <c:import url="http://localhost:8080/test/test.xml" var="doc"/> <x:transform xml="${doc}" xslt="${xslStylesheet}" xsltSystemId="/xsl/"> </x:transform> style.xsl --------------- <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"> <xsl:import href="parent.xsl"/> ... results in javax.xml.transform.TransformerException: Had IO Exception with stylesheet file: parent.xsl at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:942) at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:780) at __redirected.__TransformerFactory.newTransformer(__TransformerFactory.java:133) at org.apache.taglibs.standard.util.XmlUtil.newTransformer(XmlUtil.java:187) Caused by: java.net.MalformedURLException: unknown protocol: jstl at java.net.URL.<init>(URL.java:600) at java.net.URL.<init>(URL.java:490) at java.net.URL.<init>(URL.java:439) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:964) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:144) at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:832) at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1198) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:564) at org.apache.xalan.processor.ProcessorInclude.parse(ProcessorInclude.java:312) This is also tracked in Red Hat BZ https://bugzilla.redhat.com/show_bug.cgi?id=1320747 as well as in WildFly Jira: https://issues.jboss.org/browse/WFLY-8498 -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org