This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Running FOP on a Servlet


Hi Rabi,

That would be wonderful, if you would be so gracious as to share your code.

lzammit@loggate.com

Cheers to you!

Thanks
Linda

-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of rabi shanker
Sent: Wednesday, June 06, 2001 10:56 AM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] Running FOP on a Servlet


hi linda,
  i really dont know what exactly is ur problem.  but if u are interested i
can send u the the FOPServlet code that i used.  may be u can give a try.
  i am doing the whole thing in two steps.   the first servlet i am making
the fo files from the xml and the xsl and in the second  one i am making the
pdf files.
  all the best.
cheers!!!
Rabi










On Wed, 6 Jun 2001 09:42:53
 Linda Zammit wrote:
>Hi Rabi,
>
>Thanks for your feedback.
>
>If I use the .fo file in my servlet then the .pdf file generation 'hangs'
at
>the end of the .pdf file creation (writing the .pdf out).  Plus, if I use
an
>.xsl file (instead of the .fo) and an .xml to generate the .pdf it fails
for
>the error I orginally sent (below) - and closes the server.
>
>I don't have a problem to run the same code (.xsl with .xml or .fo) from a
>Java application.  The problem occurs when I use the code on the servlet.
>
>Linda
>
>-----Original Message-----
>From: owner-xsl-list@lists.mulberrytech.com
>[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of rabi shanker
>Sent: Wednesday, June 06, 2001 9:23 AM
>To: xsl-list@lists.mulberrytech.com
>Subject: Re: [xsl] Running FOP on a Servlet
>
>
>hi linda,
>  i am able to generate pdf through a servlet.  there is no error messges.
>i am using the FOPServlet that comes with the distribution of  FOP.
>  try with that code.
>cheers!!!!
>Rabi
>
>
>
>
>
>
>
>--
>
>On Wed, 6 Jun 2001 08:30:24
> Linda Zammit wrote:
>>Hello all,
>>
>>Has anyone experience a problem like below?  I can't figure out why there
>is
>>a difference when running this code in a Java application vs. a Servlet.
>>
>>In Java application, the following code runs great.  But, if it's run in a
>>Servlet on WebLogic then it errors with the following:
>>
>>JAVA CODE:
>>
>>String [] args = { "-d","-xml", "config\\mydomain\\applications
>>try{
>>CommandLineOptions options = new CommandLineOptions (args);
>>Starter starter = options.getStarter();
>>if(starter != null)
>>out.println("<p>got starter");
>>starter.run();
>>out.println("<p>after run starter");
>>}
>>catch(Exception e){
>>out.println("Exception" + e.getMessage());
>>}
>>
>>
>>ERROR MESSAGE:
>>Input mode: xslt transformation
>>xml input file:
>>config\mydomain\applications\DefaultWebApp_myserver\xml\xslfoRef
>>.xml
>>xslt stylesheet:
>>config\mydomain\applications\DefaultWebApp_myserver\xml\xml2pdf
>>.xsl
>>Output mode: pdf
>>output file:
>>config\mydomain\applications\DefaultWebApp_myserver\pdf\test.pdf
>>OPTIONS
>>no user configuration file is used [default]
>>debug mode on
>>don't dump configuration [default]
>>quiet mode off [default]
>>base directory:
>>D:\product\bea\wlserver6.0sp1\config\mydomain\applications\Defau
>>ltWebApp_myserver\xml
>>FOP 0.18.1-DEV
>>using SAX parser org.apache.xerces.parsers.SAXParser
>>Input mode: xslt transformation
>>xml input file:
>>config\mydomain\applications\DefaultWebApp_myserver\xml\xslfoRef
>>.xml
>>xslt stylesheet:
>>config\mydomain\applications\DefaultWebApp_myserver\xml\xml2pdf
>>.xsl
>>Output mode: pdf
>>output file:
>>config\mydomain\applications\DefaultWebApp_myserver\pdf\test.pdf
>>OPTIONS
>>no user configuration file is used [default]
>>debug mode on
>>don't dump configuration [default]
>>quiet mode off [default]
>>base directory:
>>D:\product\bea\wlserver6.0sp1\config\mydomain\applications\Defau
>>ltWebApp_myserver\xml
>>FOP 0.18.1-DEV
>>using SAX parser org.apache.xerces.parsers.SAXParser
>>D:\product\bea\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_m
y
>s
>>erve
>>r\xml\xml2pdf.xsl; Line 0; Column 0
>>D:\product\bea\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_m
y
>s
>>erve
>>r\xml\xml2pdf.xsl; Line 0; Column 0
>>
>>XSL Error: Could not parse
>>
>>D:\product\bea\wlserver6.0sp1\config\mydomain\applica
>>tions\DefaultWebApp_myserver\xml\xml2pdf.xsl document!
>>java.lang.reflect.InvocationTargetException:
>>org.apache.xalan.xslt.XSLProcessorE
>>xception: File
>>"D:\product\bea\wlserver6.0sp1\config\mydomain\applications\Defau
>>ltWebApp_myserver\xml\xml2pdf.xsl" not found.
>>at
>>org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1710)
>>at
>>org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl
>>.java:770)
>>at
>>org.apache.fop.tools.xslt.Xalan1Transform.getStylesheet(Xalan1Transfo
>>rm.java:88)
>>at
>>org.apache.fop.tools.xslt.Xalan1Transform.transform(Xalan1Transform.j
>>ava:142)
>>at java.lang.reflect.Method.invoke(Native Method)
>>at
>>org.apache.fop.tools.xslt.XSLTransform.transform(XSLTransform.java:11
>>9)
>>at
>>org.apache.fop.tools.xslt.XSLTransform.transform(XSLTransform.java:94
>>)
>>at
>>org.apache.fop.apps.XSLTInputHandler.getInputSource(XSLTInputHandler.
>>java:60)
>>at
>>org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:49
>>)
>>at org.apache.fop.apps.Fop.main(Fop.java:14)
>>at com.loggate.servlets.DocServlet.service(DocServlet.java:143)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>at
>>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
>>pl.java:213)
>>at
>>weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
>>rvletContext.java:1265)
>>at
>>weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
>>pl.java:1622)
>>at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
>>at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>>(etc.)
>>
>>
>>Linda Zammit
>>---
>>Outgoing mail is certified Virus Free.
>>Checked by AVG anti-virus system (http://www.grisoft.com).
>>Version: 6.0.250 / Virus Database: 123 - Release Date: 4/18/2001
>>
>>
>> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>>
>>
>
>
>Get 250 color business cards for FREE!
>http://businesscards.lycos.com/vp/fastpath/
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.250 / Virus Database: 123 - Release Date: 4/18/2001
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.250 / Virus Database: 123 - Release Date: 4/18/2001
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.250 / Virus Database: 123 - Release Date: 4/18/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.250 / Virus Database: 123 - Release Date: 4/18/2001


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]