[jdom-interest] Problem using Tip: Using JDOM and XSLT by Brett McLaughlin

Jason Long jason at jmlie.com
Thu Oct 11 21:32:55 PDT 2001


I am attempting to make use of "Listing 1. Using JDOM with Xalan-J 2" which
can be found at the following url:
http://www-106.ibm.com/developerworks/java/library/x-tipjdom.html

Here is my system configuration:
W2K Advanced Server
JDK 1.4 beta 2
Tomcat 4.0 Final
JDOM beta 7

I have been working on a servlet that compiles a list of some files on my
server, parses their names, and generates an xml file.  For this JDOM worked
beautifully.  I had used SAX and DOM before and had many headaches.  Due to
JDOM's ease of use I had my application building the XML file in no time.
Now it was time to transform the XML using XSL so that it could be displayed
to match the rest of my site.  I simply pasted the transform method from
"Listing 1. Using JDOM with Xalan-J 2" in the previously mentioned tip and
added the appropriate jar files for Tomcat.  Everything compiled properly,
but my browser just hangs and never gets a reply.  I began by commenting out
all of the code and adding one line at a time until it began to fail.  Here
is where my code hangs:

// Output to the I/O stream
  xmlOutputter.output(sourceDoc, sourceOut);

Unless I comment out this line and the rest of the code that follows which
depends on this line the servlet never responds back.  It seems that I have
Xalan installed properly because the code previous to this point depends on
it and the point where the servlet freezes has nothing to do with it.  I
have yet to resolve this problem, but am very excited about JDOM.  I would
appreciate and assistance with this matter.

Best Regards,

Jason Long
JML Internet Enterprise - www.jmlie.com
BS Physics, MS Chemical Engineering




More information about the jdom-interest mailing list