You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Lepri, Ennio (AFIS)" <En...@fao.org> on 2001/12/07 12:23:26 UTC

Problem using compiled stylesheets in servlet run from a Tomcat s ervice.

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:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>