tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From everett stauffer <ever...@chem.ucsd.edu>
Subject Problem using Xalan in JSP
Date Sun, 16 Jul 2000 02:46:09 GMT

Hello-

  I'm using Tomcat 3.1 on Win NT 4.0, with JDK 1.3, and Xalan 1.1.

The following JSP snippet gives me an error that I just can't seem 
to work around in a useful way.

<%
//ss.process(new XSLTInputSource(new FileReader(xf)),
//           new XSLTResultTarget(out));
proc.process(new XSLTInputSource(new FileReader(xf)),
             new XSLTInputSource(new FileReader(xsl)),
             new XSLTResultTarget(out));
%>

As you can see, I've commented out my 'preferred' code, and stuck
to the 'brute force' call, and neither work.

The error returned in the page, which corresponds to the above call is:
java.lang.IllegalStateException: Response has already been committed
        at
org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:157)
        at
org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:299)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
        at
org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
        at java.lang.Thread.run(Unknown Source)

I can use "out.println(someString)" just fine to output strings to show that
the error does indeed occur when process is called.

I've also setup a wrapper Thread class to run the process in.  This doesn't 
produce an error, but it also doesn't produce any output.  I'm sure this is
because the page has closed the response before the XSL processor returns.

I've also been using this code, the xml file and the xslt sheet without any
problems from a straight java command line program.

I'd appreciate any and all help.  TIA.


Everett

Mime
View raw message