xslt servlet trouble - nothing outputs 2003-03-28 - By Christine Li
It is cause of Sun JDK has a bundle of old version Xalan. Copying the new xalan.jar to the %Tomcat_Home%/common/endorsed will solve this problem.
Christine Li XSLT Development IBM Toronto Lab Tel: (905)413-2601 Email: jycli@(protected)
Ali Zain Banatwala To: Christine Li <jycli@(protected) .ibm.com> <azb33@(protected)> cc: xalan-j-users@(protected) .apache.org Subject: Re: xslt servlet trouble - nothing outputs 03/28/2003 01:27 PM
Hi Christine,
thanks for your help. By now I'm getting some output, and at least it's the same error msg on both windows and linux.
error msg:
The output format must have a '{http://xml.apache.org/xslt}content-handler' property!
any ideas? thanks....
--- Christine Li <jycli@(protected)> wrote: > Do you get any error message, for example can't find > the xsl or xml files? > I don't see anything wrong in the servlet code that > you provided. Can you > try the sample servlet codes(from Xalan.2.5.D1 > release) with Tomcat? And > also try your xml and xsl files without using > servlet, just make sure they > are right. > > Christine Li > XSLT Development > IBM Toronto Lab > Tel: (905)413-2601 > Email: jycli@(protected) > > > > > > Ali Zain > > > Banatwala To: > xalan-j-users@(protected) > > <azb33@(protected)> cc: > > > > Subject: xslt servlet trouble - nothing outputs > > 03/25/2003 08:26 > > > PM > > > > > > > > > > > > Hi, > i'm using Tomcat 4.1 and i'm having trouble trying > to get my xml file to output in my servlet. > > i've tried it with JDOM and without. using File and > URL as the StreamSource param, but nothing shows up. > there's no output. > > both "movies.xml" and "movies.xsl" are in my > servlet > context root. > > somebody pls help!! > thanx... > > > here's my code: > res.setContentType("text/html"); > PrintWriter out = res.getWriter(); > > out.println("<html><head><title>Movie > List</title></head><body>"); > out.println("<center><h1>Movie > List</h1></center><br/>"); > > > Source inXsl = new StreamSource(new > URL("file","",getServletContext()+"movies.xsl").openStream()); > Source inXml = new StreamSource(new > URL("file","",getServletContext()+"movies.xml").openStream()); > > TransformerFactory transFact = > TransformerFactory.newInstance(); > Transformer trans = > transFact.newTransformer(inXsl); > > trans.transform(inXml, new StreamResult(out)); > > out.println("<body></html>"); > > __________________________________________________ > Do you Yahoo!? > Yahoo! Platinum - Watch CBS' NCAA March Madness, > live on your desktop! > http://platinum.yahoo.com > > >
__________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com
|
|