When run as a service, Tomcat will run as the user 'System', so make sure your permissions on your xsl_files are correct.
Also the default directory becomes "c:\winnt" insstead of "D:\Apache Tomcat 4.0\bin" I have this working as both standalone and as a service with the same versions of xerces and xalan. I keep my xsl in the webapp's directory and use getResourceAsStream() to load it. Charlie > -----Original Message----- > From: Lepri, Ennio (AFIS) [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 07, 2001 6:23 AM > To: '[EMAIL PROTECTED]' > Subject: Problem using compiled stylesheets in servlet run > from a Tomcat > s ervice. > Importance: High > > > I have a problem running my application as a NT service with > Tomcat 4.0. The > servlet builds a DOM tree then uses a XSL processor to compile the > stylesheets and generate the HTML output. The same servlet > runs perfectly as > an application (using startup.bat or catalina.bat). > > I put display messages in the the main servlet so I can say > it is actually > called and executed the stylesheet compilation where it > hangs. The XSL > processor retrieves the main xsl file (which imports/includes > other files) > but doesn't complete the transformation. Putting > well-formedness errors in > the stylesheet shows exceptions so it is at least parsing the > stylesheet > before hanging. > > The transformation code is as follows: > > TransformerFactory tfactory = TransformerFactory.newInstance(); > File f = new File(xsl_file); > strSource = new StreamSource(f); > System.out.println("BEFORE"); > Templates templates = tfactory.newTemplates(strSource); <-- > Hangs here > System.out.println("AFTER"); > > > The versions/config are as follows: > > Tomcat version: 4.0.1 final > JDK version: 1.2.2 > xalan version: 2.2 D11 > xerces version: 1.4.0 > > XSL files in C:\xsl_folder\ > Class files in D:\Apache Tomcat 4.0\webapps\my_app\Web-inf\classes\ > xalan.jar and xercers.jar in D:\Apache Tomcat > 4.0\webapps\my_app\WEB-INF\lib\ > > > Can anyone help????? > Thanks > > Ennio > > > > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
