i just updated from cocoon 2.1.6 to 2.1.7 and now i have got problems with the FOPSerializer.
My fo-Document contains a external graphic (the problem exist also for the 'background-image'-attribute:
...
<fo:block border-after-color="blue" border-after-width="0.5pt" border-after-style="solid" text-align="right">
<fo:external-graphic height="6mm" width="6mm" src="url('http://localhost:8080/sw/veraWeb/pics/ok.gif'')"/>
</fo:block>
...
If I serialize my fo-Dokument in Cocoon it produce the following message in 'error.log':
ERROR (2005-03-30) 16:39.15:500 [sitemap.serializer.fo2pdf] (/sw/veraWeb/main/adressen/665c25375c2d5221837b3b757f8a598d38736477.kont) http-8080-Processor25/MessageHandler: Error in XObject : Error while loading image http://localhost:8080/sw/veraWeb/pics/ok.gif : class java.lang.ClassCastException - sun.net.www.protocol.http.HttpURLConnection$HttpInputStream
The problem is the same if I use fop standalone.
After some debuging it seems to be a problem with the mime-type in the http-Response.
Netcat shows me that the Content-Type response header for images changes from cocoon 2.1.6 to cocoon 2.1.7.
Images got now the mime-type: 'images/gif' and that seem to be the problem for fop.
If I got the right mime-type ('image/gif') then it works fine.Now my question where can I change the content of my 'Content-Type'-Header for http-response?
Adding a rule
...
<mime-mapping>
<extension>gif</extension>
<mime-type>image/gif</mime-type>
</mime-mapping>
...
to my cocoon 'web.xml' changes nothing.
Thanks for help Eiko
Here my System: WinXP Tomcat 5.5 Cocoon 2.1.7 fop 0.20.5
Some debug outputs:
/******************************************************************
here comes the netcat output when I get an image from my cocoon 2.1.6 installation
******************************************************************/
$ nc 192.168.0.39 8090
GET /sw/veraWeb/pics/ok.gif HTTP/1.0
HTTP/1.1 200 OK
X-Cocoon-Version: 2.1.6
Last-Modified: Thu, 13 Jan 2005 14:27:18 GMT
Content-Type: image/gif /******** please look here ******/
Content-Length: 873
Date: Wed, 30 Mar 2005 11:48:53 GMT
Server: Sun-Java-System/Web-Services-Pack-1.4
Connection: close
/****************************************************************** here comes the netcat output when I get the same image from my cocoon 2.1.7 ******************************************************************/ $ nc localhost 8080 GET /sw/veraWeb/pics/ok.gif HTTP/1.0
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Cocoon-Version: 2.1.7
Accept-Ranges: none
Last-Modified: Thu, 13 Jan 2005 14:27:18 GMT
Content-Type: images/gif /******** please look here ******/
Content-Length: 873
Date: Wed, 30 Mar 2005 14:11:26 GMT
Connection: close
/******************************************************************
My sitemap
******************************************************************/
...
<map:match pattern="pics/*.gif">
<map:read mime-type="image/gif" src="resources/pics/{1}.gif"/>
</map:match>
...
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
