public void init(ServletConfig config) throws ServletException { super.init(config); String stylesheet = getInitParameter("stylesheet"); if (stylesheet == null) throw new ServletException("missing stylesheet parameter"); cached = new XSLProcessorImpl(); cached.setParser(createParser()); try { cached.loadStylesheet(fileInputSource(new File(stylesheet))); } catch (SAXException e) { throw new ServletException(e.toString()); } catch (IOException e) { throw new ServletException(e.toString()); } log("init done"); }