Here is the servlet we use to generate PDF and HTML from XML which is stored
in the user's session on Weblogic 6.1. There is some extra stuff in it, but
you should be able to filter the relevant parts. It also has a partial fix
to the IE-pre-5.0 servlet called twice or three times problem. I'm working
on what I hope will be the final solution right now. Here is the classpath
and startup command I use on our Windows development boxes:


%JAVA_HOME%\bin\java -hotspot -verbose:gc -ms380m -mx380m -classpath
es" -Dweblogic.Domain=isappdev -Dweblogic.Name=NT4Dev
"\wlserver6.1\lib\weblogic.policy" weblogic.Server

As you can see we have a domain-level properties file called These properties, which include the XSLTPathPrefix
property, are loaded into the servlet context on boot. Still haven't figured
out how to get a relative or dynamic image file path to work in my XSLT
styleshhet that converts XML->FO. Anyone? (HTTP won't work because of the
constantly changing environments from Windows-dev to Unix - dev, QA and

Also, if anyone has any questions or notices anything silly or inneficient
in this servlet, please let me know.

Hope this helps,
Matt Savino

> -----Original Message-----
> From: James Richardson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 02, 2002 2:54 AM
> Subject: Re: weblogic and fop
> OK, the problem is that weblogic contains in its classpath some XML 
> parser stuff. (Off topic, but why anybody ever decided that using a 
> single static method to get an XML parser (which one you get only 
> controlled by the classpath is totally beyond me. It might 
> work fine in 
> some cases, but since everybody and their dog started writing 
> specialised versions the whole thing has turned into a classpath 
> nightmare. Forget it if you want dynamic classpaths - Webapp, anyone?)
> So, to fix this, you have to include the FOP versions in the system 
> CLASSPATH BEFORE the weblogic ones. You then need to set up 
> the type of 
> parser in the system property. (Again, this is a bad idea 
> conceptually, 
> So, to get the thing running, I have the following:
> CLASSPATH=$WL_HOME:$WL_HOME/classes:$WL_HOME/lib/weblogic_sp.j
> ar:$WL_HOME/lib/weblogic.jar:$WL_HOME/xmlx.jar
> tik.jar:$LOCAL_LIBDIR/fop.jar:$LOCAL_LIBDIR/avalon-fr
> amework-4.0.jar:$LOCAL_LIBDIR/logkit-1.0b4.jar:
> JAVA_CMD_LINE="$JAVA_HOME/bin/java $JAVA_OPTIONS -classpath 
> $LOCAL_CLASSPATH:$CLASSPATH (weblogic stuff here) 
> -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser 
> weblogic.Server
> However, YMMV....
> Other warning(s): Due to the (by design) limitations of the java 
> classloader, you will have to make sure that any extensions that you 
> write to FOP/XSL are also in the system classpath, and I pity 
> you if you 
> want to do any of this in an EJB.... I reckon I will spin the 
> whole PDF 
> rendering thing off as a Jini service and be done with the whole 
> classpath problem. You will also need to be aware of 
> limitations of FOP 
> wrt headless servers. (It won't work) (Actually, any program that 
> requres a graphics context will have problems.) You may want 
> to look at 
> PJA as a way around this. (Alternatively, VNC will also work).
> In terms of the programs etc to write, the examples work fine.....
> Cheers
> James
> > 
> > 
> > Hi James,
> > 
> > I am facing problem compiling and deploying , xml xsl to 
> pdf using fop
> > on weblogic 6.1.
> > Would you please send me following please,
> > 
> > [1] a sample stand alone java code generating pdf using xml 
> and xsl file
> > [2] a servlet generating pdf using xml and xsl file on weblogic 6.x
> > 
> > Please help with whatever knowledge you have.
> > 
> > Thanks and regards.
> > 
> > Rakesh
> > 
> > 
> > Content-Type:
> > 
> > application/rtf
> > Content-Encoding:
> > 
> > base64
> > 
> > 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

Description: Binary data

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to