1 Reply Latest reply on Oct 19, 2003 9:52 PM by atomray

    XSL transform in Servlet Filter can't find imports/includes

    atomray

      Hi,

      I've created a simple test web application that consists of a JSP generating XML, and a filter in front of it doing an XSL transformation of the XML into HTML. To get the first XSL I do use getResourceAsStream in the ServletContext. This works fine with a single XSL, but if I attempt to import other XSLs (in the same directory) they cannot be found (it attempts to find them in the directory JBoss was launched from).

      The problem is probably not with either JBoss or the servlet container (I'm using JBoss 3.2.2 w/ Tomcat in Sun Java 1.4.1_01 on W2K), but I was hoping someone here has experienced the same problem and has a solution or workaround.

      Thanks a lot,
      Adam

        • 1. Re: XSL transform in Servlet Filter can't find imports/inclu
          atomray

          My apologies, stupid question. A little more time on the web, reading the JavaDoc and reading the relevent specs led to the solution. I realized fairly quickly that I need to pass the "system id" (nice name) as a parameter to the XML source, and ServletContainer.getResource(...) provided me with the URI to use. I'm from Canada and they say I'm a little slow, eh?