|
From: Alexandre A. <aa...@pe...> - 2004-08-30 14:51:57
|
Thanks Jeremias for your fast and encouraging answer !!!
I'm using Tomcat 4.0 but as you told me it works with a newer version,
I've set up Tomcat 5.0.28 and Java2sdk-1.4.2_05 (on another machine).
The server works, the examples work as well, then I tried to add a Fop
Servlet
but can't make it work.
I know it's not a krysalis issue...but here's what I've done:
I copy the fop folder (the one which works on Tomcat 4.0) in the webapps
folder
and when I try to access the servlet, i've got a 404 error.
Here is the web.xml file form the fop folder:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>Fop</servlet-name>
<servlet-class>FopServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Fop</servlet-name>
<url-pattern>*.pdf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Fop</servlet-name>
<url-pattern>/fop</url-pattern>
</servlet-mapping>
</web-app>
I've read information about how to set up web application in Tomcat but
haven't
found what's wrong as the fop folder is the same on Tomcat 4.0 and Tomcat
5.0.28
I tried the Krysalis Servlet on Tomcat 5.0.28 with success (but it generates
SVG,
and I need PDF....)
Alexandre Anfray
----- Original Message -----
From: "Jeremias Maerki" <dev...@gr...>
To: <kry...@li...>
Cc: <bar...@li...>
Sent: Monday, August 30, 2004 9:37 AM
Subject: Re: Using krysalis with Tomcat to output PDF barcodes
> Hello Alexandre,
>
> I've quickly done the same under JDK 1.4.2_03 on WinXP Pro using Tomcat
> 5.0.28 and it worked here. From what you write I can tell that you did
> everything right. Unfortunately, I don't have time right now to install
> JDK 1.3 and Tomcat 4.x on my notebook. I'll do that this evening (CEST)
> and will report back to you.
>
> It is probably a classpath problem. Maybe your Tomcat doesn't properly
> set up the classloader hierarchy for the service lookup mechanism to
> work. Would you please give me the exact version number of your Tomcat?
>
> On 30.08.2004 09:02:29 Alexandre Anfray wrote:
> > Hello,
> >
> > I'd like to use krysalis with FOP in Tomcat to output pdf
> > I'm working on Linux Red Hat 7.3, fop-0.20.5, krysalis-barcode-1.0beta,
> > jdk1.3.1_02
> >
> >
> > What already works:
> > ==============
> > 1) outputing barcodes in PDF files with fop-0.20.5 in command-line (with
the
> > ./fop.sh script)
> > I make it work by adding the
> > krysalis-barcode-fop-ext-0.20.5-complete.jar in the classpath
> > (and also add the avalon-framework-4.1.4.jar)
> >
> > 2) outputting PDF files from *.fo input with a FopServlet in Tomcat
> > the url looks like:
> > http://server:8080/fop/servlet/FopServlet?fo=simple.fo
> >
> > I added the krysalis-barcode-fop-ext-0.20.5-complete.jar and the
> > avalon-framework-4.1.4.jar
> > in the lib directory of the servlet (tomcat/webapps/fop/WEB-INF/lib)
> >
> > if i try an *.fo file with barcode instructions
> > <barcode:barcode
xmlns:barcode="http://www.krysalis.org/barcode/ns"
> > msg="my message">
> > <barcode:code128>
> > <barcode:height>8mm</barcode:height>
> > </barcode:code128>
> > </barcode:barcode>
> >
> > on the Tomcat server, it outputs the PDF correctly but WITHOUT the
> > barcode...
> >
> > looking in the log file from Tomcat, i see a possible error:
> > Starting service Tomcat-Apache
> > Apache Tomcat/4.0
> > [ERROR]: Logger not set
> > [INFO]: building formatting object tree
> > [ERROR]: Unknown formatting object
> > http://www.krysalis.org/barcode/ns^barcode
> > [ERROR]: Unknown formatting object
> > http://www.krysalis.org/barcode/ns^code128
> > [ERROR]: Unknown formatting object
http://www.krysalis.org/barcode/ns^height
> > [INFO]: [1]
> > [ERROR]: no handler defined for
http://www.krysalis.org/barcode/ns:barcode
> > foreign xml
> > [INFO]: Parsing of document complete, stopping renderer
> >
> > In conclusion, the simple_barcode.fo file works well in command-line but
not
> > in Tomcat server.
> > If anyone can help....
>
>
> Jeremias Maerki
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
> _______________________________________________
> krysalis-users mailing list
> kry...@li...
> https://lists.sourceforge.net/lists/listinfo/krysalis-users
>
|