.xsl inside .war file


XML & Web services: .xsl inside .war file

  1. .xsl inside .war file (1 messages)

    Can I store .xsl file's into a .war file?If yes, How?
    Does it make any significant performance problems on the application?
  2. .xsl inside .war file[ Go to top ]

    You can store pretty much whatever you like in a WAR file and XSL stylesheets work just fine.

    You will need to use something like the following line of code to get the XSL stylesheet out of the WAR

    java.io.InputStream in = context.getServletContext().getResourceAsStream(XSLpath);

    This input stream can then be parsed into a W3C Document object.

    It is probably worth caching the stylesheets as Documents so that this parsing is only done once.

    Hope this helps

    Andy Bowes